Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
towo opened this issue Mar 7, 2023 · 0 comments
Open

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

towo opened this issue Mar 7, 2023 · 0 comments
Labels

Comments

@towo
Copy link

towo commented Mar 7, 2023

I've had a couple of installs where I needed to patch installimage by removing

installimage/functions.sh

Lines 1118 to 1139 in cc14774

# test if /boot or / is mounted outside the LVM
if [ "$LVM" = "1" ]; then
TMPCHECK=0
for ((i=1; i<=PART_COUNT; i++)); do
if [ "${PART_MOUNT[$i]}" = "/boot" ]; then
TMPCHECK=1
fi
done
if [ "$TMPCHECK" = "0" ]; then
for ((i=1; i<=PART_COUNT; i++)); do
if [ "${PART_MOUNT[$i]}" = "/" ]; then
TMPCHECK=1
fi
done
fi
if [ "$TMPCHECK" = "0" ]; then
graph_error "ERROR: /boot or / may not be a Logical Volume"
return 1
fi
fi

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.

@asciiprod asciiprod added the bug label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants