You are not logged in.
Pages: 1
I messed up my grub config by accident and now my system does not boot.
I then used an installation USB to repair it but it's not working and I'm sure I'm doing something wrong.
This is what I have done:
1. Boot with install USB.
2. Created a directory /mnt/restore.
3. Mount the old paritition where the grub.cfg is into /mnt/restore
4. Edited the /mnt/restore/etc/default/grub file
5. Tried to execute grub-config but it is a no go.
What am I doing wrong? I'm know I'm doing something basically wrong but I cannot see it.
Thanks.
Last edited by ralvez (2022-10-17 01:34:17)
Offline
mount all of your partitions, arch-chroot, then regenerate the config.
Offline
Oh! I see.
I thought that if I placed all the parititions in one /mnt/restore I would have everything I needed.
So I have to mount them as if it is a new install. Correct?
Thanks.
Offline
Oh! I see.
I thought that if I placed all the parititions in one /mnt/restore I would have everything I needed.
So I have to mount them as if it is a new install. Correct?
Yes. So if, say you normally have 2 partitions:
/
/boot/
you'd have
/mnt/restore/
/mnt/restore/boot/
and you'd do
arch-chroot /mnt/restore
before regenerating grub.cfg and reinstalling grub, if necessary.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
OK. I did that but ...
The new grub.conf was successfully created, however, the system does not find the boot configuration and
after it display "Grub Welcome", or something like that it goes into the BIOS asking me to setup a boot sequence.
Ideas?
Offline
I've followed this sequence but I cannot get things to work.
1. Boot with install USB.
2. Mount /dev/nvme0n1p3 to /mnt
3. Mount /dev/nvme0n1p5 to /mnt/efi
4. Mount /dev/nvme0n1p3 to /mnt/home
5. arch-chroot /mnt
6. grub-install --target=i386-pc /dev/nvme0n1
7. grub-makecfg -o /boot/grub/grub.cfg
I get no errors but upon re-boot I get the "Welcome to GRUB" for 2 secs. and then it goes into BIOS configuration
Am I missing something?
This is getting stressful ...
Thanks.
Last edited by ralvez (2022-10-17 00:07:15)
Offline
That's not how you install grub if you're booting UEFI. See https://wiki.archlinux.org/title/GRUB#UEFI_systems.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
@cfr,
Hi, I just realized my mistake.
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB fixed the problem.
Thank you all!
Offline
Pages: 1