Booting linux from usb using grub

  • Thread starter daniel_i_l
  • Start date
  • Tags
    Linux Usb
In summary, Lilo on a usb works differently from grub on a usb. Lilo does not need a device name, while grub does. Lilo also starts from the usb's bootloader, while grub does not.
  • #1
daniel_i_l
Gold Member
868
0
I've tried booting multiple distros from a usb (slux, puppy, ubuntu) using grub. When I turn on the computer with the usb, grub loads. But when I select any of the distros I get:
Error 15: file not found.
I tried changing the root from root=(hd0,0) to all the possible combinations and nothing worked. Lilo on the other hand worked on two different usb's with all of the above distros. Does anyone have any ideas as to why lilo can boot from a usb and not grub? Is there anything special that has to be done to grub to make it boot from a usb?
One thing that seemed strange was that lilo doesn't make you specify a device name (just the fact that it's a usb) and grub does. Is grub having trouble with device names when trying to boot things from a usb?
Thanks,
Daniel
 
Computer science news on Phys.org
  • #2
I can't answer your question (so maybe I shouldn't be replying?), but I'm curious:

Do you have multiple OSs on the USB drive? What is it that you're trying to accomplish?

I boot Fedora from USB on occasion, and depending on what computer I'm using, I need to either change the bios to modify the boot order, or the computer recognizes the bootable USB and asks if I want to boot from it - no grub needed...

-Kerry
 
  • #3
First you need to make sure that usb is bootable

then press C in grub, ( I assume hd0 is your harddisk, so hd1 will be usb)

enter these commands :
root (hd1,0)
chainloader +1
boot

it should give the control to usb's bootloader now.
 
  • #4
Hi, the usb's bootloader starts, the problem is that it can't find the files (kernel + initrd) on the usb.
Thanks
 
  • #5
I have had nothing but pain trying to boot from USB. My advice: stick with a regular live CD.
 
  • #6
daniel_i_l said:
Hi, the usb's bootloader starts, the problem is that it can't find the files (kernel + initrd) on the usb.
Thanks

What distribution is this ? If you succesfully copied the contents, it shouldn't give such an error.
 
  • #7
I've solved the problem:
While I was installing grub to the usb, grub called my usb device (hda1,0). But when grub boots from a usb it always calls it (hd0,0). So the device map I used to install grub was wrong.
Thanks for all the help.
 

What is Grub and why is it used for booting Linux from USB?

Grub (Grand Unified Bootloader) is a popular boot loader program used in Linux operating systems. It is responsible for loading the operating system from the hard drive or USB drive into the computer's memory. Grub is used for booting Linux from USB because it allows for easy configuration and customization of the boot process.

What are the advantages of booting Linux from USB using Grub?

Using Grub to boot Linux from USB has several advantages. It allows for easy installation and removal of different Linux distributions on the same USB drive. It also allows for easy customization of the boot menu and boot options. Additionally, booting from USB using Grub is faster than booting from a CD or DVD.

How do I create a bootable USB drive for Linux using Grub?

To create a bootable USB drive for Linux using Grub, you will need to format the USB drive to the appropriate file system, copy the Linux ISO file onto the USB drive, and then install Grub onto the USB drive. This process may vary slightly depending on your operating system and the version of Grub you are using.

Can I dual boot Windows and Linux from a USB drive using Grub?

Yes, it is possible to dual boot Windows and Linux from a USB drive using Grub. However, you will need to make sure that your computer's BIOS is set to boot from USB and that Grub is properly configured to recognize both operating systems.

Are there any potential issues or limitations when booting Linux from USB using Grub?

One potential issue when booting Linux from USB using Grub is compatibility with certain hardware or firmware. Some older computers may not support booting from USB, and some newer computers may require additional drivers or settings to boot successfully from USB. Additionally, booting from USB may be slower than booting from a hard drive, especially if the USB drive has a slow read speed.

Similar threads

  • Computing and Technology
Replies
7
Views
754
  • Computing and Technology
Replies
11
Views
2K
  • Computing and Technology
Replies
1
Views
1K
  • Computing and Technology
Replies
2
Views
714
  • Computing and Technology
Replies
21
Views
2K
  • Computing and Technology
Replies
6
Views
2K
  • Programming and Computer Science
Replies
30
Views
2K
  • Computing and Technology
Replies
15
Views
2K
  • Computing and Technology
Replies
2
Views
2K
  • Computing and Technology
2
Replies
43
Views
3K
Back
Top