1

GRUB seems to freeze whenever my 2 TB external hard drive (WD My Book) is connected. Connecting it while GRUB is loading does the same thing, but doing it afterwards or not at all will let my computer boot normally. My guess is that GRUB thinks the device is carrying a boot loader and/or an operating system, and then hangs when trying to identify it. I should also mention that this wasn't an issue before, and it came to me as a surprise when I suddenly wasn't able to turn on my computer.

What I've tried so far:

  • Reinstalling GRUB
  • Disabling USB support in my motherboard settings (worked, but I wasn't able to use my keyboard to navigate GRUB)
  • Connecting the drive to a different USB port
  • Google

Can I make GRUB completely ignore the drive? Any other ideas on what I could try?

2 Answers 2

0

GrUB will write code and data to some devices which will utterly confuse some BIOS USB code. The only thing I found which will make some of my systems not freeze is to format the first partition (e.g., /dev/sdb1) as VFAT (intending it to be used for GrUB boot. And that doesn't work for all of them, but it seems to help with some. I mean, if you don't do that, not even the power button will get you out of this, you have to hold the power button in or yank the power cord, it's that far "gone."

Sorry noone has answered until now, but as I think you've found, unless you want to reformat your (USB) storage (and all the things you lose with FAT compared to ext3 or others) you'll have to disconnect the drive during boot, whether that's physically yanking the cable or as you have done ignoring USB in BIOS. I post this here so that others might have something to try if they are facing the same problem. What tipped me off is that when I asked interactively to select the boot device, it said something like "USB USB-FDD". Floppies are usually formatted FAT so I thought I'd try it. This is a flash drive with an MSDOS partition table and as mentioned a FAT first partition (about 150MB, enough for GrUB 2 and a kernel/initrd). The balance of this 16G drive is ext3.

0

Got this grub freeze issue in 2020

Tried these

grub2 hangs / freezes when external USB hard drive is connected

GRUB freezes if external hard drive is connected. Can I simply make it invisible to GRUB? (this page)

Even I had clear external disk first partition (dd if=/dev/zero of=/dev/sda1=[EFI part]) and clear all boot etc flags from this partition, still grub was getting freezed and I tried grub with some debug flag set but did not get any solution.

As a work around I was booting system with external harddisk removed, then later I attach it after system booted.

In between 2021-22, in a different system I got struck with another efi related issue

Could not prepare Boot variable: No space left on device grub-install: error: efibootmgr failed to register the boot entry: Input/output error UEFI problem: Could not prepare boot variable: No space left on device / Installation / Arch Linux Forums efibootmgr: Could not prepare Boot variable: No space left on device SOLVED - How to restore UEFI entries with efibootmgr

Which I got solved via https://bbs.archlinux.org/viewtopic.php?pid=1591882#p1591882

  rm /sys/firmware/efi/efivars/*

and

 sudo efibootmgr -v

Yesterday again I started searching for the solution of grub freeze, and found this page again followed advice making first partition to FAT also I tried dd if=zero of=first_partion and removing all flags but it did not helped.

Not sure somewhere while searching solution to this issue, I seen reference of efi issue and finally recalled that earlier I was using present external device as my main internal device, and was booting linux from that then later I bought SSD and replaced SSD in place of this HDD and moved this HDD in caddy

then thought earlier reference this HDD will be in efi somewhere and now same device changed its location from internal to external may be confusing grub

then I again followed


  efibootmgr -v
  rm /sys/firmware/efi/efivars/*
  efibootmgr -v

Here all entried are cleared

and then

Reinstalled grub in EFI then again

  efibootmgr -v

Here seeing only one entry

Now rebooted, found that this issue is fixed

May be this case could be reproduced with Virtual Machine first make a disk as internal the replace it with other disk and change that first disk to external

which may could help grub to add fix to handle this kind of situation.

Thanks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .