"error: invalid segment." (with btrfs on LVM on LUKS)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Invalid
|
Medium
|
Mathieu Trudel-Lapierre |
Bug Description
This is an attempt to install grub2 on a system which has boot and root partitions inside a LVM which in turn is all inside a LUKS container (details below at the end).
Using grub git version (latest of today Feb 11th 2015, I don't know the commit hash)
The relevant errors are this:
error: invalid segment.
grub2-install: error: disk `lvmid/
error: invalid segment.
/usr/sbin/
Full details below:
--------
(chroot1) livecd / # grub2-install --force --compress=xz --target=i386-pc --recheck --debug --locales= --fonts= --boot-
Installing for i386-pc platform.
grub2-install: info: cannot open `/but/grub/
grub2-install: info: compressing `/usr/lib/
[..snip..]
see attachment for this snipped part, because I got this error(submitting bug):
The description is too long. If you have lots of text to add, attach a file to the bug instead.
[..snip..]
grub2-install: info: drive = -1.
grub2-install: error: disk `lvmid/
(chroot1) livecd / # grub2-mkconfig -o /but/grub/grub.cfg >>/tmp/out.txt
Generating grub configuration file ...
Found linux image: /but/kernel-
Found initrd image: /but/initramfs-
error: invalid segment.
/usr/sbin/
error: invalid segment.
/usr/sbin/
error: invalid segment.
/usr/sbin/
done
(chroot1) livecd / # mount
proc on /proc type proc (rw,nosuid,
udev on /dev type devtmpfs (rw,nosuid,
devpts on /dev/pts type devpts (rw,relatime,
sysfs on /sys type sysfs (rw,nosuid,
tmpfs on /run type tmpfs (rw,nosuid,
shm on /dev/shm type tmpfs (rw,nosuid,
fusectl on /sys/fs/
/dev/mapper/
/dev/mapper/
tmpfs on /tmp type tmpfs (rw,nosuid,
/tmp on /var/tmp type none (rw,bind,rbind)
tmpfs on /var/tmp/portage type tmpfs (rw,nosuid,
(chroot1) livecd / # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 25G 0 disk
├─sda1 8:1 0 2M 0 part
└─sda2 8:2 0 25G 0 part
└─lvm_
├─vgall-
└─vgall-
sr0 11:0 1 208M 0 rom
loop0 7:0 0 178.3M 1 loop
(chroot1) livecd / # cryptsetup luksDump /dev/sda2 |grep UUID
UUID: b904d6c0-
(chroot1) livecd / # pvdisplay
--- Physical volume ---
PV Name /dev/disk/
VG Name vgall
PV Size 24.99 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 6398
Free PE 0
Allocated PE 6398
PV UUID 9qjZyk-
(chroot1) livecd / # vgdisplay
--- Volume group ---
VG Name vgall
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 24.99 GiB
PE Size 4.00 MiB
Total PE 6398
Alloc PE / Size 6398 / 24.99 GiB
Free PE / Size 0 / 0
VG UUID 31WF5i-
(chroot1) livecd / # lvdisplay
--- Logical volume ---
LV Path /dev/vgall/bootlvol
LV Name bootlvol
VG Name vgall
LV UUID bu7oYe-
LV Write Access read/write
LV Creation host, time livecd, 2015-02-10 04:39:58 +0100
LV Status available
# open 1
LV Size 128.00 MiB
Current LE 32
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Path /dev/vgall/rootlvol
LV Name rootlvol
VG Name vgall
LV UUID sKk47H-
LV Write Access read/write
LV Creation host, time livecd, 2015-02-10 04:40:02 +0100
LV Status available
# open 1
LV Size 24.87 GiB
Current LE 6366
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
(chroot1) livecd / # time FEATURES=
[ebuild R ] sys-boot/
(chroot1) livecd / # fdisk -l /dev/sda
Disk /dev/sda: 25 GiB, 26843545600 bytes, 52428800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5E5F0B83-
Device Start End Size Type
/dev/sda1 2048 6143 2M BIOS boot partition
/dev/sda2 6144 52426751 25G Linux filesystem
(chroot1) livecd / # uname -a
Linux livecd 3.16.5-gentoo #1 SMP Thu Dec 4 06:13:19 UTC 2014 x86_64 AMD A6-3400M APU with Radeon(tm) HD Graphics AuthenticAMD GNU/Linux
(chroot1) livecd / # cryptsetup --version
cryptsetup 1.6.6
(chroot1) livecd / # grub2-install --version
grub2-install (GRUB) 2.02~beta2
(chroot1) livecd / # lvm version
LVM version: 2.02.110(2) (2014-08-26)
Library version: 1.02.89 (2014-08-26)
Driver version: 4.27.0
/dev/sda2 is LUKS, then inside it there's LVM (a boot and a root, logical volumes, each of which are btrfs formatter).
tested inside virtualbox, booted from Gentoo's install-
If anyone is adventurous enough, here's roughly all the steps I followed: https:/
(I think only this step is missing: time emerge -av libgcrypt coreutils glibc )
Note that --force to grub2-install has no effect(in this grub git version), although version from package grub-2.
Changed in grub2 (Ubuntu): | |
importance: | Undecided → Medium |
Sorry guys, for some reason I thought(wrongly!) this was the official place to report grub bugs even though it clearly says Ubuntu. I've only tested this on Gentoo though.
I can't find a way to close this bug. Anyway, sorry for the noise.