My friend's laptop was in a car accident (he's fine!). However the laptop is very old its an Acer Aspire 1520 the CD-rom drive is broken and there is no floppy drive.

I made him a USB boot before I took a look at it and found that his BIOS cannot boot from USB. The only thing I have is a GRUB console but he is keen to just install XP (on USB) and use it just for Movies.

Is it possible using the GRUB console to get access to the USB and start the windows install? It's a tall order but I think this may be the way, or trying to install via LAN which I don't think will be achievable.

  • 2
    I would try to get a USB cd/dvd drive and work on getting the computer to boot to that.
    – jmreicha
    Oct 23, 2011 at 15:34
  • 1
    This post shows the manual commands required - you just need to find out the drive number, which can be accomplished with GRUB's tab completion.
    – new123456
    Oct 23, 2011 at 15:38
  • When you say "he is fine", is it your friend or the computer?
    – Quidam
    Apr 26, 2020 at 14:32

6 Answers 6


Here is a quick example of grub commands that might just work, explanations and caveats below.


Most likely for post-2010 installs.

set root=(hd1,1)
chainloader +1


Most likely for pre-2005 installs.

root (hd1,0)
chainloader +1

For the 2005-2010 period, your guess is as good as mine, but if you use the command for the wrong version, you only get a harmless syntax error on the first command.

Choosing the right root

At startup, grub will probe for your devices and assign numbers to them. All devices that are partitioned (hard disks and flash drives) will also have numbers assigned. The format is (<deviceName>,<partitionIndex>). In grub2, partition indexes changed, so the two examples above have the same effect despite looking to use different roots.

Your first device (hd0) is whichever device grub just loaded from. After that, you can usually assume that all the internal devices will come before your external devices. They will most likely be in the form of hd and a number.

After the comma is the partition index. Hard disks and thumb drives will almost always be partitioned, so you must choose the right (and most likely only) partition. CD-ROMs are usually not partitioned.

More documentation: http://www.gnu.org/software/grub/manual/html_node/Device-syntax.html

When choosing your root partition, you can use the Tab key to probe for device names and partition indexes. Just open parenthesis and start pressing Tab to see the list. Alternatively, newer versions provide the ls or find command.

  • 8
    It is also possible to use set root=(hd1) (etc.) to boot from the entire device, if it is not partitioned, e.g. a bootable USB drive. Mar 27, 2016 at 20:21
  • 7
    Just to add, you can do ls to see the list of devices connected.
    – AntouanK
    Dec 30, 2016 at 18:27
  • 2
    I know stack exchange discourages thank you comments, but this answer really deserves one. You saved me a huge amount of time. Apr 1, 2017 at 23:09
  • can't find command root
    – 3pitt
    Aug 6, 2019 at 21:31
  • 1
    I had installed Debian on my Galaxy Book and wanted to install Windows again. I could only run the first command but the second one returned an error. When I typed exit to reboot and try again, my USB drive was recognized and Windows installation window showed up.
    – Matt
    Jan 31, 2020 at 19:32

The chainloader +1 thing might not work if the BIOS isn't good at booting from a USB key (which was why I was wanting to use Grub anyways).

In this case, there's some deep magic at https://help.ubuntu.com/community/Grub2/ISOBoot that works, at least for Ubuntu. The crucial bit is mucking with the grub command that identifies the vmlinuz file, passing the iso-scan/filename argument. Somehow, that helps it figure out that the entire boot filesystem is stuck in an ISO file. I don't know how the heck it works, but it does. These are (approximately) the Grub 2 commands I used:

loopback loop (fd0,msdos1)/path/to/iso/file
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/path/to/iso/file noprompt noeject
initrd (loop)/casper/initrd.lz

The /path/to/iso/file should be the path to the ISO file on the USB key. The (fd0,msdos1) identifies the USB key. Tab-completion is super-helpful on the loopback line, and not useful for the arguments to vmlinuz.

  • I think I meant to answer this in response to a different question. I wish I knew which one! Apr 10, 2015 at 14:11
  • In case of efi/uefi boot modes, these grub2 commands generate an error: error: can't find command 'linux'. Change the commands to linuxefi and initrdefi.
    – Samveen
    Sep 25, 2015 at 9:51
  • I like the concept here. Boot off an ISO which is contained on a flash drive. This would turn a flash drive into a Boot CD buffet. In the more functional example where you could boot off of CD, not Flash, you could burn a CD that picked among them if there was an issue booting off of USB, right?
    – BenPen
    Mar 3, 2017 at 16:30
  • @PaulStansifer kindly, I have the USB key created with unebootin/rufus. Can you kindly help? If yes, see my question here askubuntu.com/questions/1309495/… Thank you for hints
    – Robert
    Jan 20, 2021 at 10:30

To elaborate on new123456's comment:

The USB device should be detected as a mass storage device and treated just like a hard drive. So, in grub, type root (hd (don't press Enter yet) and then hit tab once or twice to see what hard drives Grub can see. The USB device, if it's recognized, will probably be hd1. Don't specify a partition number; just add a closing parenthesis. So the line will be root (hd1). Then after that, type the following:

chainloader +1

If that doesn't work, change root (hd1) to root (hd1,0) and try it again.

If for some reason Grub can't see the USB drive, try plugging in a USB CDROM and booting off that.


I was going to leave this as a comment on either @Ekevoo or @Jonathan post, but I'm not allowed to, so here's my use case+solution for anyone that may also encounter this:

The USB contained a GPart Live CD Install, but my BIOS wasn't booting from it for some reason, despite it working previously (the previous time it worked I installed the CD via windows, this time I did it via Ubuntu). In Grub, I ran the following commands and it worked

set root=(hd0)

This may be different for different devices, I'm not sure if it's even necessary.

Then I ran

chainloader (hd0)/efi/boot/grubx64.efi

The chainloader path will probably be different for other OS, but a similar file should be there. Tab around and look for it, or use the ls command if you can.

And that was enough for it to work.

  • 1
    In my case using chainloader +1 gave me an error: invalid EFI file path. Your option gave the same error, but it turns out my path had some uppercase components: (hd0)/EFI/BOOT/grubx64.efi. To find out, you can use ls (hd0)/ etc. to explore the drive (or perhaps use tab completion).
    – djvg
    Nov 13, 2020 at 9:08
  • 1
    @djvg I didn't even think of using ls, I just tabbed around until i found it lmao(I think I also just opened the USB in another computer and looked through the boot files, its been a while since this answer so I don't remember). Good catch though, I'll add it to the answer if you don't mind
    – 9 Guy
    Nov 13, 2020 at 15:52

This isn't going to be terribly helpful in your friend's case (unless there's a way I'm unaware of to get plop on the device in the first place -- maybe a usb cd-rom, or usb floppy drive?), but this is a terrific little application, which has helped me rig a number of old machines to boot off of usbs when their bios wouldn't allow it.

Plop Boot Manager


You can't boot from usb in grub if the bios doesn't allow for it itself. I once had to setup a sort of recovery partition on a hard disk containing the win7 setup disk contents, install grub, and then used that to boot the win7 setup partition to install it to the rest of the hard drive.

  • You will probably have to use the commands "insmod usbms" and then "insmod ehci" or "insmod uhci" before the mentioned commands. Mar 27, 2019 at 16:25

You must log in to answer this question.

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