You are not logged in.
Pages: 1
Hello,
Around a week ago I updated my DE to an unstable version by accident. It required me to boot into a live enviornment to fix, and somehow I ended up removing the ability for my system to boot at all (it was booting to a login screen prior to this). The symptoms were that I couldn't even get to a grub menu unless there was a bootable live usb. Once in grub I could get my computer to boot to my DE by using the following commands:
set root=(hd1,gpt2)
linux /boot/vmlinuz-linux root=/dev/nvme0n1p2 ro
initrd /boot/initramfs-linux.img
bootOnce in I reinstalled grub, regenerated my grub.cfg and examined the menuentry section of the config:
menuentry "Arch Linux" {
set root=(hd1,gpt2)
linux /boot/vmlinuz-linux root=/dev/nvme0n1p2 rw
initrd /boot/initramfs-linux.img
}However upon reboot the problem persists despite the cfg matching the commands I have to manually type in. I checked the boot order using
efibootmgr
BootCurrent: 000C
Timeout: 2 seconds
BootOrder: 0005,0006,0008,0009,000A,000C
Boot0000* Windows Boot Manager HD(1,GPT,18099d05-db94-48fe-bc61-bb53af44ff9a,0x800,0x32000)/\EFI\Microsoft\Boot\bootmgfw.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d000000030a0100000010000000040000007fff0400
Boot0001* GRUB HD(1,GPT,a5c6d7b8-0a4e-44b5-ab80-c517cf067857,0x800,0x100000)/\EFI\GRUB\grubx64.efi
Boot0003* Linux Boot Manager HD(1,GPT,dfd63952-16c2-4675-82dd-886d05e3aa07,0x800,0x100000)/\EFI\systemd\systemd-bootx64.efi
Boot0005* Diskette Drive BBS(Floppy,Diskette Drive,0x0)0000424f
Boot0006* M.2 PCIe SSD BBS(HD,Fanxiang S501 512GB ,0x0)0000424f
Boot0008* CD/DVD/CD-RW Drive BBS(CDROM,CD/DVD/CD-RW Drive,0x0)0000424f
Boot0009* Onboard NIC BBS(Network,IBA CL Slot 00FE v0110,0x0)0000424f
Boot000A* USB Storage Device BBS(USB,GENPLUS USB-MSDC DISK A 1.00,0x0)0000424f
Boot000C* UEFI: GENPLUS USB-MSDC DISK A 1.00, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(0,0)/HD(1,MBR,0x233ea223,0x1b2000,0x7800)0000424fI am by no means an expert and am a good few feet out of my depth, but I don't see grub in the BootOrder, however I haven't done anything to upset that so I don't know what I could've done to have changed that. I don't know how to manually change the boot order and to make that persist, any advice/explanation is appreciated as I have spent a lot of time on this.
One piece that I think may be of value is that grub will not boot unless there is a live usb present.
Also I apologize for any formatting errors, I don't use these forums that often, I will make any edits that are necessary.
Last edited by kuser (2024-08-17 21:08:56)
Offline
BootOrder: 0005,0006,0008,0009,000A,000CBoot0001* GRUBhttps://wiki.archlinux.org/title/Unifie … efibootmgr
You're currently simply using/booting the grub version on the USB key (I guess)
Offline
So a command like
sudo efibootmgr --bootorder 0001,0000,0003,0006,000A,000C,0008,0009,0005 --unicodewould permanently set the boot order until I change it?
Offline
You or anyone else, eg. is there a windows installation?
Offline
So a command like
sudo efibootmgr --bootorder 0001,0000,0003,0006,000A,000C,0008,0009,0005 --unicodewould permanently set the boot order until I change it?
Offline
Sorry, the message posted twice. There is no windows installation that I know of. I got the computer for free and swapped the SSD. I just tried rebooting and changing the boot order didn't seem to solve the issue, the boot order seemed to have reverted back to the original one.
Offline
Do you get access to the UEFI config ?
Can you alter the boot order there (see the note in the wiki)
Or can you trigger the boot selection w/ a shortcut like eg. F12 ?
Offline
Using F12 (the boot-menu button on my system) gives me the option to boot from my M.2 drive however when I try to it says that the boot failed and to reboot my device. I am pretty sure I can access the UEFI config, I just am trying to minimize the number of times I have to reboot my computer.
Offline
How *exactly* did you re-install grub?
https://wiki.archlinux.org/title/GRUB#Installation
Offline
sudo grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUBThen regenerated the conf
Offline
From the chroot? Was the ESP mounted into place?
Is the grub package itself corrupted?
pacman -Qikk grub # from the chroot, otherwise use --sysroot or --rootOffline
I reinstalled grub from a fully booted os. Despite my root partition being mounted as ro, it seems like the changes I make withing this environment persist. Running
pacman -Qikk --sysroot grubgives
error: config file grub/etc/pacman.conf could not be read: No such file or directoryand running
pacman -Qikk --root grubgives
error: failed to initialize alpm library:
(root: grub, dbpath: grub/var/lib/pacman/)
could not find or read directoryOffline
"man pacman", if you've not chrooted into the system, but mounted system and boot partition and ESP into /mnt, /mnt/boot etc.
pacman -Qikk --sysroot /mnt grubOffline
Can you try to explain to me what you think might be wrong on my system? I don't quite understand pasting in the commands.
Offline
https://man.archlinux.org/man/core/pacm … PLY_TO_-Q)
I want to know what grub version you've installed and whether there file deviations (ie. whether the package is corrupted)
Offline
I got this
ame : grub
Version : 2:2.12-2
Description : GNU GRand Unified Bootloader (2)
Architecture : x86_64
URL : https://www.gnu.org/software/grub/
Licenses : GPL-3.0-or-later
Groups : None
Provides : grub-common grub-bios grub-emu grub-efi-x86_64
Depends On : sh xz gettext device-mapper
Optional Deps : freetype2: For grub-mkfont usage [installed]
fuse3: For grub-mount usage [installed]
dosfstools: For grub-mkrescue FAT FS and EFI support [installed]
lzop: For grub-mkrescue LZO support
efibootmgr: For grub-install EFI support [installed]
libisoburn: Provides xorriso for generating grub rescue iso using
grub-mkrescue
os-prober: To detect other OSes when generating grub.cfg in BIOS
systems
mtools: For grub-mkrescue FAT FS support
Required By : None
Optional For : None
Conflicts With : grub-common grub-bios grub-emu grub-efi-x86_64 grub-legacy
Replaces : grub-common grub-bios grub-emu grub-efi-x86_64
Installed Size : 33.67 MiB
Packager : Christian Hesse <eworm@archlinux.org>
Build Date : Sat 16 Mar 2024 12:09:18 PM PDT
Install Date : Sat 17 Aug 2024 01:02:17 PM PDT
Install Reason : Explicitly installed
Install Script : Yes
Validated By : Signature
backup file: grub: /etc/default/grub (Modification time mismatch)
backup file: grub: /etc/default/grub (Size mismatch)
backup file: grub: /etc/default/grub (SHA256 checksum mismatch)
backup file: grub: /etc/grub.d/40_custom (Modification time mismatch)
backup file: grub: /etc/grub.d/40_custom (Size mismatch)
backup file: grub: /etc/grub.d/40_custom (SHA256 checksum mismatch)
grub: 1122 total files, 0 altered filesOffline
backup file: grub: /etc/grub.d/40_custom (Modification time mismatch)Why, what does it look like and do you use stuff like grub-customizer ?
Offline
I think the OP uses it for their posted Arch menuentry.
@OP: try https://wiki.archlinux.org/title/GRUB#D … _boot_path. That should allow Boot0006 to start GRUB.
Jin, Jîyan, Azadî
Offline
I have a custom grub interface, I assume that's what you mean by me using grub-customizer.
Offline
grub-customizer is a tool that allows you to break "customize" your grub.
To be clear about the pending problem, you still can enter grub, the problem is that either you're not gettign a menu or it has the wrong kind of entries and manually booting the system w/
set root=(hd1,gpt2)
linux /boot/vmlinuz-linux root=/dev/nvme0n1p2 ro
initrd /boot/initramfs-linux.img
bootstill works?
Edit: and please post that /etc/grub.d/40_custom
Last edited by seth (2024-08-24 06:51:47)
Offline
Hey, sorry for the inactivity, I was starting university.
So I catted out that file and I originally got this
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Arch Linux" {
set root=(hd0,gpt2)
linux /vmlinuz-linux root=/dev/nvme0n1p2 rw
initrd /initramfs-linux.img
}which I noticed wasn't quite correct so I switched it to what I set grub to be
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Arch Linux" {
set root=(hd1,gpt2)
linux /boot/vmlinuz-linux root=/dev/nvme0n1p2 rw
initrd /boot/initramfs-linux.img
}and same deal, going to be honest this must of popped up in a script I used at some point.
Note: I also tried this without the /boot before the linux files. That was how I found it so I wondered if it was just the set root line that was mistaken.
As to the clarification of my problem. As I understand it, my system has kicked grub out of the boot order and I don't know why or how to fix it (manually changing the boot order seems to not be a persistent change. My current setup is to use grub on a live USB to boot into grub, change the boot paramaters, then boot into my SSD. The process works, its just not ideal (especially during lectures).
Last edited by kuser (2024-09-06 03:29:24)
Offline
So you're relying on an external grub to boot the installed system - the problem isn't that your grub.cfg isn't accepted, the problem is that it's irrelevant.
What does "efibootmgr" print now?
What are the contents of the ESP (mount it somewhere and "ls -lR" the path)?
What are the contents of /boot (make sure to mount it and "ls -lR" the path)?
What exactly happens during the boot when you're *not* plugging the live USB?
What does your /boot/grub/grub.cfg look like (or the output of grub-mkconfig)?
Offline
my system has kicked grub out of the boot order and I don't know why or how to fix it
The link I provided in post #18 explains how to fix that.
Jin, Jîyan, Azadî
Offline
Pages: 1