princeton-sns / firecracker-tools

5 stars 5 forks source link

Minimize rootfs generated by mk_rootfs.sh #4

Open alevy opened 5 years ago

alevy commented 5 years ago

Resize the rootfs filesystem generated by mk_rootfs.sh to match it’s contents rather than use a fixed (large) size.

This should be doable by figuring out the size actually used by the filesystem, then truncating the file and using resize2fs to fix up the ext4 headers for the new size.