grub update takes 20 minutes to complete
Hello,
I have a problem that nobody could help me so far. I posted this issue several times in the past but no one ever replied to my post. I hope someone could help me here or give me some tip how to trouble shot the problem. The problem is this: grub update takes 15 to 20 minutes to complete. Because I didn't know how to go about solving this issue I bought a new harddrive thinking the problem was the harddrive. But the new harddrive has the same issue. Currently, I have two harddrives, one SSD and one regular. On the SSD I have four partitions; on the regular one has 9 partitions. All Linux partitions. Currently, only four distros are installed, the rest of the partitions are empty. All fresh installs - one Manjaro and three archlinux. These are the partition setups: Code:
[mak@myhost ~]$ sudo fdisk -l /dev/sda Thank you. |
How are you updating grub ?.
|
Quote:
Code:
grub-mkconfig -o /boot/grub/grub.cfg |
That's a worry - I've heard of grub-install taking inordinate time (usually searching for a floppy drive), but not mkconfig.
It's just a script - maybe turn on some debug options "set -xv" |
Quote:
Here is the output: Code:
[mak@myhost ~]$ sudo grub-mkconfig -o /boot/grub/grub.cfg "set -xv" Code:
PID USER PR NI VIRT RES %CPU %MEM TIME+ S COMMAND |
Quote:
Maybe edit grub-mkconfig and at the very top include "set -xv"? (Remove this after you have run it). If it takes awhile to "find" it, that might the troublemaker whereis will show you where it is located Code:
whereis grub-mkconfig |
My Fedora doesn't have grub[2]-mount. I'll go fire up an x86 Arch system sometime.
Hmmm - I see several bugzilla entries for this. Looks like a os-prober issue. BTW I've never had this on any system - I use Arch a fair bit, but not Manjaro, and all (x86) machines have several different systems, Linux and Windows. Try pre-mounting all the system partitions and see if that helps. |
Quote:
Here is the output: Code:
[mak@myhost ~]$ sudo grub-mkconfig -o /boot/grub/grub.cfg |
Quote:
I've never had this problem before. It started developing a couple of months ago. |
Here are some new developments.
I unplugged the regular spinning harddrive and I made a grub update only with one harddrive (SSD) operational. The update was instantaneous. The update becomes painfully slow only when the second harddrive is plugged in. It seem there is some problem with the detection of the second harddrive. I also experimented by plugging the harddrives in different interfaces - my motherboard has 4 sata interfaces. When I did this and made a grub update, grub mixed up the partitions. I don't know this is normal. Look at the output below: Code:
[mak@myhost ~]$ sudo grub-mkconfig -o /boot/grub/grub.cfg |
I wonder if having two BIOS-boot partitions confuses things. I think UEFI for example insists there is only one EFI partition.
I would delete the unneeded one. As for the drive changing address when moved onto a different interface, that is normal. It depends on how the BIOS enumerates the drive order. |
Quote:
This set up worked for years without problem. I've never had any problem before. I like this set up because if something goes wrong with the grub installation I can always boot any distro from the second harddrive. I checked my bios. It shows the four sata interfaces like this: Sata 1 Sata 2 > shows my SSD harddrive Sata 3 Sata 4 > shows my regular harddrive But in fact the regular harddrive plugged in the Sata 1 interface in the motherboard - if we count the actual physical interfaces from left to right. If this is the case than, the SSD card is in the right position but the regular harddrive is not. I tried to move the regular harddrive to the first position but there is option for that. I don't know this has anything to do with the issue. |
tl;dr
my experience is that this happens when a) os-prober is installed b) i have unused & unformatted partitions os-prober seems to search the whole partition for some sign of some sort of bootloader, which apparently can take a very long time. |
Quote:
Thanks for the reply. I made more experiments, this time I unplugged the SSD harddrive and I found that the slowness affects only the regular harddrive. This is a brand new harddrive I just installed it yesterday. Both harddrive have 2 distributions installed on them. How is this possible? |
My thoughts..
a) Can you include the "time" log parameter when you "sudo grub-mkconfig -o /boot/grub/grub.cfg"?. A time marker will show where it stucks. b) Disconnect your PC from the WLAN/LAN (Internet) when you do it and inform if it is better. |
All times are GMT -5. The time now is 09:49 PM. |