linuxmint / live-installer

A live installer for the Debian edition
56 stars 65 forks source link

LMDE 5 beta: btrfs installer support #134

Open Lanchon opened 2 years ago

Lanchon commented 2 years ago

hi,

i installed LMDE 5 beta on a EFI virtualvox vm using btrfs for /, no separate /boot, and using grub. i used the expert mode installer. the installer completed but the system did not boot. it seems the installed grub is missing support for btrfs:

error: unknown filesystem.
error: you need to load the kernel first.

maybe Calamares could be updated?

thanks!

btw, the installer offered not to use grub. would it have placed the kernel in the EFI system partition then? IDK...

pavinjosdev commented 1 year ago

Perhaps this was due to the beta, I installed LMDE 5 using expert mode and it was working well. I have now submitted a pull request #144 for automated btrfs integration with existing support for LUKS/LVM.

Lanchon commented 1 year ago

i think maybe the beta and the release ended up being the same thing?

pavinjosdev commented 1 year ago

@Lanchon Sorry, I didn't read your post clearly. Using btrfs for boot is tricky. I hope you were using vfat for /boot/efi, this cannot be changed unfortunately as UEFI specs demand it. If so, /boot itself can be mounted as btrfs but make sure your initramfs includes btrfs module. I don't see much benefit though, you'd still have to take separate backups/snapshots of /boot/efi, so you might as well have an ext4 /boot.

Lanchon commented 1 year ago

I hope you were using vfat for /boot/efi

of course.

/boot itself can be mounted as btrfs but make sure your initramfs includes btrfs module.

that's my point. shouldn't the installer do that if /boot is btrfs? why should users be required to know such an implementation detail of the linux boot process?

btw, i know why the requirement, but i happen to not know how to manually add modules to initramfs. i never had to deal with its creation; so far it had always been just right. until now.

I don't see much benefit though, you'd still have to take separate backups/snapshots of /boot/efi

why?

pavinjosdev commented 1 year ago

Add the following modules to /etc/initramfs-tools/modules and run update-initramfs -u within the chroot environment:

btrfs
xor
raid6_pq
libcrc32c

When using expert mode installation, this is expected to be manually done though. For example, you may have modifications that require other modules to be loaded early as well.

why?

For full system backup and restore. But now that I think about it, you can regenerate /boot/efi using grub-install. Gives me something to think about :)

Lanchon commented 1 year ago

Add the following modules to /etc/initramfs-tools/modules

thanks! now i know :)

now that I think about it, you can regenerate /boot/efi using grub-install

oh! you mean because grub config and the installed kernels go out of sync. i hadn't thought of that.

i was about to say that i'd be a good idea to have the grub config broken in 2: one part in the ESP (/boot/efi) with enough info to mount the (possible btrfs) /boot, and the rest of the config (kernels, etc) in /boot. that way you can restore a snapshot and it would work. then i looked at my system (linux mint 21) and that's exactly how it's done, lol. they did their homework.

so AFAICT, you don't need to refresh grub after a rollback to snapshot, if the snapshot includes /boot. or am i wrong? /boot has long been recommended to be within / for user installations and that's how i do it.

Lanchon commented 1 year ago

When using expert mode installation, this is expected to be manually done though.

well IMHO that could be improved. it's an easy check to add the obviously missing fs. if not it should maybe warn that you should do it manually? there is no point in continuing with an install that can be easily recognized to be non-functional from the get go. this is the kind of thing project Calamares is about: making common things faster and simpler and lowering the barrier of entry to linux.