hetzneronline / installimage

Bash scripts to universally deploy various distributions
Other
517 stars 143 forks source link

Boot and root do not need to be outside LVM #70

Open towo opened 1 year ago

towo commented 1 year ago

I've had a couple of installs where I needed to patch installimage by removing https://github.com/hetzneronline/installimage/blob/cc14774999dc19d7724e4c71b1d597da69955db0/functions.sh#L1118-L1139

A totally working Debian 11 setup has this truncated lsblk output:

NAME                                           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme0n1                                        259:0    0 476.9G  0 disk
├─nvme0n1p1                                    259:1    0    50G  0 part
│ └─md0                                          9:0    0    50G  0 raid1
│   ├─$FQDN-root 253:0    0    30G  0 lvm   /
│   └─$FQDN-boot 253:1    0     1G  0 lvm   /boot

And following snippet from grub.cfg:

        module2 /vmlinuz-5.10.0-21-amd64 placeholder root=/dev/mapper/$FQDN-root ro  nomodeset consoleblank=0

(module2 as a Xen hypervisor is being loaded, but that's irrelevant to the actual functionality of Grub)

The only things that need to be ensured are having

insmod mdraid1x
insmod lvm

in grub.cfg. Debian 11 just natively supports this and doesn't require any special configuration here, that's the output from a stock update-grub.

So I would recommend just removing that snippet entirely, since if Debian can do it, I guess everything can; or, if this is supposd to be a foot penetration safety measure, at least allow disabling it with a command line flag.