Comment # 59 on bug 1063249 from
(In reply to Jonathan Cottrill from comment #55)
> 
> Unfortunately, it's fairly involved, so only worth it for systems you really
> care about. :-)
> 

Thanks a lot for writing this.

There might be an easier way to boot a broken system though, I think the
following steps should work:

 1. Boot the broken system and append the following options to the kernel
    command line:

      rdinit=/bin/sh systemd.default_timeout_start_sec=10

 2. A very early shell should be started instead of systemd. Now we should
    be able to fix /etc/crypttab contained in initd:

      sed -Ei 's,(cr_|by-id/)-,\1nvme-,g' /etc/crypttab

 3. And finally boot systemd:

      exec /sbin/init

During the boot process, there will be some errors related to /etc/crypttab
from the rootfs containing references to the broken symlinks (the step 2. only
fixed crypptab from initrd). Those errors shouldn't be fatal though but the
system would wait until a timeout expires (1'30). That the reason why in step
1. we added  "systemd.default_timeout_start_sec=10" option.

Once the system booted, /etc/crypptab (from the rootfs) still needs to be
fixed.  The following steps should do that:

 1. sed -Ei 's,(cr_|by-id/)-,\1nvme-,g' /etc/crypttab

 2. mkinitrd


You are receiving this mail because: