You are not logged in.
Pages: 1
Hi all! I've found myself in a tough spot after updating the system including grub. After updating, I ran grub-install and grub-mkconfig. But then, upon rebooting, I got the error: symbol 'grub_is_shim_lock_enabled' not found.
So I looked around and tried to move the grubx64.efi file to /boot/EFI/arch per https://bbs.archlinux.org/viewtopic.php?id=287024. But this just caused my arch install to disappear from the grub options at boot time.
Finally, I tried cleaning up the various boot folders and rerunning
grub-install --target=x86_64-efi --efi-directory=/boot --disable-shim-lock
grub-mkconfig -o /boot/grub/grub.cfg
But now I can't access grub and I just get pushed into my UEFI config menu when I boot. I have access to my installation through a live-usb and chroot. Here's the output of tree /boot:
/boot
├── EFI
│ └── GRUB
│ └── grubx64.efi
└── grub
├── fonts
│ └── unicode.pf2
├── grub.cfg
├── grubenv
├── locale
│ ├── ast.mo
│ ├── ca.mo
│ ├── da.mo
│ ├── de.mo
│ ├── de@hebrew.mo
│ ├── de_CH.mo
│ ├── en@arabic.mo
│ ├── en@cyrillic.mo
│ ├── en@greek.mo
│ ├── en@hebrew.mo
│ ├── en@piglatin.mo
│ ├── en@quot.mo
│ ├── eo.mo
│ ├── es.mo
│ ├── fi.mo
│ ├── fr.mo
│ ├── gl.mo
│ ├── he.mo
│ ├── hr.mo
│ ├── hu.mo
│ ├── id.mo
│ ├── it.mo
│ ├── ja.mo
│ ├── ka.mo
│ ├── ko.mo
│ ├── lg.mo
│ ├── lt.mo
│ ├── nb.mo
│ ├── nl.mo
│ ├── pa.mo
│ ├── pl.mo
│ ├── pt.mo
│ ├── pt_BR.mo
│ ├── ro.mo
│ ├── ru.mo
│ ├── sl.mo
│ ├── sr.mo
│ ├── sv.mo
│ ├── tr.mo
│ ├── uk.mo
│ ├── vi.mo
│ ├── zh_CN.mo
│ └── zh_TW.mo
├── themes
│ └── starfield
│ ├── COPYING.CC-BY-SA-3.0
│ ├── README
│ ├── blob_w.png
│ ├── boot_menu_c.png
│ ├── boot_menu_e.png
│ ├── boot_menu_n.png
│ ├── boot_menu_ne.png
│ ├── boot_menu_nw.png
│ ├── boot_menu_s.png
│ ├── boot_menu_se.png
│ ├── boot_menu_sw.png
│ ├── boot_menu_w.png
│ ├── dejavu_10.pf2
│ ├── dejavu_12.pf2
│ ├── dejavu_14.pf2
│ ├── dejavu_16.pf2
│ ├── dejavu_bold_14.pf2
│ ├── slider_c.png
│ ├── slider_n.png
│ ├── slider_s.png
│ ├── starfield.png
│ ├── terminal_box_c.png
│ ├── terminal_box_e.png
│ ├── terminal_box_n.png
│ ├── terminal_box_ne.png
│ ├── terminal_box_nw.png
│ ├── terminal_box_s.png
│ ├── terminal_box_se.png
│ ├── terminal_box_sw.png
│ ├── terminal_box_w.png
│ └── theme.txt
└── x86_64-efi
├── acpi.mod
├── adler32.mod
├── affs.mod
├── afs.mod
├── afsplitter.mod
├── ahci.mod
├── all_video.mod
├── aout.mod
├── appleldr.mod
├── archelp.mod
├── at_keyboard.mod
├── ata.mod
├── backtrace.mod
├── bfs.mod
├── bitmap.mod
├── bitmap_scale.mod
├── bli.mod
├── blocklist.mod
├── boot.mod
├── boottime.mod
├── bsd.mod
├── bswap_test.mod
├── btrfs.mod
├── bufio.mod
├── cacheinfo.mod
├── cat.mod
├── cbfs.mod
├── cbls.mod
├── cbmemc.mod
├── cbtable.mod
├── cbtime.mod
├── chain.mod
├── cmdline_cat_test.mod
├── cmp.mod
├── cmp_test.mod
├── command.lst
├── configfile.mod
├── core.efi
├── cpio.mod
├── cpio_be.mod
├── cpuid.mod
├── crc64.mod
├── crypto.lst
├── crypto.mod
├── cryptodisk.mod
├── cs5536.mod
├── ctz_test.mod
├── date.mod
├── datehook.mod
├── datetime.mod
├── disk.mod
├── diskfilter.mod
├── div.mod
├── div_test.mod
├── dm_nv.mod
├── echo.mod
├── efi_gop.mod
├── efi_uga.mod
├── efifwsetup.mod
├── efinet.mod
├── efitextmode.mod
├── ehci.mod
├── elf.mod
├── eval.mod
├── exfat.mod
├── exfctest.mod
├── ext2.mod
├── extcmd.mod
├── f2fs.mod
├── fat.mod
├── file.mod
├── fixvideo.mod
├── font.mod
├── fs.lst
├── fshelp.mod
├── functional_test.mod
├── gcry_arcfour.mod
├── gcry_blowfish.mod
├── gcry_camellia.mod
├── gcry_cast5.mod
├── gcry_crc.mod
├── gcry_des.mod
├── gcry_dsa.mod
├── gcry_idea.mod
├── gcry_md4.mod
├── gcry_md5.mod
├── gcry_rfc2268.mod
├── gcry_rijndael.mod
├── gcry_rmd160.mod
├── gcry_rsa.mod
├── gcry_seed.mod
├── gcry_serpent.mod
├── gcry_sha1.mod
├── gcry_sha256.mod
├── gcry_sha512.mod
├── gcry_tiger.mod
├── gcry_twofish.mod
├── gcry_whirlpool.mod
├── geli.mod
├── gettext.mod
├── gfxmenu.mod
├── gfxterm.mod
├── gfxterm_background.mod
├── gfxterm_menu.mod
├── gptsync.mod
├── grub.efi
├── gzio.mod
├── halt.mod
├── hashsum.mod
├── hdparm.mod
├── hello.mod
├── help.mod
├── hexdump.mod
├── hfs.mod
├── hfsplus.mod
├── hfspluscomp.mod
├── http.mod
├── iorw.mod
├── iso9660.mod
├── jfs.mod
├── jpeg.mod
├── json.mod
├── keylayouts.mod
├── keystatus.mod
├── ldm.mod
├── legacy_password_test.mod
├── legacycfg.mod
├── linux.mod
├── linux16.mod
├── loadbios.mod
├── loadenv.mod
├── loopback.mod
├── ls.mod
├── lsacpi.mod
├── lsefi.mod
├── lsefimmap.mod
├── lsefisystab.mod
├── lsmmap.mod
├── lspci.mod
├── lssal.mod
├── luks.mod
├── luks2.mod
├── lvm.mod
├── lzopio.mod
├── macbless.mod
├── macho.mod
├── mdraid09.mod
├── mdraid09_be.mod
├── mdraid1x.mod
├── memdisk.mod
├── memrw.mod
├── minicmd.mod
├── minix.mod
├── minix2.mod
├── minix2_be.mod
├── minix3.mod
├── minix3_be.mod
├── minix_be.mod
├── mmap.mod
├── moddep.lst
├── modinfo.sh
├── morse.mod
├── mpi.mod
├── msdospart.mod
├── mul_test.mod
├── multiboot.mod
├── multiboot2.mod
├── nativedisk.mod
├── net.mod
├── newc.mod
├── nilfs2.mod
├── normal.mod
├── ntfs.mod
├── ntfscomp.mod
├── odc.mod
├── offsetio.mod
├── ohci.mod
├── part_acorn.mod
├── part_amiga.mod
├── part_apple.mod
├── part_bsd.mod
├── part_dfly.mod
├── part_dvh.mod
├── part_gpt.mod
├── part_msdos.mod
├── part_plan.mod
├── part_sun.mod
├── part_sunpc.mod
├── partmap.lst
├── parttool.lst
├── parttool.mod
├── password.mod
├── password_pbkdf2.mod
├── pata.mod
├── pbkdf2.mod
├── pbkdf2_test.mod
├── pcidump.mod
├── pgp.mod
├── plainmount.mod
├── play.mod
├── png.mod
├── priority_queue.mod
├── probe.mod
├── procfs.mod
├── progress.mod
├── raid5rec.mod
├── raid6rec.mod
├── random.mod
├── rdmsr.mod
├── read.mod
├── reboot.mod
├── regexp.mod
├── reiserfs.mod
├── relocator.mod
├── romfs.mod
├── scsi.mod
├── search.mod
├── search_fs_file.mod
├── search_fs_uuid.mod
├── search_label.mod
├── serial.mod
├── setjmp.mod
├── setjmp_test.mod
├── setpci.mod
├── sfs.mod
├── shift_test.mod
├── signature_test.mod
├── sleep.mod
├── sleep_test.mod
├── smbios.mod
├── spkmodem.mod
├── squash4.mod
├── strtoull_test.mod
├── syslinuxcfg.mod
├── tar.mod
├── terminal.lst
├── terminal.mod
├── terminfo.mod
├── test.mod
├── test_blockarg.mod
├── testload.mod
├── testspeed.mod
├── tftp.mod
├── tga.mod
├── time.mod
├── tpm.mod
├── tr.mod
├── trig.mod
├── true.mod
├── udf.mod
├── ufs1.mod
├── ufs1_be.mod
├── ufs2.mod
├── uhci.mod
├── usb.mod
├── usb_keyboard.mod
├── usbms.mod
├── usbserial_common.mod
├── usbserial_ftdi.mod
├── usbserial_pl2303.mod
├── usbserial_usbdebug.mod
├── usbtest.mod
├── video.lst
├── video.mod
├── video_bochs.mod
├── video_cirrus.mod
├── video_colors.mod
├── video_fb.mod
├── videoinfo.mod
├── videotest.mod
├── videotest_checksum.mod
├── wrmsr.mod
├── xfs.mod
├── xnu.mod
├── xnu_uuid.mod
├── xnu_uuid_test.mod
├── xzio.mod
├── zfs.mod
├── zfscrypt.mod
├── zfsinfo.mod
└── zstd.mod
9 directories, 359 files
And the output of
efibootmgr --unicode
:
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0001,0002
Boot0001 Hard Drive BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)
Boot0002 USB KEY BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0b00)
Boot0003* UEFI: Lexar USB Flash Drive 1100 PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)/CDROM(1,0x21c4,0xa000)
Thanks a lot for your time!
Last edited by Musang (2024-09-30 17:31:32)
Offline
Did you have /boot mounted at the time. You appear to be missing your kernel images.
Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703
/ is the root of all problems.
Offline
Hi Roken, I made the changes to /boot while having it mounted to /mnt/boot.
I'm looking into kernel images, does it mean I'm missing a /boot/EFI/Linux directory with files I should be building with e.g. mkinitcpio? I didn't notice such files when I was still able to launch grub.
Last edited by Musang (2024-09-28 20:29:56)
Offline
well - in order to boot you need a kernel and an initrd - in a place specified by the grub.cfg on a FS that grub can load
but short: yes, it looks like you completely screwed up your boot stuff
simple way: wipe your ESP - make sure it's mounted to where you want it to - re-install kernel which will place the kernel in /boot and call mkinitcpio to create the initrd - then reinstall grub and create its config
as you can boot arch install and chroot into the system this should be done within a couple of minutes
Online
Thanks for your input cryptearth. I followed your advice:
- mounted root on /mnt
- mounted esp on /mnt/boot
- mounted using --rbind flag /proc, /sys, /dev, /run and /sys/firmware/efi/efivars on their respective /mnt mountpoints
- chroot into the system
- cd to /boot then rm -rf *
- run pacman -S linux
- run grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
- run grub-mkconfig -o /boot/grub/grub.cfg
- exit and reboot
Still no dice, I get the UEFI options menu and no GRUB upon boot...
Offline
- mounted using --rbind flag /proc, /sys, /dev, /run and /sys/firmware/efi/efivars on their respective /mnt mountpoints
boot an arch install media and use
arch-chroot
as seen in the install guide
the rest looks good to me
I would recommend to run a simple
efibootmgr
after exit from arch-chroot to see if the new boot entry was put in place correctly
as an alternative you can also try this:
grub-install --target=x86_64-efi --efi-directory=/boot --no-nvram --removable
this will install grub into <ESP>\EFI\BOOT\BOOTX64.EFI whithout adding an explicit boot entry - this should be picked up by your bios
also: check the guid with fdisk if it's set correctly to EFI system partition
also also: check for available bios updates for your motherboard on its vendors support site
Online
- mounted root on /mnt
- mounted esp on /mnt/boot
- mounted using --rbind flag /proc, /sys, /dev, /run and /sys/firmware/efi/efivars on their respective /mnt mountpoints
- chroot into the system
- cd to /boot then rm -rf *
- run pacman -S linux
- run grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
- run grub-mkconfig -o /boot/grub/grub.cfg
- exit and reboot
All you have done there is re-applied the same steps that you used originally, you haven't changed the configuration at all.
And please share actual, exact, full commands. Vague descriptions just confuse the situation. Thanks.
To follow crytearth's advice you should have chrooted in without mounting the ESP and reinstalled the kernel to the root partition then edited /etc/fstab to remove the /boot/ line.
Please share the content of /etc/fstab and the full output of
efibootmgr -u
parted --list
blkid
^ Those commands can be run from any live system.
Jin, Jîyan, Azadî
Offline
Thanks for the feedback Head_on_a_Stick, I mounted my system using:
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
mount -t proc /proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
mount --rbind /run /mnt/run
mount --rbind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
The content of /etc/fstab:
#
# Static information about the filesystems.
# See fstab(5) for details.
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2 | 256 GB Sandisk SSD | system in /
UUID=cace6e88-beaf-4ea6-ae68-24103fe13b7f / ext4 rw,relatime,data=ordered 0 1
# /dev/sda3 | 256 GB Sandisk SSD | data in /home
UUID=18b84e41-4b61-4067-9fe2-9c8766a57e0f /home ext4 rw,relatime,data=ordered 0 2
# /dev/sda1 | 256 GB Sandisk SSD | boot
UUID=63BD-A70F /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
# /dev/sdb2 | 2 TB Toshiba HDD | swap
UUID=3d905a3e-052e-4d14-9dd4-6f5b1b0eae29 none swap defaults 0 0
# /dev/sdb3 | 2 TB Toshiba HDD | data
UUID=1d2155bb-6bf5-4a0e-9979-26931e06eb13 /media/homeHDD ext4 defaults 0 0
# /dev/sdc1 | 2 TB Seagate HDD | backup of homeHDD
UUID=9a90abb4-63fb-479c-9f20-a67050936471 /media/homeHDD_backup ext4 defaults 0 0
# /dev/sdd1 | 1 TB Kingston SSD | Gaming Drive
UUID=63b5b24f-30d0-41ca-9c8a-6ac452afe920 /media/Gaming_Drive ext4 defaults 0 2
And the following outputs:
$efibootmgr -u
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,0001,0002
Boot0001 Hard Drive BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)
Boot0002 USB KEY BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0b00)
Boot0003* UEFI: Lexar USB Flash Drive 1100 PciRoot(0x0)/Pci(0x14,0x0)/USB(19,0)/CDROM(1,0x21c4,0xa000)
$ parted --list
Model: ATA SanDisk SDSSDHII (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 efiboot boot, esp
2 538MB 153GB 153GB ext4 /
3 154GB 240GB 86.2GB ext4 home
Model: ATA TOSHIBA HDWD120 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 efiboot boot, esp
2 539MB 17.7GB 17.2GB linux-swap(v1) Linux swap swap
3 17.7GB 1931GB 1913GB ext4 Linux filesystem
Model: ATA ST2000DM006-2DM1 (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 1976GB 1976GB ext4 Linux filesystem backup
Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sdd: 960GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 960GB 960GB ext4 Gaming_Drive
Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? I
Model: Lexar USB Flash Drive (scsi)
Disk /dev/sde: 32.1GB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:
Number Start End Size File system Name Flags
1 2048B 6143B 4096B Apple
2 4426kB 9669kB 5243kB EFI
$ blkid
/dev/sda1: UUID="63BD-A70F" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="efiboot" PARTUUID="57dbe7e0-02fe-493c-ad0f-549009fd5c81"
/dev/sda2: UUID="cace6e88-beaf-4ea6-ae68-24103fe13b7f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="/" PARTUUID="cf01192c-a7b3-40e5-a241-69555d35b149"
/dev/sda3: UUID="18b84e41-4b61-4067-9fe2-9c8766a57e0f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="home" PARTUUID="88cda01b-76a8-4df7-bc6f-6de93ddd165e"
/dev/sdb1: UUID="65CB-2A27" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="efiboot" PARTUUID="fc0445d0-cd4e-4640-8b74-a81bde66149a"
/dev/sdb3: UUID="1d2155bb-6bf5-4a0e-9979-26931e06eb13" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="fbb86dec-dbab-468a-9516-e2de5e33b6bf"
/dev/sdc1: UUID="9a90abb4-63fb-479c-9f20-a67050936471" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem backup" PARTUUID="c0eabd96-1c90-4ee9-a34b-6ca0dff8e3be"
/dev/sdd1: UUID="63b5b24f-30d0-41ca-9c8a-6ac452afe920" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Gaming_Drive" PARTUUID="573df9b6-54e3-4ef3-a2a8-906c2aad9eac"
/dev/sde1: BLOCK_SIZE="2048" UUID="2024-07-21-12-46-00-00" LABEL="Linux Mint 22 Cinnamon 64-bit" TYPE="iso9660" PARTUUID="712697c0-01"
/dev/sdb2: UUID="3d905a3e-052e-4d14-9dd4-6f5b1b0eae29" TYPE="swap" PARTLABEL="Linux swap" PARTUUID="f2220d46-a16f-46f6-a1d8-75c1c5bd0daf"
/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sde2: SEC_TYPE="msdos" UUID="669D-0308" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="712697c0-02"
/dev/sde3: LABEL="writable" UUID="f5df51ce-5000-40dd-b094-d1d931299dcd" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="712697c0-03"
Last edited by Musang (2024-09-29 10:12:20)
Offline
Hold on. You only have the USB stick marked as bootable. And I assume that's the live distro.
Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus B550-F Gaming MB, 128Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (2 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703
/ is the root of all problems.
Offline
Correct Roken, the Lexar USB stick is the live distro. Although I see the boot flag on my SSD and HDD efi partitions. Are you referring to the efibootmgr output?
Next I tried the same procedure on an arch installation medium using arch-chroot. The command
efibootmgr
did show a new boot entry. The result was the same: no GRUB on boot.
I also tried Head_on_a_Stick's suggestion of reinstalling the kernel without mounting the esp:
mount /dev/sda2 /mnt
mount -t proc /proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
mount --rbind /run /mnt/run
mount --rbind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
chroot /mnt
nano /etc/fstab
pacman -S linux
While in nano I commented out the line that starts with
UUID=63BD-A70F /boot/efi
After that, exit and reboot. Still no luck though...
Last edited by Musang (2024-09-29 12:02:09)
Offline
/etc/fstab says the ESP is usually mounted under /boot/efi/ so the kernel image should already be on the root partition.
Try
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi
Jin, Jîyan, Azadî
Offline
mount /dev/sda1 /mnt/boot
UUID=63BD-A70F /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
/dev/sda1: UUID="63BD-A70F" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="efiboot" PARTUUID="57dbe7e0-02fe-493c-ad0f-549009fd5c81" /dev/sdb1: UUID="65CB-2A27" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="efiboot" PARTUUID="fc0445d0-cd4e-4640-8b74-a81bde66149a" /dev/sde1: BLOCK_SIZE="2048" UUID="2024-07-21-12-46-00-00" LABEL="Linux Mint 22 Cinnamon 64-bit" TYPE="iso9660" PARTUUID="712697c0-01" /dev/sde2: SEC_TYPE="msdos" UUID="669D-0308" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="712697c0-02"
*popcorn smiley
mounting doesn't match fstab
multiple ESP
not using arch-chroot
*gone to The little things that make you go "grrr"
I highly suggest cleaning up all that mess and start over cleanly from scratch - this WILL bite you again in the future
Online
Thanks for the help, I will try my best to improve my setup T_T. Anyway, I tried
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi
The command completed succesfully. Still no GRUB on boot.
Last edited by Musang (2024-09-29 17:28:41)
Offline
Was a new NVRAM entry added for GRUB? Use the efibootmgr command to check.
The grub-install command's --removable option might help here.
Jin, Jîyan, Azadî
Offline
Running
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi
Does create an entry in the efibootmgr output:
Boot0000* arch HD(1,GPT,57dbe7e0-02fe-493c-ad0f-549009fd5c81,0x800,0x100000)/\EFI\arch\grubx64.efi)
Is this what you mean by an NVRAM entry?
I tried using the --removable flag. However, when I use the flag, I don't see a new entry in efibootmgr.
I tried:
grub-install --target=x86_64-efi --removable
Or, following the manual https://www.gnu.org/software/grub/manua … 02dinstall, supplying the --efi-directory and --boot-directory options:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot/efi/EFI/BOOT --removable
Also, I'm puzzled by the fact that the boot entries shown by
efibootmgr
don't seem to persist after reboot: When I reboot I have
- Boot0001 Hard Drive BBS
- Boot0002 USB KEY BBS
- Boot0003* UEFI: SanDisk PciRoot <--- The live usb
When I grub-install I get a new entry as I mentioned above, but this entry doesn't persist when I reboot and run
efibootmgr
. Whereas when I could get grub to launch I had persistent entries pointing to .efi files.
EDIT: Waaait, after running
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot/efi/EFI/BOOT --removable
I get booted into the grub shell...
EDIT2: So from the grub shell I ran
set root(hd0,gpt2)
linux /boot/vmlinuz-linux root=/dev/sda2
initrd /boot/initramfs-linux.img
boot
Aaand I managed to boot into my system
As cryptearth mentioned, this is kind of a fragile setup though, so when I reboot, I'm back into the grub shell and I have to run the above commands to get back into my system.
I tried running
grub-mkconfig -o /boot/grub/grub.cfg
To see if I could make these settings persistent, but that didn't do the trick.
I thought maybe since my fstab has the boot on /boot/efi, I should try
grub-mkconfig -o /boot/efi/grub/grub.cfg
But that gave me
/usr/bin/grub-mkconfig: line 270: /boot/efi/grub/grub.cfg.new: No such file or directory
Thanks for your patience and time so far!
Last edited by Musang (2024-09-29 19:50:39)
Offline
Don't use /boot/efi/EFI/BOOT/ as --boot-directory, that's just nonsense.
--efi-directory defaults to /boot/efi/ so that had no effect anyway
Run grub-install again but with --removable (which isn't supposed to create a new NVRAM entry but rather remove the need to rely on one) and without either --efi-directory or --boot-direcory. Then reboot to test.
Last edited by Head_on_a_Stick (2024-09-29 19:44:50)
Jin, Jîyan, Azadî
Offline
Don't use /boot/efi/EFI/BOOT/ as --boot-directory, that's just nonsense.
--efi-directory defaults to /boot/efi/ so that had no effect anyway
Yes, I wasn't making a very educated guess there...
So I wanted to try your suggestion, but my /boot/efi/ directory is now empty... I'm a bit puzzled by that. So running
grub-install --target=x86_64-efi --removable
outputs
grub-install: error: cannot find EFI directory.
Offline
Sounds like you forgot to mount it before using arch-chroot.
mount -a
^ That will mount everything listed in /etc/fstab.
Jin, Jîyan, Azadî
Offline
Hey, Head_on_a_Stick, indeed I didn't mount anything because I was logged into my system, but then I rebooted into the live USB then ran:
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
arch-chroot /mnt
grub-install --target=x86_64-efi --removable
And that restored my GRUB interface and booting options (tried rebooting afterwards too)! Thanks a lot, it's not the first time you've pulled me out of trouble.
So I guess I will mark this thread as [Solved], but before that, I welcome maybe some high-level feedback on how to tidy up my system, only if you feel so inclined
My first target would be the multiple ESPs, I guess. Thanks everyone!
Offline
/dev/sda1: UUID="63BD-A70F" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="efiboot" PARTUUID="57dbe7e0-02fe-493c-ad0f-549009fd5c81"
/dev/sda2: UUID="cace6e88-beaf-4ea6-ae68-24103fe13b7f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="/" PARTUUID="cf01192c-a7b3-40e5-a241-69555d35b149"
/dev/sda3: UUID="18b84e41-4b61-4067-9fe2-9c8766a57e0f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="home" PARTUUID="88cda01b-76a8-4df7-bc6f-6de93ddd165e"
/dev/sdb1: UUID="65CB-2A27" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="efiboot" PARTUUID="fc0445d0-cd4e-4640-8b74-a81bde66149a"
/dev/sdb2: UUID="3d905a3e-052e-4d14-9dd4-6f5b1b0eae29" TYPE="swap" PARTLABEL="Linux swap" PARTUUID="f2220d46-a16f-46f6-a1d8-75c1c5bd0daf"
/dev/sdb3: UUID="1d2155bb-6bf5-4a0e-9979-26931e06eb13" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="fbb86dec-dbab-468a-9516-e2de5e33b6bf"
/dev/sdc1: UUID="9a90abb4-63fb-479c-9f20-a67050936471" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem backup" PARTUUID="c0eabd96-1c90-4ee9-a34b-6ca0dff8e3be"
/dev/sdd1: UUID="63b5b24f-30d0-41ca-9c8a-6ac452afe920" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Gaming_Drive" PARTUUID="573df9b6-54e3-4ef3-a2a8-906c2aad9eac"
/dev/sde1: BLOCK_SIZE="2048" UUID="2024-07-21-12-46-00-00" LABEL="Linux Mint 22 Cinnamon 64-bit" TYPE="iso9660" PARTUUID="712697c0-01"
/dev/sde2: SEC_TYPE="msdos" UUID="669D-0308" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="712697c0-02"
/dev/sde3: LABEL="writable" UUID="f5df51ce-5000-40dd-b094-d1d931299dcd" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="712697c0-03"
/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
start by disconnecting any drive not required - as: there're at least 2 complete systems both with thier own esp - and sde type=cd looks strange?
are you booting from a mint22 install media?
grub-install --target=
just calling grub-install without providing additional paramters looks error prone - haven't tried but it will either fail or uses defaults not matching your setup
what's your motherboard model and current bios version?
overall something doesn't add up here - either a sever uefi bug hopefully fixable by a bios update - user error - or missing information like errors not mentioned
yes it can get tricky - I recently had issues with my laptop as it requires the option "usb legacy" to be enabled to find a usb boot medium - although its help text only mentions ps/2 compatibility for mouse and keyboard - but as long as there's a kernel and initramfs in a place where it can be loaded by a bootloader and the bootloader be at a place it can be loaded from uefi I don't see why your uefi doesn't recognize the installed grub - even with a missing config you should get at least the rescue console
//edit
if you have the space (looks like it): backup your data - wipe the drive - start from scratch
otherwise: get some external drive big enough - start from scratch
for your "backup": you should add something to not auto-mount that drive - otherwiese it's not really a backup if it's always mounted
Last edited by cryptearth (2024-09-29 21:41:08)
Online
Thanks for the thoughtful reply cryptearth, I will try to implement most of your suggestions, they sound quite sensible (the mounted backup especially is a good catch). Probably I will also try to restore my root system from scratch, I need the experience anyway.
Here's the info you asked for:
- Yes sde was a live linux mint flash drive (and the reason I was using chroot and not arch-chroot). The reason I was using a mint drive is that I wanted to copy-paste actual output from the shell to the forums here, so having a "batteries included" environment with firefox was a convenient way to do that.
- The motherboard is an MSI B250M PRO-VD (or MS-7A74). The bios I've seen referred-to as MSI Click BIOS 1 (says so on the interface), here's the technical details:
$ dmidecode | less
...
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: 1.30
Release Date: 02/03/2017
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 8 MB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 5.12
I will also check for a BIOS update. Thanks for your seasoned advice
Offline
unless it's a different board we might have a point here:
your dmidecode lists a version 1.30 fom 3rd feb 2017 - which msi doesn't list at its support page: https://www.msi.com/Motherboard/B250M-PRO-VD/support
msi lists a 1.2 from 6th dec 2016 and a 1.3 from 6th feb 2017 - so from whereever your bios comes - its not on msi own list
also: the latest is from 4th jul 2018 with 7 other versions in between - I strongly recommend to flash to latest as your current version seem to have some issues hopefully fixed in later versions
! IMPORTANT !
please DO read the notes BEFORE you do anything - messing up a bios update can turn your system into a paper weight
care should be taken when considering skipping versions - sometimes you can't flash to the newest version directly but have to flash intermediate versions
although these days flashing a new firmware isn't that big of a deal it's still a modification of the most basic system the hardware relies on - TAKE CARE - read TWICE or THREE TIMES and ASK if ANY questions come up
fortunately I was spared from any issues, yet - but I heard and read stories from others ending up with a 2.000 buck paper weight because they messed something up
as your current version doesn'T show up in the list I recommend contact msi support before trying anything and have them verify your motherboards serial number (can be found on the board itself or in bios - maybe dmidecode can find it) - only msi can tell for sure if what I linked is actually the correct page for your system or if your system is something different - maybe they give a hint where your current version might come from
fun fact: I could find any version 1.30 from 3rd feb 2017 on ANY of the MSI b250 boards - you really should msi ask first - this doesn't look good
if you get green light from msi I would first flash the 1.3 from 6th feb 2017 to get in line with the versions in the list - and then from there onward
when troubleshooting an OS you should always use its own tools - when you deal with vanilla arch - please use a vanilla arch install media and take the official install guide as a reference - otherwise you may risk your thread gets closed with a link to the rules: https://bbs.archlinux.org/misc.php?action=rules - people here expect you to follow these base rules - as that's the only common point - when using different or out-of-date stuff without mention the results come up confusing as the actual result doesn't match the expected (as with my "please use arch-chroot as mentioned in the insall guide" - although I'm not sure if this does make any difference)
Online
Hey cryptearth, that's some good info and food for thought... I was thinking of upgrading my motherboard for other reasons anyway so I might skip the firmware upgrade... Or I might do it just for science on backup hardware. I'll try to get feedback from MSI like you suggested. That's intriguing what you mentioned about the mystery version. Your comment on the 2000$ paperweight caught my attention though, surely in the worst case only the motherboard would be bricked and you'd have to change it plus reconfigure the system not throwaway the whole computer? Or maybe the faulty motherboard fried the other components (spooky!)?
Regarding the non-arch tools, I do take the rules to heart, but in this specific case of unbootable system + the imperative of posting actual shell output in the forums, it seemed to me like a compromise. I don't know maybe you have better ideas? Like a custom arch install media with firefox setup on it (wouldn't be vanilla anymore though)? Thanks for the feedback as always.
Last edited by Musang (2024-10-01 22:39:15)
Offline
Pages: 1