SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Following a recent problematic patch my Opensuse Leap 15.2 system stalled during boot, then landed me at the grub prompt. So I booted to the rescue console and attempted to chroot to reinstall the bootloader.
I followed the instructions from the Opensuse docs here: [1].
My harddrive setup is (from lsblk):
From the openSuse console, run these commands at login prompt:
Code:
root
mount /dev/mapper/vgopensuse-root /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt$i; done
chroot /mnt
grub2-mkconfig -o /boot/efi/EFI/opensuse/grub.cfg
exit
for i in /run /sys /proc /dev/pts /dev; do umount /mnt$i; done
umount /mnt/boot/efi
umount /mnt
halt
NOTE:
If you want/need to reinstall grub, do it before the mkconfig step, but likely not needed.
Thanks. Followed your instructions. Error messages when running
Code:
grub2-mkconfig
Code:
/usr/bin/grub2-editenv: error: unknown filesystem.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.18-lp152.57-default
Found initrd image: /boot/initrd-5.3.18-lp152.57-default
/usr/sbin/grub2-probe: error: unknown filesystem.
Found linux image: /boot/vmlinuz-5.3.18-lp152.54-default
Found initrd image: /boot/initrd-5.3.18-lp152.54-default
Found linux image: /boot/vmlinuz-5.3.18-lp152.50-default
Found initrd image: /boot/initrd-5.3.18-lp152.50-default
/usr/bin/grub2-editenv: error: unknown filesystem.
done
However, I now see the Grub menu upon reboot, not the grub prompt. So some progress. However, when I try to boot any of the options I get the following:
Code:
Loading Linux 5.3.18-lp152.57-default ...
error: file '/boot/vmlinuz-5.3.18-lp152.57-default' not found.
Loading initial ramdisk
error: you need to load the kernel first.
Thanks. Followed your instructions. Error messages when running
Code:
grub2-mkconfig
I had OpenSUSE installed in the not so distant past, made an image of it's partition and the EFI partition, loaded both and found the name of the folder is "opensuse" in the EFI partition. So try again using the code in my previous post as the mkconfig step now has proper path identified.
You could also download the Leap 15.2 Net Install media and boot to the Rescue Console from THAT. Then, you would want to do all of the mount/chroot things PLUS build a new INITRD.
In other words, mount the file system(s) under /mnt then verify your disk info with lsblk. Once you have the details, do:
Code:
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
Now, check your /etc/fstab to ensure the details are correct. Edit if not. Then, you can move on to reconfiguring and reinstalling grub. Just be sure to build a new initial ramdisk which will have all of the correct modules baked in AND should point to the correct disk info for the kernel to load.
Thanks for various replies. I'll respond in order:
@colorpurple21859 Thanks, but insmod lvm was already included in the grub command, and it still fails.
@Brains Yes, I'd already spotted that, so the full command I ran was grub2-mkconfig -o /boot/efi/EFI/opensuse/grub.cfg. But as I posted, it ran with errors, and although I then got a Grub menu instead of a Grub prompt, the system still wouldn't boot.
@ember1205 Thanks, but as per my original post, I was already in a OpenSuse Leap 15.2 Rescue Console when I met my problem. I've also tried from the OpenSuse Leap 15.2 Live image. /etc/fstab is fine as far as I can see, and from within the chroot, mount -a runs with no problems.
I don't know whether the context for why I'm having to reinstall the bootloader would help? For some reason, the OpenSuse package team modified something that meant a number of systems automatically installed a preempt kernel (see, e.g., https://forums.opensuse.org/showthre...Kernel-preempt). I was totally oblivious to this and was just running normal updates. But upon next boot, the system threw up some weird error messages (and no, I didn't write them down!) and then hung. Upon restart I was at a Grub prompt. Hence the need to reinstall Grub, which for some reason keeps failing. Not sure if any of that is relevant.
From within the chroot, I have removed the preempt kernel using zypper.
Thanks for various replies. I'll respond in order:
@colorpurple21859 Thanks, but insmod lvm was already included in the grub command, and it still fails.
@Brains Yes, I'd already spotted that, so the full command I ran was grub2-mkconfig -o /boot/efi/EFI/opensuse/grub.cfg. But as I posted, it ran with errors, and although I then got a Grub menu instead of a Grub prompt, the system still wouldn't boot.
@ember1205 Thanks, but as per my original post, I was already in a OpenSuse Leap 15.2 Rescue Console when I met my problem. I've also tried from the OpenSuse Leap 15.2 Live image. /etc/fstab is fine as far as I can see, and from within the chroot, mount -a runs with no problems.
I don't know whether the context for why I'm having to reinstall the bootloader would help? For some reason, the OpenSuse package team modified something that meant a number of systems automatically installed a preempt kernel (see, e.g., https://forums.opensuse.org/showthre...Kernel-preempt). I was totally oblivious to this and was just running normal updates. But upon next boot, the system threw up some weird error messages (and no, I didn't write them down!) and then hung. Upon restart I was at a Grub prompt. Hence the need to reinstall Grub, which for some reason keeps failing. Not sure if any of that is relevant.
From within the chroot, I have removed the preempt kernel using zypper.
Any thoughts as to what I could try next?
Did you build a new initrd? When you do the "mount -a" from the rescue system, you have all of the relevant modules loaded. If there's a module missing from the initrd, that could be causing issues with being able to see the drive at boot time...
It looks like the problem occurs when grub2-install calls grub2-editenv. This is the output of grub2-editenv list -v:
Code:
grub2-editenv: info: cannot open `/boot/grub2/device.map': No such file or directory.grub2-editenv: info: changing current directory to /dev/mapper.
grub2-editenv: info: /dev/mapper/vgopensuse-root is not present.
grub2-editenv: info: /dev/nvme0n1p2 is not present.
grub2-editenv: info: Looking for /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1p2 starts from 1050624.
grub2-editenv: info: opening the device hostdisk//dev/nvme0n1.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Found array vgopensuse.
grub2-editenv: info: Inserting hostdisk//dev/nvme0n1 (+1050624,499066880) into vgopensuse (lvm)
.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: Partition 0 starts from 2048.
grub2-editenv: info: Partition 1 starts from 1050624.
grub2-editenv: info: changing current directory to /dev.
grub2-editenv: info: changing current directory to cpu.
grub2-editenv: info: changing current directory to 7.
grub2-editenv: info: changing current directory to 6.
grub2-editenv: info: changing current directory to 5.
grub2-editenv: info: changing current directory to 4.
grub2-editenv: info: changing current directory to 3.
grub2-editenv: info: changing current directory to 2.
grub2-editenv: info: changing current directory to 1.
grub2-editenv: info: changing current directory to 0.
grub2-editenv: info: changing current directory to snd.
grub2-editenv: info: changing current directory to by-path.
grub2-editenv: info: changing current directory to vfio.
grub2-editenv: info: changing current directory to mqueue.
grub2-editenv: info: changing current directory to hugepages.
grub2-editenv: info: changing current directory to usb.
grub2-editenv: info: changing current directory to vgopensuse.
grub2-editenv: info: changing current directory to dri.
grub2-editenv: info: changing current directory to by-path.
grub2-editenv: info: changing current directory to disk.
grub2-editenv: info: changing current directory to by-label.
grub2-editenv: info: changing current directory to by-uuid.
grub2-editenv: info: changing current directory to by-partlabel.
grub2-editenv: info: changing current directory to by-partuuid.
grub2-editenv: info: changing current directory to by-path.
grub2-editenv: info: changing current directory to by-id.
grub2-editenv: info: changing current directory to bus.
grub2-editenv: info: changing current directory to usb.
grub2-editenv: info: changing current directory to 007.
grub2-editenv: info: changing current directory to 006.
grub2-editenv: info: changing current directory to 005.
grub2-editenv: info: changing current directory to 004.
grub2-editenv: info: changing current directory to 003.
grub2-editenv: info: changing current directory to 002.
grub2-editenv: info: changing current directory to 001.
grub2-editenv: info: /dev/nvme0n1p2 is present.
grub2-editenv: info: Looking for /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1p2 starts from 1050624.
grub2-editenv: info: opening the device hostdisk//dev/nvme0n1.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Partition 0 starts from 2048.
grub2-editenv: info: Partition 1 starts from 1050624.
grub2-editenv: info: /dev/mapper/vgopensuse-root is not present.
grub2-editenv: info: /dev/nvme0n1p2 is present.
grub2-editenv: info: Looking for /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1p2 starts from 1050624.
grub2-editenv: info: opening the device hostdisk//dev/nvme0n1.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Partition 0 starts from 2048.
grub2-editenv: info: Partition 1 starts from 1050624.
grub2-editenv: info: changing current directory to /dev.
grub2-editenv: info: changing current directory to cpu.
grub2-editenv: info: changing current directory to 7.
grub2-editenv: info: changing current directory to 6.
grub2-editenv: info: changing current directory to 5.
grub2-editenv: info: changing current directory to 4.
grub2-editenv: info: changing current directory to 3.
grub2-editenv: info: changing current directory to 2.
grub2-editenv: info: changing current directory to 1.
grub2-editenv: info: changing current directory to 0.
grub2-editenv: info: changing current directory to snd.
grub2-editenv: info: changing current directory to by-path.
grub2-editenv: info: changing current directory to vfio.
grub2-editenv: info: changing current directory to mqueue.
grub2-editenv: info: changing current directory to hugepages.
grub2-editenv: info: changing current directory to usb.
grub2-editenv: info: changing current directory to vgopensuse.
grub2-editenv: info: changing current directory to dri.
grub2-editenv: info: changing current directory to by-path.
grub2-editenv: info: changing current directory to disk.
grub2-editenv: info: changing current directory to by-label.
grub2-editenv: info: changing current directory to by-uuid.
grub2-editenv: info: changing current directory to by-partlabel.
grub2-editenv: info: changing current directory to by-partuuid.
grub2-editenv: info: changing current directory to by-path.
grub2-editenv: info: changing current directory to by-id.
grub2-editenv: info: changing current directory to bus.
grub2-editenv: info: changing current directory to usb.
grub2-editenv: info: changing current directory to 007.
grub2-editenv: info: changing current directory to 006.
grub2-editenv: info: changing current directory to 005.
grub2-editenv: info: changing current directory to 004.
grub2-editenv: info: changing current directory to 003.
grub2-editenv: info: changing current directory to 002.
grub2-editenv: info: changing current directory to 001.
grub2-editenv: info: /dev/nvme0n1p2 is present.
grub2-editenv: info: Looking for /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1 is a parent of /dev/nvme0n1p2.
grub2-editenv: info: /dev/nvme0n1p2 starts from 1050624.
grub2-editenv: info: opening the device hostdisk//dev/nvme0n1.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: drive = 0.
grub2-editenv: info: the size of hostdisk//dev/nvme0n1 is 500118192.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid1x devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09 devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for mdraid09_be devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for dmraid_nv devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Scanning for ldm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: scanning hostdisk//dev/nvme0n1 for LDM.
grub2-editenv: info: no LDM signature found.
grub2-editenv: info: Scanning for lvm devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: no LVM signature found.
grub2-editenv: info: Scanning for DISKFILTER devices on disk hostdisk//dev/nvme0n1.
grub2-editenv: info: Partition 0 starts from 2048.
grub2-editenv: info: Partition 1 starts from 1050624.
grub2-editenv: info: /dev/mapper/vgopensuse-root is not present.
grub2-editenv: error: unknown filesystem.
Can anyone shed any light on what the problem here might be please?
grub2-mkconfig -o /boot/efi/EFI/opensuse/grub.cfg. But as I posted, it ran with errors
As I would expect. There is no such file /boot/efi/EFI/opensuse/grub.cfg in any normal openSUSE installation. The correct filename is /boot/grub2/grub.cfg. My question is what via ordinary updates caused the failing result observed. I'm not aware of anything special about a preempt kernel that could foul the boot process. It seems to me more likely the grub.cfg regeneration process during updates was corrupted or aborted. In attempting rescue, not executing mount -a after executing chroot /mnt, resulted in /dev/sdb1 not being mounted within the chroot environment. Just guessing, this could have resulted in writing a bad grub.cfg to a directory hidden whenever /dev/sdb1 is correctly mounted. This could be verified by unmounting /dev/sdb1 and learning whether /boot/efi/EFI/opensuse/grub.cfg exists. If this happens on next kernel update, please report this on the openSUSE Install/Boot/Login forum, or go directly to the openSUSE bug tracker to create a report.
A clue to learning what went wrong might be possible by searching through /var/log/pbl*.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.