2

I have a USB drive that I know is bootable (tested it on a different PC), but because of an ancient BIOS, I am unable to set it as a boot device in the BIOS settings.

The computer I am using has GRUB 0.97 installed, and I was thinking: Surely it must be possible to tell grub to just boot from said USB instead? If so, the questions are:

After loading the GRUB prompt (by hitting C in the bootloader selection), how do I see available devices to boot from? I have no idea what the USB registers as.

Note: Yes, the computer can read the USB fine once an OS is booted. Hopefully Grub is sophisticated enough to be able to do so as well

3

To search for your USB drive, use the root command to choose a drive/partition and the find command to see if you found the right one.

You can go through your devices like in this example:

grub> root (hd0,0)   # first harddrive, first partition
grub> find /[tab]    # type the slash then press [tab], and it will try to list files on this partition
Error 17: Cannot mount selected partition   # Oops no file system here
grub> root (hd0,1)   # first harddrive, second partition
grub> find /[tab]
    Possible files are: lost+found var etc media ...   # That was my hard drive with my linux install
grub> root (hd1,0)   # second hard drive usually is the USB drive if you have only one internal drive
grub> find /[tab]
    Possible files are: ldlinux.sys mydoc myfile mystick syslinux.cfg  # Bingo, that's the USB stick
    Note: If you have two internal drives including your CD/DVD drive, the USB drive probably is hd2,0 and so on.

Boot the drive by entering:

chainloader +1
boot

For convenience, add these commands to your GRUB configuration (usually in /boot/grub/menu.lst):

# to boot from a USB device
title    Boot USB drive
root     (hd1,0)
chainloader +1
boot

Source: BootFromUSB - ubuntu documentation

2
  • Cheers for a well written and detailed response! Will test tomorrow. – Jarmund Jul 6 '15 at 15:19
  • 1
    @Jarmund Kudos should go to the Ubuntu Documentation community; I've just copied the content from there, changed some verbal forms and reformatted to fit the styles here :-) – Wayfarer Jul 6 '15 at 15:56
0

Boot Live USB using grub from Internal Drive

I created a Live Ubuntu 19.10 USB using balenaEtcher.

I booted that Live USB by adding the following menuentry to my internal drive's grub menu:

menuentry "Ubuntu - flash drive" {
 search --set=root --fs-uuid xxxx-xx-xx-xx-xx-xx-xx
    set gfxpayload=keep
    linux   ($root)/casper/vmlinuz$casper_flavour  file=/cdrom/preseed/ubuntu.seed quiet splash  ---
    initrd  ($root)/casper/initrd$casper_flavour
}

Where xxxx-xx-xx-xx-xx-xx-xx is the UUID of the Live USB.

This method should work for any live or Persistent USB that boots ISO9660 files.

1
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places. – DavidPostill Mar 29 '20 at 7:53

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.