Having imaged an old MBR-based partitioned disk to a VHD and back to bare metal on a now UEFI, GPT-based NVME SSD, grup-update was complaining every time:
# update-grub Sourcing file `/etc/default/grub' Generating grub configuration file ... grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos1). grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos2). grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos3). grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos4).
<above 4 lines repeats 11 times>
/usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos1). /usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos2). /usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos3). /usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos4). <above 4 lines repeats 29 times> Found linux image: /boot/vmlinuz-6.17.0-22-generic Found initrd image: /boot/initrd.img-6.17.0-22-generic /usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos1). /usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos2). /usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos3). /usr/sbin/grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/nvme0n1,gpt2,msdos4).
<above 4 lines repeats 23 times>
And so on… and so forth…
The great, wise ChatGPT was convinced that this was the work of the devil and that the “Microsoft Reserved Partition” partition was without a “soul” (file system) and would need to be “cast out” (excluded) by grub-prober… And then went on to instruct me to “add the file system UUID” to my /etc/default/grub via the GRUB_OS_PROBER_SKIP_LIST="<UUID>@/dev/nvme0n1p2" line… Never mind it just told me there is no file system for the MSR partition (and therefore no file system UUID)…
Anyway, after some more digging via Google, I managed to figure out that what was needed was actually an “exorcism” (complete overwrite)… A sudo wipefs -a /dev/nvme0n1p2 or sudo dd if=/dev/zero of=/dev/nvme0n1p2 bs=512 count=10 would fix it…
Just remember to ensure it is a “Microsoft Reserved Partition”, and use the correct partition that is “possessed”:
sudo blkid -p -s PART_ENTRY_TYPE /dev/nvme0n1p2must show/dev/nvme0n1p2: PART_ENTRY_TYPE="e3c9e316-0b5c-4db8-817d-f92df00215ae", and/orsudo fdisk -l /dev/nvme0n1 -o Device,Type,Type-UUID | grep nvme0n1p2must show/dev/nvme0n1p2 Microsoft reserved E3C9E316-0B5C-4DB8-817D-F92DF00215AE
