You are not logged in.

#1 2023-10-21 15:44:23

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

[SOLVED] GRUB broken after updating win10

Hi all,
I own a desktop with a dual boot Arch / windows 10.
Using always Arch meant win was basically never used.
Yesterday i needed to installl the Adobe suite, I need specifically some of their features but to install them I had to update the windows 10 installation, which was very old (2018).
This process requires several reboots.
One of the reboots seemed to mess up grub: i obtained the error:

error: file '/grub/i386-pc/normal.mod' not found.

which brought me to the grub rescue shell.

Searching about this issue, I re-set the correct prefix and root (why has it been changed?) setting the right path to the boot partition, as suggested here.
Then GRUB menu appeared BUT I obtained the following set of errors:

ERROR: device 'UUID = XXXX' not found. Skipping fsck.

:: mounting 'UUID= XXXX' on real root

You are now being dropped into an emergency shell.

sh: can't access tty: job control turned off

[rootfs ]# 

I read here it might be a problem of the fstab file, buut how can I access it?
Tried to use the archiso image but i am unable to understand how.

Any suggestion?
i think it might be a very a noob problem, sorry...

It seems also very similar to this existing post...but i think it is not the same cause.

Last edited by virusso80 (2023-10-22 14:21:50)

Offline

#2 2023-10-21 17:17:48

SeagullFish
Member
Registered: 2023-08-10
Posts: 70

Re: [SOLVED] GRUB broken after updating win10

Hello. Sorry to hear what happened.

Your first error message is printed by GRUB itself. It tells you that GRUB is unable to find the file '/boot/grub/i386-pc/normal.mod'. There could be several possible reasons for this. However, a very usual cause is that GRUB is unable to find the partition where this file is stored.

Your second error message is most probably printed by your Linux OS, after GRUB has finished handing over the boot process to Linux. This message tells you that Linux is unable to find the partition specified.

By looking at both error messages in context, I suspect that MS Windows (for unknown reasons) changed the UUID of one of your partitions during the update. However, both GRUB and Linux is still looking for that partition by it's old UUID. More specifically:

  • Linux has the old UUID saved inside /etc/fstab, and usually several other files.

  • GRUB has the old UUID saved inside /boot/grub/grub.cfg

You could try the following command to see your current partition UUID's:

lsblk -io KNAME,TYPE,FSTYPE,UUID,MOUNTPOINT

By comparing the output to the contents of /etc/fstab and /boot/grub/grub.cfg, you may get a clue of which partition has been altered.

By experience, I don't recommend editing /etc/fstab and /boot/grub/grub.cfg to correct the error. Instead, I would suggest that you change the partition UUID back to what it was before. This post discusses how to do this for various partition types. (But please, before you do: Write down the UUID that MS Windows made, so that you can undo your changes later, in case MS Windows should fail to boot.)

If my suggestion is not the case, then I believe it will be somewhat hard to give you good advise without additional information about your hardware and configuration.

  • Is your computer equipped with UEFI, or does it have a BIOS?

  • The fact that grub is looking for a file inside the folder /boot/grub/i386-pc, leads me to assume that your computer runs a 32-bit system, and not a 64-bit system. Is this correct? (If wrong, then GRUB should be looking in a folder named something like 'x86_64' or 'x86_64-efi' instead.)

  • What kind of storage device do you have, and how is it partitioned? Additionally, does it have GPT partition table, or MBR partition table?

  • Maybe you happen to have more than one physical storage device?

Last edited by SeagullFish (2023-10-21 17:31:00)

Offline

#3 2023-10-21 23:05:00

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

Re: [SOLVED] GRUB broken after updating win10

SeagullFish wrote:

Hello. Sorry to hear what happened.

Your first error message is printed by GRUB itself. It tells you that GRUB is unable to find the file '/boot/grub/i386-pc/normal.mod'. There could be several possible reasons for this. However, a very usual cause is that GRUB is unable to find the partition where this file is stored.

Your second error message is most probably printed by your Linux OS, after GRUB has finished handing over the boot process to Linux. This message tells you that Linux is unable to find the partition specified.

By looking at both error messages in context, I suspect that MS Windows (for unknown reasons) changed the UUID of one of your partitions during the update. However, both GRUB and Linux is still looking for that partition by it's old UUID. More specifically:

  • Linux has the old UUID saved inside /etc/fstab, and usually several other files.

  • GRUB has the old UUID saved inside /boot/grub/grub.cfg

You could try the following command to see your current partition UUID's:

lsblk -io KNAME,TYPE,FSTYPE,UUID,MOUNTPOINT

By comparing the output to the contents of /etc/fstab and /boot/grub/grub.cfg, you may get a clue of which partition has been altered.

By experience, I don't recommend editing /etc/fstab and /boot/grub/grub.cfg to correct the error. Instead, I would suggest that you change the partition UUID back to what it was before. This post discusses how to do this for various partition types. (But please, before you do: Write down the UUID that MS Windows made, so that you can undo your changes later, in case MS Windows should fail to boot.)

If my suggestion is not the case, then I believe it will be somewhat hard to give you good advise without additional information about your hardware and configuration.

  • Is your computer equipped with UEFI, or does it have a BIOS?

  • The fact that grub is looking for a file inside the folder /boot/grub/i386-pc, leads me to assume that your computer runs a 32-bit system, and not a 64-bit system. Is this correct? (If wrong, then GRUB should be looking in a folder named something like 'x86_64' or 'x86_64-efi' instead.)

  • What kind of storage device do you have, and how is it partitioned? Additio#nally, does it have GPT partition table, or MBR partition table?

  • Maybe you happen to have more than one physical storage device?

Thanks a lot for the kind reply smile
Just to provide as many details as possible:
-- i have a dual boot desktop with arch (updated few weeks ago) and Win10, just updated sad
-- It is a dual drives system, 1 SSD with both OS and 1 2TB HD with two separated partitions, just containing files (photos, music, documents etc.)
please accept the image link...would avoid copying mistakes.
-- The system is 64-bit, both win and arch BUT I have just noticed boot is in legacy mode. maybe it is worth changing to UEFI.

The first problem (normal.mod not found) has been somehow fixed re-setting the root and prefix to the correct partition. however it is a temporal fix, each reboot needs the manual fix. I think I have to re-install grub, right (as suggested in the wiki here and here)?

However I tried to fix this using the live iso, but when I try to mount the root partition, with

root@archiso~# mount /dev/sda4 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error. 

do not understand what's happening sad

regarding the lsblk command, this is the output I obtain using the live usb iso (without mounting anything)

lsblk -io KNAME,TYPE,FSTYPE,UUID,MOUNTPOINT
NAME    TYPE    FSTYPE    UUID    MOUNTPOINT
loop0    loop    squashfs                        /run/archiso/airootfs
sda       disk    
sda1     part    ntfs    2075D5932C6A76D8
sda2     part    ntfs    78262BAA262B6878
sda3     part
sda4     part
sdb       disk
sdb1     part
sdb2     part
sdc       disk     iso9660            2023-10-14-06-59-02-00
sdc1     disk     iso9660            2023-10-14-06-59-02-00
sdc       disk     vfat.                  C838-6A88

Any idea?

Last edited by virusso80 (2023-10-22 08:54:36)

Offline

#4 2023-10-22 10:22:11

SeagullFish
Member
Registered: 2023-08-10
Posts: 70

Re: [SOLVED] GRUB broken after updating win10

virusso80 wrote:

The system is 64-bit, both win and arch BUT I have just noticed boot is in legacy mode. maybe it is worth changing to UEFI.

I’m not sure what difference this will make. I notice that both of your storage devices have MBR (msdos) partition tables. In my mind:

  • UEFI mode + GPT is ok. (Latest technology available, and my general recommendation unless your hardware has special requirements.)

  • UEFI mode + MBR could possibly work, although I have no experience.

  • Legacy mode + MBR should be ok.

  • Legacy mode + GPT is probably a bad idea! BIOS-es are not fully compatible with GPT partition tables.

virusso80 wrote:

The first problem (normal.mod not found) has been somehow fixed re-setting the root and prefix to the correct partition. however it is a temporal fix, each reboot needs the manual fix.[...]

This is why I suspected that your partition UUID’s could have been altered. Somewhere inside grub.cfg, you should be able to find content looking like this:

insmod msdos
insmod ext2
search --no-floppy --fs-uuid --set=root xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

The UUID specified here should match the actual UUID of the partition containing your boot directory. If this is the case, then I suspect that GRUB may not be the actual problem in your case. As long as GRUB is able to read the partition in question, GRUB will set the $root and $prefix values correctly.

virusso80 wrote:

However I tried to fix this using the live iso, but when I try to mount the root partition, with

root@archiso~# mount /dev/sda4 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda4, missing codepage or helper program, or other error. 

This error message is worrying! Additionally, your lsblk does not output neither UUID nor file system type for sda4. (I assume that you did not remove any information in your paste...?)
Actually, only sda1 and sda2 are provided with this information, both formatted with fstype ntfs. (Thus, they both seem to be in use by MS Windows, and not Linux.)

By putting all this information in context, I am afraid that MS Windows may have corrupted either your partitions or your partition table (or both). If this is the case, then I don’t know exactly how to repair this mess. Most certainly, it is not going to be an easy task. However, please note that I am not totally sure about any of this, and hopefully I may be wrong. I have never experienced a situation exactly like this before. Any comments reagarding this from other users on this forum will be REALLY much appreciated.

What’s even more alarming, is that the same issue also seems to apply for both sdb1 and sdb2 as well. If I get you right, these are the partitions where you store your important files and documents...?

By the way:

virusso80 wrote:
sdc       disk     iso9660            2023-10-14-06-59-02-00
sdc1     disk     iso9660            2023-10-14-06-59-02-00
sdc       disk     vfat.                  C838-6A88

Why does sdc occur twice?

Offline

#5 2023-10-22 14:20:02

virusso80
Member
From: Italy
Registered: 2007-03-09
Posts: 325

Re: [SOLVED] GRUB broken after updating win10

Thanks for the reply.

While waiting, since yesterday night I was looking for explanations and causes.
As you argued, I think this has been the problem:
- often new win major release corrupt MBR etc. this might have been the case, since grub was not finding anything anymore
- sdb2 is a partition containing some images that I was managing using lightroom. This ext4 filesystem has been mounted in windows10 using Ext2Fsd. MAYBE the unmount was not very clean when shutting down the system and I guess that corrupted the files

I am now back in my arch, with GRUB working...
this is what i did:
- in order to reinstall grub, i needed to fsck the root partition (dev/sda4). After fixing everything, using the iso, i was able to mount it and reinstall grub
- the system started but my sdb partitions were not mounted, maybe because of similar error messages. I tried to fscheck again and after a very long process, both partition were fixed. It seems I lost a couple of folders, but I had a recent backup, so not silly

don't know if I have (or I can) check if the sdb drive is health, or there are additional issues that might become problems in the future. Any suggestions?

in the meanwhile I am prepared to move my photos collection to the cloud...i think is the safest way to keep important data.

Wrote everything I did, since it might help others.
Thanks again

Offline

Board footer

Powered by FluxBB