0

I have been running ubuntu 18 on linode for about 6 months and just did "apt update" followed by "apt upgrade".

It asked me which grub file to use, for which I selected "keep current file" as this is what Linode say must be chosen (as they have some custom stuff in it).

However, now its asking :

            ┌───────────┤ Configuring grub-pc ├───────────┐
            │ GRUB install devices:                       │
            │                                             │
            │    [ ] /dev/sda (26575 MB; QEMU_HARDDISK)   │
            │    [ ] /dev/sdb (268 MB; QEMU_HARDDISK)     │
            │    [ ] /dev/sda (26575 MB; QEMU_HARDDISK)   │
            │                                             │
            │                                             │
            │                   <Ok>

I have no algorithm or knowledge of which one of the 3 I should chose. Ubuntu gets installed from a linode image. Googling shows most people who have this question have /sda and /sda1, and the advise is to chose sda, but I have sda twice and sdb.

Note, the server was locked out, so I only have console access right now, and console is blocked with this message so I cant ssh in to see what the partitions are. There is no option to get out of this window (no cancel or back).

Any help appreciated.

eos
  • 497
  • 3
  • 9
  • 25

2 Answers2

1

It looks like grub wants to know which is the boot device it should use. I think you should pick one of the sda options, probably the first one but they do look equivalent. Here's why:

From this linode community "Rescue and Rebuild" tutorial there are a Ubuntu disk and a 256MB swap partition that are very close to your Q:

enter image description here

So I don't think the swap partition would be the boot device, and it's probably not the right place to try installing grub.

Xen2050
  • 148
  • 7
  • Actualluy, when I checked the output, it did not work. I got this: – eos Sep 12 '18 at 22:31
  • That's unusual... there is the rest of the "Rescue and Rebuild tutorial" link to try, the problem sounds like more than just which device to pick – Xen2050 Sep 13 '18 at 03:12
0

You likely do have ssh access: During Ubuntu system upgrades a fail-safe instance is started on Port 1022. If this does help your figure out the correct choice,

Just confirm, without selecting any device. Whether you upgrade your boot loader or not does not matter so long as you do not intend to reboot.

You know this is a reasonably safe choice even if you do reboot before upgrading, because before the upgrade, you were able to boot. And after the upgrade, you are still providing grub configuration files compatible with grub 2.02 (that is what all supported Ubuntu versions use).

Now of course, apt did not ask about upgrading grub for nothing. There are quite a lot new bugfixes and safeguards in the recent releases. But you can deal with that after the rest of the installs are done, and you got your ssh access back.

The command to install grub manually to a disk /dev/sdX is

sudo grub-install /dev/sdX

You can do that as soon as the system is in a sane state again, after confirming which device is the correct one, but preferably before reboot.

anx
  • 6,875
  • 4
  • 22
  • 45