You are not logged in.

#1 2023-01-03 02:24:52

Heisenberg32
Member
Registered: 2022-04-18
Posts: 23

[Solved] Issue with GRUB after W11 update

Hi everyone,
yesterday morning, I upgraded windows 11, after upgrade, GRUB broke. I show this screen: https://drive.google.com/file/d/1-1y3Q0 … sp=sharing. I try to reinstall GRUB by chroot. For the first time I try to reinstall with classic way (like this https://www.addictivetips.com/ubuntu-li … rch-linux/) but not worked. So I formatted EFI partition and reinstalled GRUB (I followed Arch Installation Guide steps) and I succeed to install GRUB but when I in GRUB menu, I show only Arch entry. When I boot Arch, after some minutes it doesn't boot and show this errors https://drive.google.com/file/d/1PPxUH7 … sp=sharing. I try another reinstall of GRUB and I notice that output of

grub-mkconfig -o /boot/grub/grub.cfg

is this https://drive.google.com/file/d/1kWMZBm … sp=sharing or https://drive.google.com/file/d/1RR3hYZ … sp=sharing. I think when I run grub-mkconfig, it doesn't detect any OS and doesn't create a GRUB entry correctly, so how to fix this?

Last edited by Heisenberg32 (2023-01-09 12:45:03)

Offline

#2 2023-01-03 03:05:12

kermit63
Member
Registered: 2018-07-04
Posts: 128

Re: [Solved] Issue with GRUB after W11 update

You formatted the EFI partition, thus resulting in a different UUID from the original. You need to reflect the new UUID in /etc/fstab/

Were you sharing the EFI partition with windows? If so, then the efi entry for windows was deleted when you formatted the efi partition, which will result in os-prober not finding the windows installation.

Offline

#3 2023-01-03 03:33:12

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,127

Re: [Solved] Issue with GRUB after W11 update

