Did not upgrade GRUB when updating Debian...

Following along with this tutorial to update my instance from Jessie to Stable, I thought I had changed the boot to GRUB2. Apparently, you need to reset the system for it to take hold. So, I'm sort of stuck with a half-upgraded machine… I've run $ sudo apt upgrade, which I'm guessing updated GRUB without asking me to keep/change the old config, but not the distribution upgrade.

Is there a way for me to fix the configuration before going forward? I still have LISH access to the machine even after a reboot.

Also, as a suggestion - make it so we have the option to automatically reboot when we change a boot setting in our dashboard. Getting an alert that a boot setting has changed made me think that the reboot was handled automatically.

1 Reply

I've come across a similar issue before and I think I might have something to help get you sorted out here.

It seems that the new version of Grub might have made some changes to the /etc/default/grub file. For future updates, we recommend choosing the option that leaves the current configuration in place. That will ensure that the Grub update does not overwrite any of the necessary settings that are in place.

The following steps should help when when choosing the first upgrade option given for Grub, which is likely the case here, as that option results in a change to the grub file. To start resolving this, run:

sudo update-grub

After that, you can take the following details and create a script to update your Grub configuration. You can use whatever text editor you prefer. I used nano in this case.

Create the file:

nano grubfix.sh

Add the following details and save:

#! /bin/bash

Configure GRUB
sed -i 's/^GRUB_TIMEOUT=./GRUB_TIMEOUT=10/' /etc/default/grub
sed -i 's/^GRUB_HIDDEN_TIMEOUT_QUIET=true/#GRUB_HIDDEN_TIMEOUT_QUIET=true/' /etc/default/grub
sed -i 's/^GRUB_CMDLINE_LINUX=./GRUB_CMDLINE_LINUX="console=ttyS0,19200n8 net.ifnames=0"/' /etc/default/grub
sed -i 's/^#GRUB_DISABLE_LINUX_UUID=.*/GRUB_DISABLE_LINUX_UUID=true/' /etc/default/grub
echo >> /etc/default/grub
echo '# Enable serial console for LISH' >> /etc/default/grub
echo 'GRUB_GFXPAYLOAD_LINUX=text' >> /etc/default/grub
echo 'GRUB_TERMINAL=serial' >> /etc/default/grub
echo 'GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1"' >> /etc/default/grub
update-grub
sed -i 's/,msdos1//g' /boot/grub/grub.cfg
sed -i 's/sda1/sda/g' /boot/grub/grub.cfg

Make the script exectuable:

sudo chmod +x grubfix.sh

Run the script:

./grubfix.sh

After that you should be all set.

Also, as a suggestion - make it so we have the option to automatically reboot when we change a boot setting in our dashboard. Getting an alert that a boot setting has changed made me think that the reboot was handled automatically.

Thanks for the suggestion. I've added this to our internal tracker so our Dev team can take a look and see if this is something we can add as a feature.

Thanks!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct