LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 10-02-2007, 10:12 PM   #1
zefer
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Rep: Reputation: 0
Installing Lilo to external harddrive from different computer that's not booting it?


I have a funny laptop without any cd or floppy drive. It just has a special external harddrive connector in front of the keyboard. Ubuntu is installed on the harddrive but I cant get the bootloader to work. I was using grub and when I got it to load it errored "Grub Hard Disk Error" which I cant fix because I cant boot a floppy to update the bios.

So I'm trying lilo now. When lilo boots on the laptop I just get L 99 99 99 99.....

Here's my /etc/lilo.conf
Code:
boot=/dev/sdb
map=/boot/map
install=/boot/boot.0810
prompt
timeout=50
image=/boot/vmlinuz-2.6.20-15-generic
        label=Ubuntu
        root=/dev/hda1
        read-only
So how do I install lilo from a different computer than it boots from?
 
Old 10-02-2007, 10:15 PM   #2
AAnarchYY
Member
 
Registered: Sep 2004
Location: Carlisle, MA
Distribution: Slackware 10.2 Fluxbox 2.6.17.6
Posts: 419

Rep: Reputation: 30
you can chroot into where you mounted /dev/hda1 and run lilo in there
 
Old 10-02-2007, 10:35 PM   #3
binary_pearl
Member
 
Registered: Jul 2007
Location: Chicago Illinois
Distribution: SLES 10 SP2/SP3, SLES 11 SP1, OpenSUSE, Sabayon, Gentoo, Fedora 14, RHEL 3/4/5/6
Posts: 97
Blog Entries: 1

Rep: Reputation: 23
With LILO, you have to run /sbin/lilo on the partition in order to install the current configuration. You may want to use grub to get around this (as with grub you can modify the config file without having to run any command afterwards, but it's possible to get it work with either LILO or grub. So first, we should pick a bootloader and stick with it.

Assuming you go with LILO, here are a couple things on the file that you posted:
You have:
boot=/dev/sdb

But you also have:
root=/dev/hda1

I am fairly sure that whatever your root="" line should be on the same drive as your boot="" line.

(/dev/sd* usually refers to USB or SCSI drivers)
(/dev/hd* usually refers to IDE drives)

So this external drive, is it usb? If so, your boot="" line may need to be something like:
boot=/dev/sda or
boot=/dev/sdb or
boot=/dev/sdc or
boot=/dev/sdd

I would guess that it would be /dev/sda, but you may have to play around with this value (unless someone can explain why devices show up as /dev/sd[a-d])?.

So once we know what the name of your boot device is, then we can look into what partition it should be booting off of.

If using LILO, you will need to modify /etc/lilo.conf, boot into the OS using a live cd and chroot into the environment and rerun /sbin/lilo. If you want want to use grub, you can get around doing the chroot, and modify /boot/grub/menu.lst (or grub.conf)

I hope I am not making this more difficult than it needs to be, but hopefully we can figure out what it will take to get your OS to boot.

--Shaun
 
Old 10-02-2007, 11:00 PM   #4
zefer
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Wow thanks I thought it was a hardware thing -- like where it maps the hardware devices and stuff. Chroot worked well to get lilo actually booting. Now it kernel panics. It says to append root= but I already have that in lilo.conf

root=/dev/hda1

What's wrong with this?
Quote:
Originally Posted by binary_pearl
But you also have:
root=/dev/hda1

I am fairly sure that whatever your root="" line should be on the same drive as your boot="" line.

(/dev/sd* usually refers to USB or SCSI drivers)
(/dev/hd* usually refers to IDE drives)

So this external drive, is it usb? If so, your boot="" line may need to be something like:
boot=/dev/sda or
boot=/dev/sdb or
boot=/dev/sdc or
boot=/dev/sdd

I would guess that it would be /dev/sda, but you may have to play around with this value (unless someone can explain why devices show up as /dev/sd[a-d])?.
I have a weird laptop with an external drive (that plugs in internally or with a special holder thingy USB). The entire point is installing lilo from a desktop computer connected through USB and then having it boot successfully from the laptop w/ no cd/floppy drives. So yes of course I install it on /dev/sdb, however when it's puged into the laptop it turns into /dev/hda (it's not USB on the laptop).
 
Old 10-02-2007, 11:07 PM   #5
AAnarchYY
Member
 
Registered: Sep 2004
Location: Carlisle, MA
Distribution: Slackware 10.2 Fluxbox 2.6.17.6
Posts: 419

