Skip to content

Automatically compute the minimum size for the partition and resize it during the boot process

Daniele Debernardi requested to merge drebrez:minimal_partition_size into master

changes in the pmbootstrap install command:

  • before creating the partition, it computes the size of the files that will be copied in.

Initramfs init script new flow:

  • loading splashscreen is now displayed as soon as possible (right after the hooks)
  • no changes in mounting the boot partition and extracting the initramfs-extra
  • wait_root_partition: waits until either pmOS_root or LUKS partition is found
  • resize_root_partition: if the partition is inside the device-mapper it means that is stored as a subpartitions, in this case, using parted it grows the partition to use all the available space (also remount the subpartition otherwise devmapper doesn't recognize the new size)
  • unlock_root_partition: if the partition is encrypted it starts the usb unlock procedure and waits until the cryptsetup status returns "active". Once unlocked it shows again the loading splashscreen.
  • start_usb_unlock: small change to kill only the telnetd used for unblocking the partition, leaving any other telnetd alive (usb-shell hook), very useful for debugging
  • resize_root_filesystem: performs a filesystem check first (with e2fsck) and use resize2fs to grow the filesystem to use the whole partition size (e2fsck and resize2fs requires the /etc/mtab file, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673323)
  • mount_root_partition: self explanatory, it calls find_root_partition again to get the correct one, and if the partition was encrypted, now it correctly finds the decrypted pmOS_root partition inside the devmapper. Added a new splashscreen with "unable to mount root partition" in case of problems mounting it.

Added init.sh.in and init_functions.sh files to the static code analysis checks.

Merge request reports