Grub can't boot a gpt external USB drive. Tells me device not found.
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You should probably load the ehci host controller interface module manually in the grub entries.
insmod ehci
xhci is used for USB3.0 but doesn't appear to be supported by grub2 yet. The ehci interface is older but many motherboards have a ehci compatibility mode for xhci controllers. Unfortunately many new motherboards are xhci only meaning there isn't any grub support.
This is only if you are actually booting from the disk. The OP is trying to boot from grub on sda. sdb in this case is just another disk. It doesn't need to have grub installed on it. If you have multiple disks you only need grub2 to be installed on one of them as grub2 can read partitions on other disks by searching for the UUID.
insmod ehci results in error message "(hd0,msdos1) not found".
I plugged the drive into a USB 2.0 port before I did this.
Same message though when plugged into a USB 3.0 port.
Maybe there is a bios setting that needs to be changed to be able to the usb?
At the grub prompt what us the output of ls?
From ubuntu post the output of blkid
Maybe there is a bios setting that needs to be changed to be able to the usb?
At the grub prompt what us the output of ls?
From ubuntu post the output of blkid
insmod ehci results in error message "(hd0,msdos1) not found".
I plugged the drive into a USB 2.0 port before I did this.
Same message though when plugged into a USB 3.0 port.
These are all very bad signs that you may have a newer xhci-only motherboard. Running lspci -k on Ubuntu will tell you what drivers Linux is using for all of the USB controllers on the MB.
Please run the following command from Ubuntu and post the results here.
Code:
$ lspci -k | grep "USB controller" -A2
When I do this on my 2011 Gigabyte Z68 I get the following:
Code:
$ lspci -k | grep "USB controller" -A2
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
Subsystem: Gigabyte Technology Co., Ltd Device 5006
Kernel driver in use: ehci-pci
--
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
Subsystem: Gigabyte Technology Co., Ltd Device 5006
Kernel driver in use: ehci-pci
--
05:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
Subsystem: Gigabyte Technology Co., Ltd Device 5007
Kernel driver in use: xhci_hcd
06:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
Subsystem: Gigabyte Technology Co., Ltd Device 5007
Kernel driver in use: xhci_hcd
As can be seen I have four USB Controllers, 2 USB2 which use ehci and 2 USB3 which use xhci. Linux can support either but grub2 doesn't support xhci. If all of your controllers use xhci this is why grub2 can't access them.
Also there is something strange. If your new external drive is GPT then why are all of the partitions listed as msdos ? They should be gpt1, gpt2 ... Do you have three or more drives ?
I think the drive is seen as fd0.
Gdisk /dev/sdb then look for msdos table I think will fix the problem
The OP posted the fdisk output for /dev/sdb in the first post. It is GPT. Also the size is listed at 3.7GiB which wouldn't of course fit in an MBR table.
I was quite surprised to see that you also have a Gigabyte MB. Your lspci listing of USB Controllers is very similar to mine. I rebooted and went into my BIOS. There is an option in the peripherals section for USB Legacy Function
I have this enabled and so should you. Your Gigabyte BIOS interface may be similar to mine. Go into your BIOS, search for this option and make sure it is enabled.
If it was disabled and you enabled it then try a USB3 port again.
If this fails then continue with the following.
You have two out of four USB controllers which use the ehci driver. You should try all of the USB2 ports with the ehci module loaded with insmod. Some of the USB2 ports may be controlled by xhci drivers as you found out but some must use ehci. Perhaps you just plugged the drive into the wrong USB2 port last time.
Code:
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
Subsystem: Gigabyte Technology Co., Ltd 7 Series/C216 Chipset Family USB Enhanced Host Controller
Kernel driver in use: ehci-pci
--
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
Subsystem: Gigabyte Technology Co., Ltd 7 Series/C216 Chipset Family USB Enhanced Host Controller
Kernel driver in use: ehci-pci
Last edited by tofino_surfer; 07-27-2019 at 11:49 AM.
sda is a msdos partition so maybe this isn't an uefi system, but an older bios system. Remove the questionable usb and see if the fdO goes away. It it does then for some reason or another grub see it as fd0. Doesn't grub get some it's info about drives from the bios? If so I suspect it has something to do with the protective mbr. Maybe creating a hybrid protective mbr using gdisk will solve the problem.
sda is a msdos partition so maybe this isn't an uefi system but an older bios system. Doesn't grub get some of the drive info from the bios? unplug the usb run ls at grub prompt and see if fd0 goes away. If so I suspect it has something to do with the protective mbr on the usb. Maybe using gdisk under recovery options to make a hybrid protective mbr will solve the problem.
Last edited by colorpurple21859; 07-27-2019 at 08:41 AM.
sda is a msdos partition so maybe this isn't an uefi system but an older bios system.
You obviously didn't read the first post. Yes this likely is a legacy BIOS system as grub is using linux and initrd instead of linuxefi and initrdefi. Also the OP said this was their first GPT drive meaning sda was msdos and they are using legacy BIOS. As well they made no attempt to create an ESP on the USB drive, just a way too large BIOS Boot partition (as 1 MB would suffice).
Quote:
Maybe using gdisk under recovery options to make a hybrid protective mbr will solve the problem.
First of all there is absolutely no problem using GPT with grub2 legacy BIOS. I have a BIOS/GPT system with legacy BIOS and all of my drives are formatted GPT with a regular protective MBR. grub2 sees all of them as GPT drives and I can boot from two of them. The other two are data drives.
A hybrid MBR doesn't work around the 2 TiB limit for MBR partitions. On an over-2 TiB disk, only GPT-aware OSes and utilities will be able to use the whole disk; anything that relies on the MBR side will be limited to 2 TiB of disk space.
Last edited by tofino_surfer; 07-27-2019 at 01:18 PM.
I want to thank everybody for trying to help me.
I haven't figured it out yet but I burnt some
grub rescue stuff to dvd and it was able to boot
the OS on the gpt drive so at least now I know
it is possible but as what it was doing printed
on the screen it went by so fast I couldn't see
what was being done. I've also done so much messing
around with boot stuff that I was unable to boot
any of my OSes until I used the grub rescue dvd.
I'm still examining and thinking about the situation.
I haven't figured it out yet but I burnt some grub rescue stuff to dvd and it was able to boot the OS on the gpt drive so at least now I know it is possible
Was the drive plugged into a USB3 port ? You were able to boot the OS on the USB drive so at least now you know it is possible. There is no problem with legacy BIOS and GPT. I have a BIOS/GPT system.
Quote:
I've also done so much messing around with boot stuff that I was unable to boot any of my OSes until I used the grub rescue dvd.
You shouldn't have done most of this. The only changes you should have made would be to the MX Linux stanza as well as trying some commands in the grub> shell.
Was the drive plugged into a USB3 port ? You were able to boot the OS on the USB drive so at least now you know it is possible. There is no problem with legacy BIOS and GPT. I have a BIOS/GPT system.
You shouldn't have done most of this. The only changes you should have made would be to the MX Linux stanza as well as trying some commands in the grub> shell.
I had the drive switched to a USB 2.0 port when the
grub rescue dvd booted it. It's still there.
From the rescue dvd I can get a list of systems it
sees to boot. I took a look to see what parameters
it would use for the gpt drive but annoyingly the
parameters are replaced by variables instead of
a clear view of what would actually be used. Foiled
again. I was going to write the parameters down
but variable names are meaningless except to the
dvd rescue grub.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.