Where does "grub update " get the swap partition uiid?

Where does "grub update " get the swap partition uiid?

Details: When using “grub update” to clean up the redundant item in the grub menu, I found the swap partition was changed into a wrong UIID. This wrong UIID belongs to a partition I don’t use under linux anymore and I formatted it under Win 10. So there is no partition in my computer with that UIID.
When booting, it says the hibernation device “UIID=…” not found, but this won’t be a issue since I can edit the grab.cfg back to the correct swap partition UIID.

I worry that everytime when linux update, “grab update” will change it into a wrong uiid.
I am curious since that is no partition with that uiid anymore, where did “grab update” find this old uiid?

My fstab file has the right UIID, and “grub update” won’t mess that up.


From you grub config file /etc/default/grub?

1 Like

the command is not grub update
it is
(unless I totally misunderstood something here)

this is a helper script, which calls:
grub-mkconfig -o /boot/grub/grub.cfg

is another script
which I didn’t analyze yet :wink:

I don’t think that script even reads /etc/fstab - much less is capable of changing it
or the UUID of any existing partition.

1 Like

Thank you so much. I rectified the culprit in the grub config file under /etc/default/grub. Now update-grub won’t add wrong uiid anymore.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.