{"id":431,"date":"2014-12-10T14:46:12","date_gmt":"2014-12-10T12:46:12","guid":{"rendered":"http:\/\/piprojects.net\/?p=431"},"modified":"2014-12-10T14:46:12","modified_gmt":"2014-12-10T12:46:12","slug":"script-for-resize-root-partition","status":"publish","type":"post","link":"https:\/\/www.piprojects.net\/en\/script-for-resize-root-partition\/","title":{"rendered":"Skript zum anpassen der root PartitionScript for resize root partition"},"content":{"rendered":"<p>hi there, here a little script for resize the root partition on the bpi or like somthing else<\/p>\n<p><code><br \/>\ncat <<EOT> \/root\/resize.sh<br \/>\n#!\/bin\/bash<\/p>\n<p>fdisk_first() {<br \/>\n\t\tp2_start=`fdisk -l \/dev\/mmcblk0 | grep mmcblk0p2 | awk '{print $2}'`<br \/>\n\t\techo \"Found the start point of mmcblk0p2: $p2_start\"<br \/>\n\t\tfdisk \/dev\/mmcblk0 << __EOF__ >> \/dev\/null<br \/>\nd<br \/>\n2<br \/>\nn<br \/>\np<br \/>\n2<br \/>\n$p2_start<\/p>\n<p>p<br \/>\nw<br \/>\n__EOF__<\/p>\n<p>\t\tsync<br \/>\n\t\ttouch \/root\/.resize<br \/>\n\t\techo \"Ok, Partition resized, please reboot now\"<br \/>\n\t\techo \"Once the reboot is completed please run this script again\"<br \/>\n}<\/p>\n<p>resize_fs() {<br \/>\n\techo \"Activating the new size\"<br \/>\n\tresize2fs \/dev\/mmcblk0p2 >> \/dev\/null<br \/>\n\techo \"Done!\"<br \/>\n\techo \"Enjoy your new space!\"<br \/>\n\trm -rf \/root\/.resize<br \/>\n}<\/p>\n<p>if [ -f \/root\/.resize ]; then<br \/>\n\tresize_fs<br \/>\nelse<br \/>\n\tfdisk_first<br \/>\nfi<br \/>\nEOT<br \/>\n<\/code><\/p>\n<p>you can find the file here \/root\/resize.sh<br \/>\nthen chmod +x \/root\/resize.sh<br \/>\nrun it once with .\/root\/resize.sh<br \/>\nreboot your system and run the script again<\/p>","protected":false},"excerpt":{"rendered":"<p>hi there, here a little script for resize the root partition on the bpi or like somthing else cat \/dev\/null d 2 n p 2 $p2_start p w __EOF__ sync touch \/root\/.resize echo &#8220;Ok, Partition resized, please reboot now&#8221; echo &#8220;Once the reboot is completed please run this script again&#8221; } resize_fs() { echo &#8220;Activating [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":485,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[],"class_list":["post-431","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","wpmagazine_modules_lite_featured_media_urls":{"thumbnail":"","cvmm-medium":"","cvmm-medium-plus":"","cvmm-portrait":"","cvmm-medium-square":"","cvmm-large":"","cvmm-small":"","full":""},"categories_names":{"3":{"name":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"}},"tags_names":[],"comments_number":"0","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5ktuF-6X","jetpack-related-posts":[{"id":759,"url":"https:\/\/www.piprojects.net\/en\/centos-7-auf-dem-banana-oder-raspberry-3\/","url_meta":{"origin":431,"position":0},"title":"(Deutsch) CentOS 7 auf dem Banana oder Raspberry 3","author":"Stefan","date":"Monday May  2nd, 2016","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Ich habe es endlich geschafft mal wieder etwas mit dem Banana und auch dem Raspi3 zu spielen und habe dabei CentOS 7 gefunden. http:\/\/buildlogs.centos.org\/centos\/7\/isos\/armhfp\/ Die Installation ist denkbar einfach. Image Laden und mit dd \u00a0oder WinImager auf die SD Karte schreiben. Das System\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":406,"url":"https:\/\/www.piprojects.net\/en\/bananapi-kernel-3-18-rc5\/","url_meta":{"origin":431,"position":1},"title":"BananaPi Kernel-3.18-rc5BananaPi Kernel-3.18-rc5","author":"Stefan","date":"Tuesday November 18th, 2014","format":false,"excerpt":"So nun hier alle meine Schritte f\u00fcr ein funktionierendes Debian Jessie mit Kernel-3.18 (auf die \u00c4nderungen im git werde ich hier nicht eingehen, aber man kann diese sich an im git selbst ansehen und nachverfolgen) Wer keine Lust auf basteln hat hier der Download Ich selbst setze derzeit ein LUbuntu\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":582,"url":"https:\/\/www.piprojects.net\/en\/usb-bootstick-selbst-erstellen\/","url_meta":{"origin":431,"position":2},"title":"USB Bootstick selbst erstellen","author":"Stefan","date":"Wednesday February  4th, 2015","format":false,"excerpt":"Bootable USB Stick Heute mal ein etwas anderes Thema. Booten vom USB Stick bzw wie man ihn bootbar macht und wozu das gut sein kann. Warum mache ich mir die M\u00fche in Zeiten von Ultimate BootCD oder Hirens? Nun ganz einfach weil es Spa\u00df macht neue Sachen zu testen und\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.piprojects.net\/en\/category\/allgemein\/"},"img":{"alt_text":"2015-02-03-164808_1440x900_scrot","src":"https:\/\/i0.wp.com\/piprojects.net\/wp-content\/uploads\/2015\/02\/2015-02-03-164808_1440x900_scrot-300x188.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":341,"url":"https:\/\/www.piprojects.net\/en\/banana-pi-kernel-3-18-rc-bauen\/","url_meta":{"origin":431,"position":3},"title":"(Deutsch) Banana Pi Kernel 3.18-rc bauen","author":"Stefan","date":"Wednesday November  5th, 2014","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Hier erstmal eine grobe Zusammenfassung der Schritte, eine genau Beschreibung folgt noch cat < 2048,524288,L 526336,,L EOT mkfs.vfat \/dev\/mmcblk0p1 mkfs.ext4 \/dev\/mmcblk0p2 apt-get install bc libncurses5-dev gcc-arm-gnueabihf u-boot-tools build-essential binutils-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot mkdir bpi cd bpi git clone -b sunxi-next https:\/\/github.com\/linux-sunxi\/linux-sunxi\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1245,"url":"https:\/\/www.piprojects.net\/en\/debian-image-bauen\/","url_meta":{"origin":431,"position":4},"title":"(Deutsch) Debian Image bauen","author":"Stefan","date":"Thursday January  5th, 2017","format":false,"excerpt":"Sorry, this entry is only available in Deutsch.Ich habe mal mein \"altes\" Script \u00fcberarbeitet zum erstellen von einem Debian Image. Die git Quellen sollte man entsprechend anpassen , da sie derzeit auf meine Testing zeigen und noch nicht alles funktioniert (jedenfalls M2 Ultra) der Rest sind aktuelle Quellen darin. Verzeichnis\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.piprojects.net\/wp-content\/uploads\/2015\/01\/bin-bash-extended.sh-600x600-260x260.png?fit=260%2C260&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1424,"url":"https:\/\/www.piprojects.net\/en\/sms-gateway-im-eigenbau\/","url_meta":{"origin":431,"position":5},"title":"SMS Gateway DIY","author":"Stefan","date":"Tuesday February 16th, 2021","format":false,"excerpt":"Setup SMS Gateway with playSMS and gammu Generally:The aim is to have an SMS gateway for sending 2FA passwords and also for messages from monitoring Hardware: Raspberry Pi 4\u00a0 4GB Raspberry Pi HAT SIM7600X-H (H = Europa , T = China ) SD Karte min 8GB Original Netzteil USB-C Geh\u00e4use\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.piprojects.net\/en\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts\/431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/comments?post=431"}],"version-history":[{"count":0,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/posts\/431\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/media?parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/categories?post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.piprojects.net\/en\/wp-json\/wp\/v2\/tags?post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}