I have two drives. The first has only one ext4 partition, which is used to store data. The second has seven partitions, including the EFI boot partition and four operating systems. For some reason, grub's console is detecting three drives:

grub> ls
(hd0) (hd1) (hd1,gpt1) (hd2) (hd2, gpt1) (hd2, gpt2) (hd2, gpt3) (hd2, gpt4) (hd2, gpt5) (hd2, gpt6) (hd2, gpt7)

Although grub's ls command is listing the drives "shifted" to the right (For example showing the real (hd1,gpt1) as (hd2,gpt1), the real (hd1,gpt2) as (hd2,gpt2), etc.), the menu entries in the grub.cfg are configured correctly, according to the real drives order:

set root='hd1,gpt2' #Part of Fedora's menu entry. Boots normally.
set root='hd1,gpt3' #Part of Slackware's menu entry. Boots normally. 
set root='hd1,gpt1' #Part of Windows 10 menu entry. Points to EFI Boot Partition and boots normally.

The only operating system that complains about the partition configured on grub.cfg is FreeBSD:

set root='hd1,gpt5' #Part of FreeBSD's menu entry. Causes an error.

Trying to boot FreeBSD throws this message:

../../grub-core/net/net.c:1547:disk not found

When I change the FreeBSD menu entry to hd2,gpt5, it tries to boot, but restarts the machine. I don't think that this behavior is related to this problem, though.

Why would grub display this "phantom" (hd0) drive? Where does it come from? Is possible to fix it?

PS: I've tested it, and this behavior occurs with two different instances of grub. One from Fedora and the other from Slackware. Booth instances are grub 2.04.

  • Do you have a flash drive plugged in, or a system with a small SSD for Windows hibernation file, often Intel RST or RAID originally. Post this sudo parted -l When I plug in an external drive which becomes sda, all my internal drives change up one. – oldfred Jan 23 at 19:35
  • @oldfred Yeah, when I noticed this issue, I was booting things through a simple flash drive. So I thought it could be that and unplugged everything, but it still occurs. I have no RAID or anything related to it. Parted, lsblk, blkid.. all those detect the only two existing drives, plus, in the case of Fedora, a zram loopback drive, which Fedora mounts for swap use. – Luís Gustavo Monezi Jan 23 at 21:00
  • DVD drive or memory card drive? Not sure what else. – oldfred Jan 23 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.