rework reform-boot-config
rework reform-boot-config
- support all combinations of:
- new root partition is already monted as /
- new root partition lives elsewhere
- new /boot partition is the same as the already configured one
- new /boot is already mounted
- new /boot device doesn't exist
- error out if anything is still mounted that shouldn't be mounted
- only mount when necessary
- only use chroot if new root device is not /
- use traps to always unmount everything and clean tmpfiles uponfailure
- consult /etc/fstab of new root for location of old /boot
- copy over contents of old /boot to new one if necessary
Edited by Johannes Schauer Marin Rodrigues