0

I want to hack around with booting from removable media, but ran into some problems. On one laptop, an HP Notebook - 17-by0062st, I am unable to get grub to even recognize a USB stick present in a default boot. That is to say, I let the machine boot normally from the internal hard drive and press 'c' before grub times out to enter the console. I type ls at the grub terminal and see

grub> ls
(hd0) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (cd0)

The hd0 item with 4 GPT partitions is the internal HDD and is always viewable. I am assuming the cd0 item is my optical drive. It always shows up in the output of ls, although no disk is in the drive. When I boot with a USB stick in a USB port, there is no additional item as I would expect. The orange light in the USB stick is on, so the motherboard has found it. The USB stick is in a valid state. I can mount it and view the files once I am in my ordinary GNU operating system. Additionally, on a different laptop (a Dell Latitude), the output of ls included entries for (hd1) (hd1,msdos1) and I was able to list the files with ls (hd1,msdos1)/ as expected.

This is an EFI laptop. The old Dell Latitude (that worked) is BIOS. Other than that, I don't know of anything else. Is there an obvious module I can import or a command I can run to get grub to probe for drives again, or something like that?

Thanks.

Edit/Update

So the plot has thickened. When I let the laptop boot normally directly into grub, the USB does not show up as described, however, if I press ESC as it powers on and go into the EFI boot menu and manually select grub, a USB device will be visible. I have verified this for two flash sticks and a WD My Book external HDD. It is almost like when you let it do the default boot sequence it is too fast or something like that, but everything is properly mapped if you go through the boot menu and grub understands where the drive is.

I'll leave this for another day or so in case anyone knows anything about this, but it may be a question I have to send specifically to the grub developers.

3
  • Do you have UEFI setting to turn on USB support, allow USB boot, or similar setting? Have you updated UEFI and if SSD updated SSD (not related to flash drive issue, though). HP Pavilion Gaming Laptop 15 -cx0049nr Disable Optane memory askubuntu.com/questions/1134503/… HP may have some other UEFI settings also "for security" to prevent boot from USB.
    – oldfred
    Nov 16 '20 at 19:59
  • See my update with a bit of a workaround hack @oldfred. I'm not sure if this means anything to you. Nov 16 '20 at 21:03
  • Do you have UEFI fast boot on. That is different than Windows fast start which is just hibernation. Fast boot assumes no system change and jumps immediately to boot default system. With normal boot, system scans hardware & updates info for operating system to use. You can normally get a regular boot with full power down and drain system. If laptop remove battery to help remove remembered settings.
    – oldfred
    Nov 16 '20 at 22:23
0

The problem seems to just be the buggy closed source EFI system. As described in my comments, I was able to get it recognized by going through the manual boot menu. Additionally, I poked around in the EFI configuration menu a bit and reset it to boot into grub as the first boot option and now it is reliably finding USB sticks and external drives in the grub console. To be honest, I am not sure what the actual solution was.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.