LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-06-2009, 11:35 PM   #1
himrockffan
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Rep: Reputation: 0
Thumbs up Installing LILO on a USB external hdd


I have looked everywhere ... well ... seemingly everywhere and I have not seen a clear cut or concise way to do this. I have copied my Linux system (Debian Lenny) from my internal hdd(hda) to a 160 GB external hdd(sda) hooked up through USB. I want to be able to boot from this external hdd. The system BIOS will allow ... supposedly ... booting from a USB device. I am using LILO with the internal and would rather continue using it. I don't know if it is installed correctly on the external. I seem to doubt it.

Can anybody tell me where to look for more info? Or perhaps enlighten me on how to install LILO into the MBR of an external USB hdd.

Any other tips would be great as to how to boot my Linux system off of the external
 
Old 07-07-2009, 12:20 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Did you edit the lilo.conf file and run lilo to update the boot loader?

How far does the booting process get?
 
Old 07-07-2009, 11:04 AM   #3
himrockffan
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your response jschiwal. Sorry its been so long since my reply. It was late, had to get to bed and now this is first chance I got. I hope I didn't let this thread dry up.

Here is lilo.conf on hda (sda has exactly the same thing, in fact, everything is the same on sda, because its a copy of hda):
======================================
large-memory
boot=/dev/hda
root=/dev/hda1
map=/boot/map
delay=20
default=Linux
image=/vmlinuz
label=Linux
read-only
initrd=/initrd.img
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
initrd=/initrd.img.old
=======================================
This configuration is out of the box so to speak. How I found it after installation. I have not modified it.

Here is the mtab file while the USB drive is plugged in and running:
===================================================================
/dev/hda1 / ext3 rw,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
/dev/hda9 /home ext3 rw 0 0
/dev/hda8 /tmp ext3 rw 0 0
/dev/hda5 /usr ext3 rw 0 0
/dev/hda6 /var ext3 rw 0 0
/dev/hdb /media/cdrom0 iso9660 ro,noexec,nosuid,nodev,user=himrockffan 0 0
/dev/sda1 /media/XPbackupSystem fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0
/dev/sda5 /media/Usr ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sda6 /media/Var ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sda3 /media/disk fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0
/dev/sda2 /media/disk-1 ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sda9 /media/Home ext3 rw,nosuid,nodev,uhelper=hal 0 0
/dev/sda8 /media/Tmp ext3 rw,nosuid,nodev,uhelper=hal 0 0
=====================================================================
The root partition is sda2.

In order to boot from sda I suppose I have to run lilo after booting up hda. From what I'm getting I have to config lilo to load onto sda. I'm up in the air as to what lilo.conf needs to do that.

Can anyone help with this?
 
Old 07-07-2009, 01:52 PM   #4
himrockffan
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
So lilo.conf has to be modified in such a way and executed to install its bootloader in sda's MBR even though this is being done with the currently running operating system off the hda drive. I still don't fully grasp what modifications you make to lilo.conf to get this done. But once lilo's bootloader is installed in sda's MBR and upon trying to boot from sda, there might also be an issue with timing between the USB device's initialization (BIOS activity) and the kernel, on sda, being able to read from it. Apparently this is what the initrd.image is all about. Am I making any sense?

Anyone with experience on this can certainly shed a lot of light on me. Help would be appreciated.
 
Old 07-09-2009, 07:05 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Quote:
Here is lilo.conf on hda (sda has exactly the same thing, in fact, everything is the same on sda, because its a copy of hda):
======================================
large-memory
boot=/dev/hda
root=/dev/hda1
map=/boot/map
delay=20
default=Linux
image=/vmlinuz
label=Linux
read-only
initrd=/initrd.img
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
initrd=/initrd.img.old
=======================================
First make a backup copy of your current /etc/lilo.conf file
sudo cp /etc/lilo.conf /etc/lilo.conf.bu

Next, edit /etc/lilo.conf, changing all of the hda's to sda's. The line "boot=/dev/sdb" will cause the MBR to be written to the usb drive instead of your internal hard drive. Now run "sudo /sbin/lilo" to install the boot loader to the usb drive's mbr.
Lastly, let's save a copy of the current lilo.conf file and restore the original
sudo mv /etc/lilo.conf /etc/lilo.conf.usb
sudo mv /etc/lilo.conf.bu /etc/lilo.conf

note: If you look at the manpage for lilo, you could first copy the original to lilo.conf.usb (for example) and use this file when running lilo. You might consider putting a blank line before the "image=" lines. This will make the stanzas stand out better when reading the file.

Last edited by jschiwal; 07-09-2009 at 07:07 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
External ubuntu install on external USB HDD th3_tr00p3r Linux - Newbie 1 05-11-2008 02:56 PM
Installing Ubuntu on External HDD; PC has no internal HDD 449 Ubuntu 2 11-28-2007 05:12 PM
Installing / Uninstalling to External USB HDD pashabear Linux - Hardware 1 03-11-2007 09:09 AM
Installing to an external usb hdd wu_ Slackware - Installation 1 11-11-2006 01:14 AM
Installing FC3 to External USB HDD - Please Help enochgenesis Fedora 5 12-14-2004 10:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:27 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration