2

I am getting this titled error message and I'm hesitant to continue until I have specific knowledge of how to proceed.

This came during an update (not an upgrade) of my 24.04.1 machine that I was doing today, 2/6/24. I've done updates several times when they show up but this is the first time I've received this notification of “GRUB was previously installed to a disk that is no longer present”.

I know what it is, I monthly do a full clone of my drive onto another drive and I think this complaint of the update is about that. Why it's never shown up before I have no idea.

Anyway, what do I do? The threads I've read don't address my specific issue and I see no guidelines using terminal to tell the update to ignore or bypass or whatever. The cloned drive is dated 12/26/24 and is not attached and that's probably the drive that has the grub the update is looking for.

What do I do? I'll leave my computer on as long as it takes without completing the update install until I know for sure it won't harm it and make it hard to recover my current OS and files like I've had happen before with GRUB issues.

Right now I have a box labeled "Grub Install Devices" which shows the current drive but I don't want it to trash my GRUB until I know what happens when I click NEXT.

The terminal window labeled Software Updater is paused at "Setting up grub-efi-amd64 (2.12-1ubuntu7.1 ..."

It's about 85% complete with the update.

If I exit out of that, what happens? Click on NEXT on the GRUB install devices dialog box what happens? Anything bad? Or is it just going to update the GRUB with the newer HDD labels?

EDIT to add clues:

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/ce9dfa07-4c40-41da-a9b1-b3f2c6472075 / ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/6866-A652 /boot/efi vfat defaults 0 1
/swap.img   none    swap    sw  0   0
#/dev/disk/by-id/usb-Mass_Storage_Device_125D20140310-0:0 /mnt/usb-Mass_Storage_Device_125D20140310-0:0 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
lsblk -e 7 -f
NAME FSTYPE FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                   
├─sda1
│    vfat   FAT32                 6866-A652                                 1G     1% /boot/efi
└─sda2
     ext4   1.0                   ce9dfa07-4c40-41da-a9b1-b3f2c6472075  679.5G    21% /
sdb                                                                                   
├─sdb1
│    ntfs         System Reserved 9640D19E40D18601                                    
├─sdb2
│    ntfs                         DC12D33812D315FC                                    
└─sdb3
     ntfs                         CE12DFB912DFA52D                                    
sdc                                                                                   
sdd                                                                                   
sde                                                                                   
sdf                                                                                   
sdg                                             
blkid
/dev/sda2: UUID="ce9dfa07-4c40-41da-a9b1-b3f2c6472075" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="20595f60-8f95-40fc-9fea-a03188ca0978"
mook765
  • 18,764
Jim_HiTek
  • 341
  • You are installing the UEFI version of grub. Was install UEFI or BIOS before. Grub stores the ESP - efi system partition in fstab. And updates then use that partition to update grub. What does your fstab show? cat /etc/fstab Compare to lsblk -e 7 -f – oldfred Feb 07 '25 at 03:37
  • It looks like UUIDs match, or fstab has same UUID as sda's ESP. Not sure why it is then complaining. If you have good backups and an Ubuntu live installer to restore grub if necessary, I would go ahead. I have from inside my install, just run sudo grub-install and it works to reinstall grub in UEFI mode, using many defaults and ESP partition in fstab. – oldfred Feb 07 '25 at 17:17
  • Do I run the sudo grub-install before I click NEXT or afterwards? I do have a full clone backup but it's dated 12-26-24. OH! I have Free file sync. I'll run that on my 2nd backup USB drive. That'll save all my spreadsheet changes and other important changes. Duh. Should have thought of that myself. – Jim_HiTek Feb 07 '25 at 17:18
  • I would run it after, but if install finishes, it should not be required. Do you have a current version of Ubuntu on live installer USB flash drive to make repairs, if necessary? – oldfred Feb 07 '25 at 18:09
  • I do have Ubuntu 24.04.1 on a SD flash card. Having a bunch of trouble with FreeFileSync, just now unistalled it as I couldn't get back to default settings. I'll reinstall it or the newest one and try again. – Jim_HiTek Feb 07 '25 at 19:15
  • After the full backup, went to the "Grub Install Devices" dialog box, checked my current drive (only one listed) and the next page I did not check the offered option...and then it went into a loop going back to the current drives listings. So checked that one too, the install routine continued on, eventually getting to a reboot dialog, which I did. And everything seems to be fine after the reboot. Thanks for your help and advice oldfred. – Jim_HiTek Feb 07 '25 at 21:25

2 Answers2

0

Warning: dd command can be dangerous, if you do not know what you are doing. Try to avoid using of=.

Today I also got this grub message after an apt update && apt upgrade (no dist-upgrade). I wanted to make sure to install GRUB again on the correct device. To avoid any issues.

So you can examine the first 512 bytes of the device with the dd command and piped to strings.

For /dev/sda that would like this:

sudo dd bs=512 count=1 if=/dev/sda 2>/dev/null | strings

My result are:

ZRr=
`|f 
\|f1
GRUB
Geom
Hard Disk
Read
 Error

Now I know that GRUB was installed previously on /dev/sda. And selected /dev/sda again during the update.

  • The disk is UEFI on a gpt partitioned disk (ESP partition, no grub-bios partition). The first 512 bytes really contain nothing that will show up in the strings command. – ubfan1 May 27 '25 at 20:18
-1

Depends upon your situation. I just went through this on updates to installs on a disk that I don't boot from. I wouldn't care if it only updated (unused) files on that disk, but the problems occur when the boot order in nvram gets changed, and on my old machine, it's a chore to change back. I choose to uncheck both grub locations, accept the dire warning, and my update left my current boot situation alone (of course I ran update-grub on my boot system to pick up the new kernels).

If you really only have one boot disk, the update should correctly change your nvram, and I think you should accept the grub install to the current disk.

ubfan1
  • 19,234
  • The cloned drive is not plugged in and I only have one Ubuntu boot drive. I do have a Win10 bootable but the Ubuntu drive is selected as boot in BIOS. I'll wait for oldfred to check my newest post before I decide. As long as I don't tick NEXT I'm okay. – Jim_HiTek Feb 07 '25 at 16:59