Installation of Debian Buster hangs at "update-grub"

Help with issues regarding installation of Debian

Installation of Debian Buster hangs at "update-grub"

Postby Thomas123 » 2018-10-29 09:32

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?
Thomas123
 
Posts: 8
Joined: 2018-10-29 09:18

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

Postby p.H » 2018-10-29 09:56

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).
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

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

Postby Thomas123 » 2018-10-29 10:22

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?
Thomas123
 
Posts: 8
Joined: 2018-10-29 09:18

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

Postby p.H » 2018-10-29 10:37

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.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

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

Postby Thomas123 » 2018-10-29 12:58

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?
Thomas123
 
Posts: 8
Joined: 2018-10-29 09:18

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

Postby Head_on_a_Stick » 2018-10-29 13:35

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
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8169
Joined: 2014-06-01 17:46
Location: /dev/chair

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

Postby Thomas123 » 2018-10-29 13:43

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 ... :-/
Thomas123
 
Posts: 8
Joined: 2018-10-29 09:18

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

Postby Head_on_a_Stick » 2018-10-29 13:51

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.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8169
Joined: 2014-06-01 17:46
Location: /dev/chair

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

Postby Thomas123 » 2018-10-29 15:19

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 ...
Thomas123
 
Posts: 8
Joined: 2018-10-29 09:18

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

Postby p.H » 2018-10-30 12:38

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
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

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

Postby Head_on_a_Stick » 2018-10-30 17:51

^ Yup, you're right, that was a crap post, sorry OP!
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8169
Joined: 2014-06-01 17:46
Location: /dev/chair

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

Postby Thomas123 » 2018-10-30 18:37

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:
Thomas123
 
Posts: 8
Joined: 2018-10-29 09:18

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

Postby p.H » 2018-11-02 08:53

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.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

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

Postby Thomas123 » 2018-11-02 08:59

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! :-)
Thomas123
 
Posts: 8
Joined: 2018-10-29 09:18

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

Postby p.H » 2018-11-02 09:07

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.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable