On Thu, Jan 23, 2014 at 8:58 AM, Charles Steinkuehler <[email protected]> wrote: > On 1/23/2014 9:12 AM, Robert Nelson wrote: >> But i'd really like someone to write a script to automate the resize >> on bootup from the bbb.. ;) We have the initrd.img, so it could be >> done before the root partition is first loaded.. > > I'm not sure you'd want to put everything required to resize the root > partition into the initrd.
I was thinking about doing it in the initrd to remove the reboot in the process.. use fdisk to re-partition drive: reboot run resize2fs > What about something similar to /forcefsck where an init script runs and > checks for the presence of /resizerootfs or somesuch and then makes the > various required checks (that there is actually space available, the > filesystem is clean, the filesystem is a type that can be extende3d, etc). adding /resizerootfs to the fat boot partition would be a good trigger for the script.. > Can any simplifying assumptions be made about things like the root > device, partition layout, etc? with sfdisk we can easily dump/restore.. sfdisk -d /dev/mmcblk0 > part_table sfdisk /dev/mmcblk0 < part_table For the default images i've been using: sudo sfdisk --in-order --Linux --unit M /dev/mmcblk0 <<-__EOF__ 1,96,0xE,* ,,,- __EOF__ Could just cheat and always force that.. > It would be nice if you could just have a 2G raw image (saves time > writing) and expand the filesystem on the first boot. How long does it > take to expand an ext4 filesystem, anyway? I use jfs on my x86 boxes > because you can expand the fs live while it's mounted (very handy for > virtual machines and systems with SAN back-ends, where I'm always > growing the storage!). Last I checked, resizing ext3 was a royal PITA > by comparison...I hope this is improved with ext4. All play with ideas, as i've fixed most of the things on my bug list and pushed that out as 2014.01.22.. Regards, -- Robert Nelson http://www.rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
