LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-20-2006, 07:12 PM   #1
artois_val
Member
 
Registered: Jan 2004
Posts: 35

Rep: Reputation: 15
How to install grub or lilo to an external usb hd


Hello everyone, Im trying to install linux into my new usb hd (it's a maxtor touchIII).

I can't even get a stage2 boot loader loaded, lilo give me alot of error code 40 and grub : hard disk error.

How I can install one of those boot loader, into my hd. The first partition is ext3 and my host system detect it as sda1.

ps. Im not even in the process of tweaking the initrd to load the usb driver ...

Thx in advance
 
Old 07-21-2006, 01:00 PM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
First, your BIOS have to have support to boot to a USB disk. If it does not, you have to use either a floppy or CD/DVD disc to use USB disks.

In order to boot up Linux from a USB, you have to make sure all the required modules are in initrd file. Some people set the kernel to have USB and its devices set as built-in. The USB storage software in the kernel works best as a module instead as built-in. Also you may have to edit the initrd setup, so it can detect the drives before moving on using pivot and other commands to boot up Linux.

installing a grub on a USB/SCSI device is easy. First use a Live Linux and boot to it. Next get your USB disk activated and mount it. Mount proc where you mount your USB disk. Then use chroot. After you have chroot, type source /etc/profile. Then you can type grub. In the grub command prompt, type root (hd<tab>. Pick the USB drive. Lets say h0 is your USB disk. Then type root (hd0,<tab> to pick partition where the boot directory is located. Next type setup (hd0). After it is done, type quit. Finally exit from the chroot and reboot.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to boot External USB drive in grub prompt? rajarishi Linux - General 1 06-14-2006 04:27 AM
How to mount the External USB disk in grub prompt? rajarishi LinuxQuestions.org Member Intro 1 06-12-2006 11:34 AM
Booting with GRUB to external USB drive Mirag3 Linux - Hardware 3 05-18-2006 07:27 AM
Can not boot external USB HD grub error 18 willigi Linux - Software 0 10-08-2005 01:01 PM
install lilo/grub on a USB flash drive? flystar06 Linux - General 3 06-14-2005 08:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration