| Summary: | drakboot cannot create bootmanager configuration | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Markus Mertens <Mertens.MPT> |
| Component: | Release (media or process) | Assignee: | Mageia Bug Squad <bugsquad> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | major | ||
| Priority: | Normal | CC: | davidwhodgins, lewyssmith, mageia |
| Version: | 8 | ||
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | CVE: | ||
| Status comment: | |||
| Attachments: |
lspcidrake -v
blkid journalctl output of last three days |
||
|
Description
Markus Mertens
2022-01-24 11:30:41 CET
Created attachment 13102 [details]
lspcidrake -v
Created attachment 13103 [details]
blkid
Thank you for the report. It looks as if you have both LVM and raid? Can you please describe the boot mechanism before you ran drakboot? And what you were trying to achieve/define? "mcc did not find any configuration" is strange. Had you defined booting at installation of Mageia? Perhaps attach screenshots (window) at the start, and for each subsequent stage before the crash. Can you please also post the output from: $ inxi -MSdopLxx CC:
(none) =>
lewyssmith I have two 1.8 TB nvme disks (nvme0n1, nvme1n1) with two partitions each:
first partition (nvme*n1p1) = 1 GB (EFI System Partition)
second partition (nvme*n1p2) = 1.8 TB (Linux RAID)
On the RAID I installed LVM for /home, /opt, /var and /.
The system boots and I can work with it. I can list the contents of /boot/EFI but the bootmanager seems to have problems reading /boot/EFI.
[root@cortex ~]# inxi -MSdopLxx
System: Host: cortex Kernel: 5.15.28-desktop-1.mga8 x86_64 bits: 64 compiler: gcc v: 10.3.0 Console: tty 0 wm: kwin_x11
DM: GDM, LightDM, SDDM Distro: Mageia 8 mga8
Machine: Type: Desktop System: FUJITSU product: CELSIUS R970power v: N/A serial: EIAJ001384 Chassis: type: 3 v: CR970PF
serial: EIAJ001384
Mobo: FUJITSU model: D3488-A2 v: S26361-D3488-A2 serial: 95251033 UEFI: FUJITSU // American Megatrends
v: 5.0.0.14 R1.9.0 for D3488-A2x date: 07/19/2021
Logical: Device-1: VG: vg0 type: LVM2 size: 1.86 TiB free: 1010.6 GiB
LV-1: lv_home type: linear dm: dm-3 size: 512 GiB
Components: c-1: md0 pp-1: nvme0n1p2 pp-2: nvme1n1p2
LV-2: lv_opt type: linear dm: dm-2 size: 128 GiB
Components: c-1: md0 pp-1: nvme0n1p2 pp-2: nvme1n1p2
LV-3: lv_root type: linear dm: dm-0 size: 128 GiB
Components: c-1: md0 pp-1: nvme0n1p2 pp-2: nvme1n1p2
LV-4: lv_var type: linear dm: dm-1 size: 128 GiB
Components: c-1: md0 pp-1: nvme0n1p2 pp-2: nvme1n1p2
Drives: Local Storage: total: raw: 10.27 TiB usable: 8.41 TiB lvm-free: 1010.6 GiB used: 145.83 GiB (1.7%)
ID-1: /dev/nvme0n1 vendor: Micron model: MTFDHBA2T0TDV-1AZ1AABFA size: 1.86 TiB speed: 31.6 Gb/s lanes: 4
serial: 21052D45E452
ID-2: /dev/nvme1n1 vendor: Micron model: MTFDHBA2T0TDV-1AZ1AABFA size: 1.86 TiB speed: 31.6 Gb/s lanes: 4
serial: 21052D45E45D
ID-3: /dev/sda model: PRAID EP400i size: 6.55 TiB serial: N/A
Optical-1: /dev/sr0 vendor: HL-DT-ST model: BD-RE BU40N rev: PH07 dev-links: cdrom,cdrw,dvd,dvdrw
Features: speed: 24 multisession: yes audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition: ID-1: / size: 124.99 GiB used: 21.8 GiB (17.4%) fs: ext4 dev: /dev/dm-0 mapped: vg0-lv_root
ID-2: /boot/EFI size: 1021 MiB used: 75.6 MiB (7.4%) fs: vfat dev: /dev/nvme1n1p1
ID-3: /data size: 6.48 TiB used: 46.32 GiB (0.7%) fs: xfs dev: /dev/sda2
ID-4: /home size: 502.96 GiB used: 21.75 GiB (4.3%) fs: ext4 dev: /dev/dm-3 mapped: vg0-lv_home
ID-5: /opt size: 124.99 GiB used: 30.42 GiB (24.3%) fs: ext4 dev: /dev/dm-2 mapped: vg0-lv_opt
ID-6: /var size: 124.99 GiB used: 25.47 GiB (20.4%) fs: ext4 dev: /dev/dm-1 mapped: vg0-lv_var
ID-7: swap-1 size: 64 GiB used: N/A (0.0%) fs: swap priority: -2 dev: /dev/sda1
Unmounted: ID-1: /dev/nvme0n1p1 size: 1 GiB fs: vfat label: SYSTEM uuid: F216-55AA
[root@cortex ~]#
Why is /dev/nvme0n1p1 unmounted? CC:
(none) =>
davidwhodgins I don't know. According to my fstab it should be mounted: [mer@cortex ~]$ mount | grep EFI /dev/nvme1n1p1 on /boot/EFI type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro) [mer@cortex ~]$ cat /etc/fstab /dev/vg0/lv_root / ext4 relatime,acl 1 1 # Entry for /dev/nvme0n1p1 : UUID=F216-55AA /boot/EFI vfat iocharset=utf8,umask=000 0 0 # Entry for /dev/sda2 : UUID=59b64bfb-49f7-4998-8ed6-fc940e20f0f6 /data xfs relatime 1 2 /dev/vg0/lv_home /home ext4 relatime,acl 1 2 cortex1:/mnt/analyses /mnt/analyses nfs wsize=8192,nosuid,rsize=8192,soft 0 0 cortex1:/mnt/imagepool /mnt/imagepool nfs wsize=8192,rsize=8192,nosuid,soft 0 0 /dev/vg0/lv_opt /opt ext4 relatime,acl 1 2 none /proc proc defaults 0 0 /dev/vg0/lv_var /var ext4 relatime,acl 1 2 # Entry for /dev/sda1 : UUID=9361b318-0bcb-4538-b6ae-cd1129ede156 swap swap defaults 0 0 [mer@cortex ~]$ Some additional information: [root@cortex mer]# efibootmgr -v | grep mageia Boot0001* mageia HD(1,GPT,82418868-d02c-4cbc-85be-35753ed578f9,0x800,0x200800)/File(\EFI\MAGEIA\GRUBX64.EFI) Boot000F* mageia2 HD(1,GPT,a2629746-e386-47af-ba90-e3be965734f5,0x800,0x200800)/File(\EFI\MAGEIA\GRUBX64.EFI) [root@cortex mer]# blkid | grep nvme /dev/nvme0n1p1: LABEL_FATBOOT="SYSTEM" LABEL="SYSTEM" UUID="F216-55AA" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="COB" PARTUUID="82418868-d02c-4cbc-85be-35753ed578f9" /dev/nvme0n1p2: UUID="5bf7cd42-f0b4-348a-8377-1ea7302cfa2c" UUID_SUB="fd7571b9-a5d5-54cd-d473-b735a6541526" LABEL="localhost:0" TYPE="linux_raid_member" PARTUUID="302427ea-45c8-4731-b0ce-82dae79646ee" /dev/nvme1n1p1: LABEL_FATBOOT="SYSTEM" LABEL="SYSTEM" UUID="F216-55AA" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a2629746-e386-47af-ba90-e3be965734f5" /dev/nvme1n1p2: UUID="5bf7cd42-f0b4-348a-8377-1ea7302cfa2c" UUID_SUB="79683ffe-3b6e-e065-73a1-8e4a12438ff8" LABEL="localhost:0" TYPE="linux_raid_member" PARTUUID="d171863e-4d3d-4451-8281-241cde6ab7e6" [root@cortex mer]# What's the outout of "journalctl --no-h |grep -e nvme0n1p1 -e F216-55AA -e /EFI"? Also, /dev/nvme0n1p1 and /dev/nvme1n1p1 have duplicate uuids although the partuuids are unique. Any mount or boot parameter referencing them may get either one. A Universally unique identifier must be UNIQUE. Created attachment 13211 [details]
journalctl output of last three days
With /dev/nvme0n1p1 mounted, what's the output of "df -h" and "df -hi"? Never mind the df output, it's in the inxi output. Still looking through the journalctl output. Does running (as root) "update-grub2" work? Also, the partitioning is a mess. Having two partitions using the same mount point, and non-unique "unique" identifiers makes which partition gets written to, or read from, un-predictable. There's nvme1n1p1 and nvme0n1p1, both with UUID=F216-55AA. Both are getting mounted to /boot/EFI at different times. Which one is the UEFI system set to actually use? While it's fine to backup the one that's in use, the backup must not have the same "uuid" (aka VOLUME-ID). Also, the partitioning is a mess. Having two partitions using the same mount point, and non-unique "unique" identifiers makes which partition gets written to, or read from, un-predictable. There's nvme1n1p1 and nvme0n1p1, both with UUID=F216-55AA. Both are getting mounted to /boot/EFI at different times. Which one is the UEFI system set to actually use? While it's fine to backup the one that's in use, the backup must not have the same "uuid" (aka VOLUME-ID for vfat file systems). The UEFI system should use nvme0n1p1. How can I change the UUID of the other disk (nvme1n1p1)? Boot a live iso, to ensure it's not currently mounted or in use. If you want, you can temporarily mount it, copy it's contents to a safe location, and unmount it before reformatting it, then mount it again, and copy the contents back. Don't use diskdrake to reformat it, as it will keep the old uuid. To reformat it, use "mkfs.vfat /dev/nvme1n1p1" (as root). Mount the root file system and ensure it's /etc/fstab does either does not reference the partition, or has it's new uuid before rebooting into the installed system. Use the blkid command to determine the newly generated uuid. You can probably do this from the running system, provided you can ensure that file system is not in use (partition not mounted). I'd do it from a live iso so you know you can use that to fix things if anything does go wrong. [root@cortex ~]# blkid | grep SYSTEM /dev/nvme0n1p1: LABEL_FATBOOT="SYSTEM" LABEL="SYSTEM" UUID="2BAF-216B" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="COB" PARTUUID="82418868-d02c-4cbc-85be-35753ed578f9" /dev/nvme1n1p1: LABEL_FATBOOT="SYSTEM" LABEL="SYSTEM" UUID="F216-55AA" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a2629746-e386-47af-ba90-e3be965734f5" [root@cortex ~]# mount | grep nvme /dev/nvme0n1p1 on /boot/EFI type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro) [root@cortex ~]# cat /etc/fstab | grep UUID UUID=2BAF-216B /boot/EFI vfat iocharset=utf8,umask=000 0 0 UUID=59b64bfb-49f7-4998-8ed6-fc940e20f0f6 /data xfs relatime 1 2 UUID=9361b318-0bcb-4538-b6ae-cd1129ede156 swap swap defaults 0 0 [root@cortex ~]# update-grub2 GRUB-Konfigurationsdatei wird erstellt … Thema gefunden: /boot/grub2/themes/maggy/theme.txt Linux-Abbild gefunden: /boot/vmlinuz-5.15.32-desktop-1.mga8 initrd-Abbild gefunden: /boot/initrd-5.15.32-desktop-1.mga8.img Linux-Abbild gefunden: /boot/vmlinuz-5.15.28-desktop-1.mga8 initrd-Abbild gefunden: /boot/initrd-5.15.28-desktop-1.mga8.img Linux-Abbild gefunden: /boot/vmlinuz-5.15.25-desktop-1.mga8 initrd-Abbild gefunden: /boot/initrd-5.15.25-desktop-1.mga8.img Linux-Abbild gefunden: /boot/vmlinuz-5.15.6-desktop-2.mga8 initrd-Abbild gefunden: /boot/initrd-5.15.6-desktop-2.mga8.img Linux-Abbild gefunden: /boot/vmlinuz-desktop initrd-Abbild gefunden: /boot/initrd-desktop.img Bootmenü-Eintrag für UEFI-Firmware-Einstellungen wird hinzugefügt … abgeschlossen [root@cortex ~]# But still mcc cannot configure the bootmanager grub2-install failed: x86_64-efi wird für Ihre Plattform installiert. File descriptor 9 (/dev/urandom) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 10 (/dev/urandom) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 21 (/proc/meminfo) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 22 (/proc/zoneinfo) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 23 (/proc/6483/cgroup) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 24 (/sys/fs/cgroup/user.slice/user-1000.slice/session-c2.scope/memory.current) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 25 (/sys/fs/cgroup/user.slice/user-1000.slice/session-c2.scope/memory.max) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 26 (/sys/fs/cgroup/user.slice/user-1000.slice/session-c2.scope/memory.high) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 9 (/dev/urandom) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 10 (/dev/urandom) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 21 (/proc/meminfo) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 22 (/proc/zoneinfo) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 23 (/proc/6483/cgroup) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 24 (/sys/fs/cgroup/user.slice/user-1000.slice/session-c2.scope/memory.current) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 25 (/sys/fs/cgroup/user.slice/user-1000.slice/session-c2.scope/memory.max) leaked on vgs invocation. Parent PID 53350: grub2-install File descriptor 26 (/sys/fs/cgroup/user.slice/user-1000.slice/session-c2.scope/memory.high) leaked on vgs invocation. Parent PID 53350: grub2-install grub2-install: Fehler: »/boot/efi/EFI/mageia/grubx64.efi« kann nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden. ...propagated at /usr/lib/libDrakX/any.pm line 278. ...propagated at /usr/libexec/drakboot line 49. Perl's trace: drakbug::bug_handler() called from /usr/libexec/drakboot:49 This is strange: grub2 looks for "grubx64.efi" in /boot/efi/EFI, but the file is located in /boot/EFI/efi: [root@cortex mer]# grub2-install x86_64-efi wird für Ihre Plattform installiert. grub2-install: Fehler: »/boot/efi/EFI/mageia/grubx64.efi« kann nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden. [root@cortex mer]# find /boot -name grubx64.efi /boot/EFI/efi/mageia/grubx64.efi [root@cortex mer]# How can I correct this? Checking on my uefi system ... # ls -l /boot|grep EFI drwxrwxrwx 3 root root 4096 Dec 31 1969 EFI/ lrwxrwxrwx 1 root root 3 May 9 2021 efi -> EFI/ Does the symlink exist on that system? It should have been created during the installation of Mageia. If it's missing, re-add it with (as root) # ln -s /boot/EFI /boot/efi I just re-added the link but it does not solve the problem. Now the "missing" file grubx64.efi exists in the followeing two paths: /boot/efi/efi/mageia/ /boot/EFI/efi/mageia/ But drakboot/grub2-install look in: /boot/efi/EFI/mageia/ grub2-install failed: x86_64-efi wird für Ihre Plattform installiert. grub2-install: Fehler: »/boot/efi/EFI/mageia/grubx64.efi« kann nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden. ...propagated at /usr/lib/libDrakX/any.pm line 278. ...propagated at /usr/libexec/drakboot line 49. Perl's trace: drakbug::bug_handler() called from /usr/libexec/drakboot:49 [root@cortex boot]# grub2-install x86_64-efi wird für Ihre Plattform installiert. grub2-install: Fehler: »/boot/efi/EFI/mageia/grubx64.efi« kann nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden. [root@cortex boot]# What's the output of "grep -i /boot/efi /etc/fstab" and "grep -i /boot/efi /proc/mounts"? Removing sysadmin-bugs from the cc list. CC:
sysadmin-bugs =>
(none) [root@cortex mer]# grep -i /boot/efi /etc/fstab UUID=2BAF-216B /boot/EFI vfat iocharset=utf8,umask=000 0 0 [root@cortex mer]# grep -i /boot/efi /proc/mounts /dev/nvme0n1p1 /boot/EFI vfat rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro 0 0 [root@cortex mer]# (In reply to Markus Mertens from comment #21) > I just re-added the link but it does not solve the problem. Now the > "missing" file grubx64.efi exists in the followeing two paths: > > /boot/efi/efi/mageia/ > /boot/EFI/efi/mageia/ > > But drakboot/grub2-install look in: > > /boot/efi/EFI/mageia/ > Because that's according to spec. the "second "efi" in path" _must_ be all caps so /boot/efi/EFI/mageia is correct (In reply to Markus Mertens from comment #24) > [root@cortex mer]# grep -i /boot/efi /etc/fstab > UUID=2BAF-216B /boot/EFI vfat iocharset=utf8,umask=000 0 0 > [root@cortex mer]# grep -i /boot/efi /proc/mounts > /dev/nvme0n1p1 /boot/EFI vfat > rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437, > iocharset=utf8,shortname=mixed,utf8,errors=remount-ro 0 0 > [root@cortex mer]# Change the fstab entry to UUID=2BAF-216B /boot/EFI vfat defaults,umask=000 0 0 then reboot This did not help. The system did not boot: [root@cortex boot]# journalctl | grep Unrecognized Apr 08 08:47:15 cortex kernel: FAT-fs (nvme0n1p1): Unrecognized mount option "default" or missing value [root@cortex boot]# It is also starnge that I cannot create the directory "efi/EFI" because it exists. But when I try to list its content I am told that it is not found: [root@cortex boot]# mkdir -p efi/EFI mkdir: das Verzeichnis „efi/EFI“ kann nicht angelegt werden: Die Datei existiert bereits [root@cortex boot]# ls efi/EFI ls: Zugriff auf 'efi/EFI' nicht möglich: Datei oder Verzeichnis nicht gefunden [root@cortex boot]# (In reply to Markus Mertens from comment #27) > It is also starnge that I cannot create the directory "efi/EFI" because it > exists. But when I try to list its content I am told that it is not found: This is because it is a FAT filesystem. The actual directory name is still a 8+3 character DOS filename, which is case insensitive. If you accessed that directory when running Windows, you could use either "efi" or "EFI". But for reasons I don't know, Linux only allows you to access it via the exact name you used when you created it. Try mv efi/efi efi/tmp mv efi/tmp efi/EFI CC:
(none) =>
mageia Great! This is working. Even after a reboot drakconf finds a configuration and can write a new one. (In reply to Markus Mertens from comment #27) > This did not help. The system did not boot: > > [root@cortex boot]# journalctl | grep Unrecognized > Apr 08 08:47:15 cortex kernel: FAT-fs (nvme0n1p1): Unrecognized mount option > "default" or missing value copy/paste UUID=2BAF-216B /boot/EFI vfat defaults,umask=000 0 0 Note that "default" is not the same as the above "defaults". The missing s matters. Glad it's working. I'm aware vfat uses case insensitive 8.3 names. I was thinking replacing "iocharset=utf8" with "defaults" would make the difference. Closing Resolution:
(none) =>
INVALID |