If you formatted your ESP you deleted everything on it (as well as changing its UUID). If shared with Windows, you deleted Windows's EFI binary. If you mount your ESP at /boot, you probably also deleted your kernel(s), initramfs(s) and, perhaps, microcode updates. If you don't mount the ESP at /boot (you have a separate boot partition or have boot on your root partition), those things should be intact. In that case, the grub configuration script should have found Linux, at least, unless you have a separate /boot partition and forgot to mount it (or, I guess, you didn't mount your root partition, but then arch-chroot would have failed).

If you forgot to mount a separate /boot partition, repeat the installation/configuration of grub with that mounted.

If you mount your ESP at /boot, mount it as usual and chroot. Then reinstall your kernel and microcode packages before configuring grub.


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

#4 2023-01-03 13:24:04

Heisenberg32
Member
Registered: 2022-04-18
Posts: 23

Re: [Solved] Issue with GRUB after W11 update

kermit63 wrote:

You formatted the EFI partition, thus resulting in a different UUID from the original. You need to reflect the new UUID in /etc/fstab/

Were you sharing the EFI partition with windows? If so, then the efi entry for windows was deleted when you formatted the efi partition, which will result in os-prober not finding the windows installation.

My pc is partitioned in this way: I have two nvme, the first nvme is parted between w11 (670GB) and arch (259.6GB).
In the specific, the first disc is parted so:

  • Windows recovery environment (529M)

  • EFI System (99M)

  • Microsoft reserved(16M)

  • Microsoft basic data (670G)

  • Windows recovery environment (699M)

  • Linux filesystem (259.6G)

  • Windows recovery environment (601M)

In the second nvme I have windows extension.
So, have to I edit the /etc/fstab/ file with new UUID?

Offline

#5 2023-01-03 13:35:33

d.ALT
Member
Registered: 2019-05-10
Posts: 631

Re: [Solved] Issue with GRUB after W11 update

Heisenberg32 wrote:

In the specific, the first disc is parted so:

  • EFI System (99M)

In the second nvme I have windows extension.
So, have to I edit the /etc/fstab/ file with new UUID?

Yes. That's your ESP. There, your PC's UEFI Firmware will look into in search of .efi executables (the (mounted) directory is /somewhere/somepath/EFI/ usually).


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#6 2023-01-03 14:10:02

Heisenberg32
Member
Registered: 2022-04-18
Posts: 23

Re: [Solved] Issue with GRUB after W11 update

cfr wrote:

If you formatted your ESP you deleted everything on it (as well as changing its UUID). If shared with Windows, you deleted Windows's EFI binary. If you mount your ESP at /boot, you probably also deleted your kernel(s), initramfs(s) and, perhaps, microcode updates. If you don't mount the ESP at /boot (you have a separate boot partition or have boot on your root partition), those things should be intact. In that case, the grub configuration script should have found Linux, at least, unless you have a separate /boot partition and forgot to mount it (or, I guess, you didn't mount your root partition, but then arch-chroot would have failed).

If you forgot to mount a separate /boot partition, repeat the installation/configuration of grub with that mounted.

If you mount your ESP at /boot, mount it as usual and chroot. Then reinstall your kernel and microcode packages before configuring grub.

I tell you what I did:

  1. I formatted the efi partition, the efi is fat32, flag esp and new state on (If I'm not mistaken, I have a gpt partition scheme).

  2. I mounted root partition into /mnt and efi partition into /mnt/boot/efi

  3. I generated the fstab file

  4. I ran arch-chroot /mnt

  5. I reinstalled intel-ucode, grub, efibootmgr and os-prober.

  6. I ran grub-install --target=x86_64-efi --efi-directory=/boot/efi/ --bootloader-id=GRUB and grub-mkconfig -o /boot/grub/grub.cfg (this last command generate the errors).

  7. I rebooted and I had the boot error

But one time, I try to reinstall linux package, with pacman, after chroot and before grub installation but I had same mistake (yes, after linux installation I ran mkinitcpio -P and worked).
I tried to restore snapshot, this snapshot was created before w11 update, from timeshift, but nothing, got the same error, arch didn't start.
When I reinstall kernel, do I use pacstrap or reinstall kernel packages with pacman?

Offline

#7 2023-01-03 19:10:48

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,127

Re: [Solved] Issue with GRUB after W11 update

Heisenberg32 wrote:

I tell you what I did:

  1. I formatted the efi partition, the efi is fat32, flag esp and new state on (If I'm not mistaken, I have a gpt partition scheme).

  2. I mounted root partition into /mnt and efi partition into /mnt/boot/efi

OK, so your /boot is on your root partition. So you won't have deleted the kernel, microcode or initramfs when you reformatted your ESP. smile

Heisenberg32 wrote:
  • I generated the fstab file

What is the contents of fstab now? What is the output of

lsblk -f

?


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

#8 2023-01-03 21:26:06

Heisenberg32
Member
Registered: 2022-04-18
Posts: 23

Re: [Solved] Issue with GRUB after W11 update

cfr wrote:

What is the contents of fstab now? What is the output of

This is my /etc/fstab file: https://drive.google.com/file/d/1FDFPcI … sp=sharing.
I noticed that fstab has root UUID in wrong partition, linux root is in /dev/nvme1n1p6 but in fstab it is in /dev/nvme1n1p5.

The output of lsblk -f is: https://drive.google.com/file/d/1mqP8Tq … sp=sharing.

And this https://drive.google.com/file/d/1yKjQb4 … sp=sharing is output of fdisk -l.

Perhaps, genfstab didn't work?

So guys, I succeeded to boot arch, the issue was fstab file. The root UUID was in the wrong partition so I simply changed /dev/nvme1n1p5 with /dev/nvme1n1p6 and it worked.

But now I have another problem, how to make w11 bootable?

Last edited by Heisenberg32 (2023-01-03 23:09:15)

Offline

#9 2023-01-08 19:08:29

walkingstickfan
Member
From: USA
Registered: 2021-05-10
Posts: 68

Re: [Solved] Issue with GRUB after W11 update

@Heisenberg32:  In the future, pipe the output of commands to a file and then copy and paste the contents of the file to a service like Pastebin and then use the Pastebin link in your post:

command > preferred-folder/filename.ext

Example from the commands you've referenced:

lsblk -f > ~/lsblk--output.txt

Last edited by walkingstickfan (2023-01-08 19:10:06)


Arch Linux with Openbox & Tint2

Offline

#10 2023-01-08 20:00:34

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 6,929
Website

Re: [Solved] Issue with GRUB after W11 update

Heisenberg32 wrote:

how to make w11 bootable?

I think the Windows 11 ISO images have an option for system repair, not sure though. Probably better to ask about this on a Windows forum.

Last edited by Head_on_a_Stick (2023-01-08 20:00:47)

Offline

#11 2023-01-09 12:44:31

Heisenberg32
Member
Registered: 2022-04-18
Posts: 23

Re: [Solved] Issue with GRUB after W11 update

walkingstickfan wrote:

@Heisenberg32:  In the future, pipe the output of commands to a file and then copy and paste the contents of the file to a service like Pastebin and then use the Pastebin link in your post:

command > preferred-folder/filename.ext

Example from the commands you've referenced:

lsblk -f > ~/lsblk--output.txt

Of course

Offline

#12 2023-01-09 15:09:27

Heisenberg32
Member
Registered: 2022-04-18
Posts: 23

Re: [Solved] Issue with GRUB after W11 update

Head_on_a_Stick wrote:
Heisenberg32 wrote:

how to make w11 bootable?

I think the Windows 11 ISO images have an option for system repair, not sure though. Probably better to ask about this on a Windows forum.

Yes, I solved my problem, I rebuilt the efi partition via Windows ISO, specifically I used this command:

chkdsk c: /r

c: is windows root. After that I followed Arch guide to install grub.

Offline

Board footer

Powered by FluxBB