archinstall icon indicating copy to clipboard operation
archinstall copied to clipboard

Multiple `options` lines on a boot loader entry with systemd-boot

Open bnjbvr opened this issue 2 years ago • 5 comments

First, thanks for this awesome script, it's really helped me installing ArchLinux the easy way quite a few times already.

I've set up a new ArchLinux installation, with a dual boot: Windows was already installed with a multitude of partitions for recovery etc; I've created a new partition for ArchLinux, and I've wanted it to be encrypted (the TPM wasn't found by the installer).

I've set up the esp partition as /boot. I've created a new encrypted partition /dev/nvmXpN. For the bootloader, I've let the default value and used systemd-boot.

Installation went well, after a reboot I could see the systemd-boot menu proposing me to start Windows or ArchLinux. When selecting ArchLinux, it would prompt me for the encryption password. I filled it, and then I got the following error: /dev/nvmXpN already mounted or busy. Then I'm ending up in an emergency shell.

After trial and error, I realized I could mount /dev/mapper/luksdev /new_root in this emergency shell, then exit, and that startup would continue. Investigation showed that the entry generated in /boot/loader/entries contained multiple lines:

title Arch Linux (linux)
linux /vmlinuz-linux
# other initrd entries
options cryptdevice=PARTUUID=XYZW root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=ext4
options root=PARTUUID=XYZW zswap.enabled=0 rw rootfstype=ext4

Note the XYZW was the same in both options lines, which hinted me, in addition to the already mounted error message, that maybe one of these options lines wasn't necessary. I've removed the second one, and startup did work fine. Thought it might be helpful to others, or that it could be fixed in the installer.

Cheers!

bnjbvr avatar May 14 '23 12:05 bnjbvr

Thanks for the report!

I've seen at least one other having the same issue.

  • Did you do anything different this time compared to other installations you've done.
  • Did you use the latest ISO/archinstall?

jaybent avatar May 14 '23 13:05 jaybent

Did you do anything different this time compared to other installations you've done.

Previous times:

  • once I've chosen to erase the whole disk and let the installer set up partitions for me, using encryption too.
  • once I've chosen to select partitions by myself, keeping another Windows alive, but this time the Linux partition was not encrypted.

So it seems to be manual selection of partitions + encryption that triggered the issue for me.

Did you use the latest ISO/archinstall?

Yes; I've done the installation last Friday (2023-05-12), and the ArchLinux image was downloaded on that day.

bnjbvr avatar May 14 '23 13:05 bnjbvr

@bnjbvr we had a significant amount of changes since the latest official release on the ISO. If you have any chance to try would you mind fetching the latest master and trying with that one?

svartkanin avatar May 21 '23 08:05 svartkanin

Hi! thanks for the ping, and happy to hear this has being worked on! But sorry, I'm not going to reinstall ArchLinux to try it out :grin: :sweat_smile:

bnjbvr avatar May 21 '23 08:05 bnjbvr

That's all good, hopefully the new release will prevent this in the future

svartkanin avatar May 21 '23 08:05 svartkanin

This can be closed, see 5689d4f

codefiles avatar May 18 '24 19:05 codefiles