Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Installation of Debian Buster hangs at "update-grub"

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Installation of Debian Buster hangs at "update-grub"

#1 Post by Thomas123 »

Hello there,

I tried to install the latest debian-testing-amd64, but the installation process hangs at 66% "Installing GRUB boot loader" with the text Running "update-grub".

I have tried both workarounds described here from January 2017:
https://bugs.debian.org/cgi-bin/bugrepo ... =853187#25

I.e. 1.:

Ctrl+Alt+F2 ... switching to a console and:

rm /target/etc/grub.d/30_os-prober

And 2.:

ps | grep 'dmsetup create'
kill xyz

The first one brings no results. And the second one brings the output, that the process with this PID does not exist. And if I run "ps | grep 'dmsetup create'" again ... the PID is indeed a different one.

What else can I do?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation of Debian Buster hangs at "update-grub"

#2 Post by p.H »

The dmsetup-related bug was fixed before the release of Stretch.
ps probably reported the ps command itself.

Note : rather than deleting /target/etc/grub.d/30_os-prober which belongs to the os-prober package, it is cleaner to disable os-prober in /target/etc/default/grub :

Code: Select all

GRUB_DISABLE_OS_PROBER=true
In my experience, hangs during execution of update-grub were due to oddities in existing installed systems detected by os-prober, and were worked-around successfully by disabling os-prober. Maybe more information in the installer log console ((Ctrl+)Alt+F4).

Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Re: Installation of Debian Buster hangs at "update-grub"

#3 Post by Thomas123 »

Thank you p.H. for your answer!

Yes, that might be "due to oddities in existing installed systems " ... I have 2 clones of my main system installed. Maybe this is a bit odd. 8)

Now, as I understand you, I need to edit /target/etc/default/grub so it has the line in it:

Code: Select all

GRUB_DISABLE_OS_PROBER=true
Can I do this during the installation process too?
Is there a vi-editor available at this point?

Or how would I go about this?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation of Debian Buster hangs at "update-grub"

#4 Post by p.H »

Thomas123 wrote:I have 2 clones of my main system installed. Maybe this is a bit odd
Yes, this is exactly the kind of troublesome situation which may confuse grub-mkconfig.
Thomas123 wrote:Can I do this during the installation process too?
I guess so. Same as rm.
Thomas123 wrote:Is there a vi-editor available at this point?
nano.

Of course you cannot edit the file before it is created, so you may need to wait until the hang, kill whatever process is hanging, edit the file and retry to install GRUB.

Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Re: Installation of Debian Buster hangs at "update-grub"

#5 Post by Thomas123 »

Thank you p.H. again!

Now, I managed to edit the /target/etc/default/grub at the question where to install grub. ... i.e. even before it hang.

But it sitll hang itself afterwards at the same old point: update-grub.

Ctrl+Alt+F4 showed a loop of messages:

Code: Select all

Reading package list

Building dependency tree

Reading state information

grub-common is already the newest version ........
This repeats many times and once in a while it shows this in between:

Code: Select all

main-menu [231] (process 2569): dpkg-divert: warning: diverting file '/sbin/start-stop-daemon' from an Essential package with rename is dangereous, use --norename
...

Then I didn't know, which process I was supposed to kill, because "top" didn't work.

...

So, I figured, I make my system a bit less odd by removing the second hard drive with the the 2 cloned systems from BIOS. Now it was only one simple system left. But still the same hanging.

This time I killed the above process with ID 2569. That led a menu with many options. I choose to proceed with the installation without installing grub. But after that it froze.

...

Is there a way to completely skip the grub installation process? And do it later by chrooting into the new system?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Installation of Debian Buster hangs at "update-grub"

#6 Post by Head_on_a_Stick »

Thomas123 wrote:Is there a way to completely skip the grub installation process?
Yes, that should be an option.
Thomas123 wrote:do it later by chrooting into the new system?
No need for a chroot, just mount the partition containing the /boot directory to /mnt in the "live" environment (or from the installer shell) and run this for a non-UEFI system:

Code: Select all

# grub-install --boot-directory=/mnt/boot /dev/sdX
For a UEFI system the EFI system partition must be mounted to /mnt:

Code: Select all

# grub-install --efi-directory=/mnt
Note though that the machine must be booted in UEFI mode for the NVRAM boot entry to be added, if this is not possible then add the --removable flag as well.

Debian has a grub-pc package for non-UEFI system and a grub-efi package for UEFI systems so make sure you use the right one.

If this works though you will have to either write a custom grub.cfg that loads the vmlinux & initramfs images via the root symlinks or install GRUB again from the working system otherwise any kernel updates will not be booted into because GRUB's configuration will not be updated.

EDIT: you can install Debian from a "live" ISO image by using the debootstrap command, here is a guide:

https://www.debian.org/releases/stretch ... 03.html.en
deadbang

Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Re: Installation of Debian Buster hangs at "update-grub"

#7 Post by Thomas123 »

Thank you very much Head_on_a_Stick!

That sounds very promising!

But how can I access the option to skip the grub installation?
The default process only asks me where to install grub, not if I want to skip it ... :-/

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Installation of Debian Buster hangs at "update-grub"

#8 Post by Head_on_a_Stick »

Thomas123 wrote:But how can I access the option to skip the grub installation?
IIRC, you just have to leave all of the checkboxes for the devices un-ticked and the installer then asks to confirm that GRUB is not to be installed.

I don't use the installer much though (I prefer debootstrap) so perhaps await the advice of @p.H, who knows the installer much better than me.
deadbang

Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Re: Installation of Debian Buster hangs at "update-grub"

#9 Post by Thomas123 »

Thanks again Head_on_a_Stick,

If I remember correctly, you are forced to choose one option and it is not possible to leave all unchecked.

I hope @p.H knows a way ...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation of Debian Buster hangs at "update-grub"

#10 Post by p.H »

Thomas123 wrote:Is there a way to completely skip the grub installation process? And do it later by chrooting into the new system?
Yes. At any time in the installation process, select "Go back" to display to the main menu. Or run the installer in expert mode. In the main menu, you'll find items such as :
Install the GRUB boot loader
Install the LILO grub loader
> Continue without boot loader <
Head_on_a_Stick wrote:No need for a chroot
You need to chroot into the new system to run update-grub and generate grub.cfg.
Head_on_a_Stick wrote:mount the partition containing the /boot directory to /mnt in the "live" environment
run this for a non-UEFI system

Code: Select all

grub-install --boot-directory=/mnt/boot /dev/sdX
If there is no separate /boot partition, you must mount the root (/) partition and run the above command.
If there is a separate /boot partition, you must mount the /boot partition and run the following command :

Code: Select all

grub-install --boot-directory=/mnt /dev/sdX
Head_on_a_Stick wrote:For a UEFI system the EFI system partition must be mounted to /mnt

Code: Select all

grub-install --efi-directory=/mnt
Incomplete. You must also mount the root or /boot partition and specify its path with the --boot-directory, like for a BIOS system. Otherwise, GRUB files will be installed in the default location /boot on the live/installer root filesystem.
I advise to mount the root or /boot partition on /mnt and mount the EFI partition on /mnt/boot/efi (if no separate /boot) or /mnt/efi (if separate /boot), then run

Code: Select all

grub-install --boot-directory=/mnt/boot --efi-directory=/mnt/boot/efi # if no separate /boot
grub-install --boot-directory=/mnt --efi-directory=/mnt/efi # if separate /boot

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Installation of Debian Buster hangs at "update-grub"

#11 Post by Head_on_a_Stick »

^ Yup, you're right, that was a crap post, sorry OP!
deadbang

Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Re: Installation of Debian Buster hangs at "update-grub"

#12 Post by Thomas123 »

Thank you p.H!

Yes, the "Go back" button worked!
I would not have guessed this, because I wanted to go forward and not back. But yes, it opens the menu and allowed me to skip the grub installation.

The system is running now!

Many thanks!

:-)

EDIT: Unfortunately I'm to dumb to find the "Solved"-Button. :-/ :shock:

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation of Debian Buster hangs at "update-grub"

#13 Post by p.H »

AFAIK there is no "solved" button. You have to edit the subject in the first post.
But this does not deserve a "solved", it is more a workaround than a solution. The real issue (GRUB installation hangs) has not been solved.

Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Re: Installation of Debian Buster hangs at "update-grub"

#14 Post by Thomas123 »

Ok, if you say so ... I understand.

Also interesting ... I don't know if you read it above:

At some point I had disabled my second HDD in BIOS, so my system became a pretty average one ... with one running Linux and the new one to be installed on a separate partition.

Because you had said the freeze was because of oddities.

But this didn't solve it either.

Yes, just wanted to mention this again.

But any ways ... many thanks for your help!
At least I got it running!
And beautifully so! :-)

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Installation of Debian Buster hangs at "update-grub"

#15 Post by p.H »

I wrote the freeze may be caused by oddities, as I have observed several times. But disabling os-prober without any effect proved me wrong. Also, the messages in the log console did not match.

Note that disabling the drive in the BIOS is not enough is most cases, as it just prevents the BIOS from detecting it but does not prevent the kernel to detect it. Only on one machine (Dell OptiPlex) I found that disabling a SATA port made the drive undetected by Linux.

Thomas123
Posts: 36
Joined: 2018-10-29 09:18

Re: Installation of Debian Buster hangs at "update-grub"

#16 Post by Thomas123 »

Oh ... interesting!

Again something new I learned here!

Thank you!

Post Reply