Solved - Resize Root Filesystem (Xenial) - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85) +--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88) +--- Thread: Solved - Resize Root Filesystem (Xenial) (/showthread.php?tid=5009) |
Solved - Resize Root Filesystem (Xenial) - aussiemate - 08-24-2017 This is for those less familiar with Linux, or running Linux from an SD card. When you flash Ubuntu Xenial onto an SD card, the root filesystem size is only big enough to fit the operating system. This is intentional; to keep the size of the image file as small as possible, making it quicker to download and flash to any size SD card (within reason). After flashing the sd card and booting up for the first time, log in and do the following to expand the root filesystem by following these instructions. There's a lot of code below, but the whole process took me less than 2 minutes, and you should be able to safely accept the default response to all prompts. 1. Fix the partition table to reflect the size of the SD card: Code: rock64@rock64:~$ sudo parted -l 2. Increase the root partition size: Code: rock64@rock64:~$ sudo fdisk /dev/mmcblk1 3. Tell the kernel the partition table has changed: Code: rock64@rock64:~$ sudo partprobe /dev/mmcblk1 4. Resize the root filesystem to fill the partition: Code: rock64@rock64:~$ sudo resize2fs /dev/mmcblk1p7 Reboot and you're done! ...but don't forget to change the default password from rock64 RE: Resize Root Filesystem (Xenial) - Jakr - 08-25-2017 great idea, posting this.When I first started playing with the RPI3, I spent a couple of hours googling, untill I found this. For those that like using a GUI ... I will list a alternative way to do this ...... First, from the terminal, type ... sudo apt-get install gparted I am using a Xenial Mate image, about a week old. When I first tried this I got a error message. If you get a error message when you try this, do the following ... in the Welcome window that opens when you start Xenial up, click on the software button ( if you closed the welcome window, you can re-open it, in the system window ... clciking on the software window opens the software boutique window. Across the top are a row of icons ... click the last icon in the row, looks like a wrench, called fixes ... scroll down to the last section, broken packages. clcik both buttons, the configure interupted packages button first (clcik the show terminal commands box, to see what the system is doing ... Once you do these fixes, now type ... sudo apt-get install gparted once this is done, gparted is installed ... to run it, go to the system menu, and select administration .. there you will see gparted .. select it once gparted opens, you will see all the partitions. .. the last one, in grey, is unallocated. just to the left of that, is the partition, you will want to expand, to use the unallocated space. right click on the partition you want to expand (it should be just to the left of the unallocated space, should be the largest partition, except for the unallocated space, and should be yellow and white). when you right click, choose resize/move. in the new window that opens, place your cursor at the end of the yellow/white partition ..where there is a black arrow pointing right. when you place your cursor there,, it changes to a left - right arrow cursor. clcik, and drag to the right, expanding the yellow/white partition, into the grey partition. then, clcik the resize button. one more step. you have told gparted what you want to do, but you now need to apply the changes, to do this click the check mark button, at the top(last button, in the top row of buttons). Click apply, when it asks you if you are sure. depending on the size of the sd card, this could take a couple of minutes When a dialog box comes up, and says "all operations succesfully completed" you are done. Note both ways work, neither is better or worse then the other. Just two diffrent ways to accomplish the same task. (I tried to write astep by step guide. If I missed a step, let me know, I will edit to fix .. thank you). Jake RE: Resize Root Filesystem (Xenial) - ayufan - 08-28-2017 Can you just use: `resize_rootfs.sh` script? RE: Resize Root Filesystem (Xenial) - aussiemate - 08-28-2017 (08-28-2017, 07:05 AM)ayufan Wrote: Can you just use: `resize_rootfs.sh` script? Umm, yes, now that you mention it. I had no idea it existed, but now I see it lives under /usr/local/sbin/resize_rootfs.sh This would be really helpful to know when starting out. Perhaps it could be added to the Wiki somewhere? Thanks. RE: Solved - Resize Root Filesystem (Xenial) - fbms - 08-29-2017 ................................................................................................................................................................ can you make it run when it boots the first time? I spent a lot of time to mount the unallocated space to /home. |