Rep: Reputation: 30
what was the exact error message?
 
Old 10-02-2007, 11:54 PM   #6
zefer
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Original Poster
Rep: Reputation: 0
VFS: Cannot open root device "801" or unknown block(8,1)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
 
Old 10-03-2007, 02:05 AM   #7
binary_pearl
Member
 
Registered: Jul 2007
Location: Chicago Illinois
Distribution: SLES 10 SP2/SP3, SLES 11 SP1, OpenSUSE, Sabayon, Gentoo, Fedora 14, RHEL 3/4/5/6
Posts: 97
Blog Entries: 1

Rep: Reputation: 23
Do you know if /dev/hda1 is the correct partition you want to boot off of? You might want to try passing root=/dev/had2, or root=/dev/hda3...etc as a kernel parameter until you find a line that works. Once you know what works, then you could modify lilo to make the change permanent.

--Shaun
 
Old 10-03-2007, 08:25 AM   #8
zefer
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Do you know of an easy way to figure this out? I've tried passing hda1-hdd1, hda1-hda3, fd0, disk, sda1,sdb1 etc and cant figure out what device it is. Some sort of ls /dev > somelog would be nice?

Last edited by zefer; 10-03-2007 at 08:27 AM.
 
Old 10-03-2007, 08:50 AM   #9
binary_pearl
Member
 
Registered: Jul 2007
Location: Chicago Illinois
Distribution: SLES 10 SP2/SP3, SLES 11 SP1, OpenSUSE, Sabayon, Gentoo, Fedora 14, RHEL 3/4/5/6
Posts: 97
Blog Entries: 1

Rep: Reputation: 23
If you can access the drive from another computer / live cd, you try using fdisk or cfdisk to look at the partition table.

Try: cfdisk /dev/hda (or however the drive appears w/in the booted os)
or fdisk /dev/hda

From here, you should be able to see the partition table. If you can't figure out which is the root drive, see if you can post the output here.

Logical partitions start out at /dev/hda5, so if your root drive is on a logical partition, that may be what you need to set root="" to.

--Shaun
 
Old 10-03-2007, 11:45 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I expect Lilo would work if you use sdb1 instead of hda1 as the root because being an external drive it should be sda or sdb. If Ubuntu is in sdb1 then there is another USB device occupying the sda position.

You can make Lilo to boot from the MBR of hda by command
Code:
lilo -b /dev/hda
while the external disk is attached.

Alternatively you simply tell the Bios to boot from sdb. In which case you put Lilo in the MBR of sdb by
Code:
lilo -b /dev/sdb
If things are confusing you could use a floppy by replace sdb with fd0 in the above statement.

As far as I am aware Lilo does not gets rid of the problem suffered by Grub. You are far better off to investigate the Grub error and resolve it.
 
Old 10-03-2007, 12:30 PM   #11
zefer
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Setting it to label /dev/hda1 worked. Not sure why but it was suggested here, http://kerneltrap.org/node/970.

When the hd is in the laptop it's connected to an actual harddrive connector so it's hda.
Quote:
Originally Posted by saikee
As far as I am aware Lilo does not gets rid of the problem suffered by Grub. You are far better off to investigate the Grub error and resolve it.
Lilo would actually boot. Grub would error because the bios was retarded and I can't update the bios very easily w/o a floppy/cd drive.


btw -- final lilo.conf
Code:
boot=/dev/sdb
map=/boot/map
install=/boot/boot.0810
prompt
timeout=50
image=/boot/vmlinuz-2.6.20-15-generic
        label=/dev/hda1
        root=/dev/hda1
        initrd=/boot/initrd.img-2.6.20-15-generic
        read-only

Last edited by zefer; 10-03-2007 at 12:44 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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing on External Harddrive without GRUB on Internal nckinfn04 Ubuntu 1 05-07-2007 07:32 AM
Installing on external harddrive bw3000 Linux - Newbie 2 01-22-2006 05:59 PM
having trouble installing debian on external usb harddrive willigi Debian 4 11-14-2005 03:24 PM
Installing Linux on an external harddrive and booting from any computer scr02bcg Linux - Hardware 8 03-29-2004 09:11 PM
Installing linux to and USB external Harddrive??? loser04 Linux - Hardware 1 08-18-2003 02:36 PM


All times are GMT -5. The time now is 03:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration