<SOLVED> sudo update-grub frozen?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Level 1
Level 1
Posts: 32
Joined: Sat Aug 15, 2015 12:06 am

<SOLVED> sudo update-grub frozen?

Post by SweetBearCub » Sun May 26, 2019 6:51 pm

Solved: When GParted finished applying operations, "sudo update-grub" appeared to finish. I ran it again, just to be sure, and rebooted to test. There appeared to be no issues.

LM 19.1, Cinnamon

Well this is new.

Today I decided to clean and repartition my data drive. It has no boot files, and is an entirely separate drive. So I unmounted it, and let GParted apply pending operations. This would take a few hours.

In the meantime, I got to reading a bit about some grub options, such as changing the resolution to make things easier to see, so I opened the required file, changed it, and stupidly, I issued "sudo update-grub", which promptly.. hung. For hours. I tried Ctrl+C, no effect.

Code: Select all

mathan@mathan-70A4001LUX:~$ xed admin:///etc/default/grub
mathan@mathan-70A4001LUX:~$ sudo update-grub
[sudo] password for mathan:         
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-50-generic
Found initrd image: /boot/initrd.img-4.15.0-50-generic
Found linux image: /boot/vmlinuz-4.15.0-48-generic
Found initrd image: /boot/initrd.img-4.15.0-48-generic
Found linux image: /boot/vmlinuz-4.15.0-20-generic
Found initrd image: /boot/initrd.img-4.15.0-20-generic
Now, even though the unmounted data drive isn't involved in the boot process at all, some after the fact research has revealed that even so, the update-grub process must be able to access it.

I did find a way to stop that at https://unix.stackexchange.com/question ... all-drives, by removing executable rights for os-prober, which I did, and that appears to have been successful.

However, my data drive is still being worked on, and sudo update-grub is still frozen/waiting.

How do I resolve this so that I don't seriously mess up my system?


Level 4
Level 4
Posts: 213
Joined: Mon May 27, 2019 6:57 pm
Location: here

Re: <SOLVED> sudo update-grub frozen?

Post by deck_luck » Fri May 31, 2019 6:07 pm

You can to send a sighup to the update-grub process in an attempt to terminate the process.

pkill --signal 1 update-grub

That is the number one not an alphabetic L. Some fonts you cannot tell the difference. If unsuccessful try sending a sigterm signal.

pkill --signal 15 update-grub

The signal argument is fifteen. I would refrain from using any other signal like six or nine. I could lead to an inconsistent grub and boot failure. If the sighup and sigterm signals are ineffective I would wait until the disk repartitioning completes and hopefully update-grub will move along. Most likely the disks partitioning has a lock on the device and the os-probe process is pending until the lock clears. Also, I would review the system logs in case some unexpected new hard disk error events are occurring. After all you are doing heavy disk i/o with the repartitioning. Use the journalctl command similar to the following:

journalctl -e

This will start at the bottom of the log, so you will see the most recent events and move backwards in to log using the "b" key to move back a page at a time.
💡Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime. ✝️

Post Reply

Return to “Newbie Questions”