Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-23-2010, 09:23 PM   #1
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
A question about using lilo command at boot...

Found myself in an unusual situation. I installed Slackware 13.0 with the following setup:

sda1 1 TB hard disk /home
sdb1 500 GB /   ;which is also my boot partition and has MBR
sdb5 8 GB swap
So my lilo.conf uses the following:

Ok here comes my situation.

I bought a Addonics 3 slot hard disk bay that fits in 2 5.25 inch bays. It's quite nice I might add. Anyhow, when I juiced in 3 1 TB hard disks. The problem is, when I boot up my computer, the 3 TB hard drives take up sdb, sdc, and sdd. My system partition which used to be sdb now has changed to hda. So during boot, I get a kernel panic because sdb1 is now one of those 1 TB hard drives.

So I'm at the boot screen and hit TAB to enter command line LILO mode. I tried putting in the following:

but that didn't work.

So on this Addonics hd bay I can turn off the 3 hard disks, so then I can boot back up and have my system partition be sdb1 again. However, I'm not able to set lilo.conf to boot=/dev/hda and root=/dev/hda1. Whenever I try and run 'lilo -v' I get a fatal error because obviously hda does not exist at that time.

The Addonics hd bay took up my DVD drive slot so I don't have an optical drive in at the moment. If I really have to I can go and plug in the optical drive, which I know is one possible solution. However, I want to see if I can fix this via LILO command line.

What do you guys think?
Old 06-23-2010, 10:07 PM   #2
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,565

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Well I am curious why you are changing from sdX to hdX?

If your kernel and system were discovering the original drive as sdX then use the same in your adjustments at the lilo prompt.
You should only need to set the first 2 items as the third is unchanged from the original.
Old 06-23-2010, 10:14 PM   #3
Registered: Aug 2009
Posts: 112

Rep: Reputation: 18
Well, if I understand your question right, it sounds like you could set it back to a known boot state, change your lilo.conf, run lilo, and THEN change your setup.

Alternatively, you could hook up your optical drive and boot with the install cd, then chroot to your hard drive and do the previously mentioned changes (I've had to do this before, mostly when I messed up kernel compiles).

That's one downfall of LiLo: you can't define how to boot at the prompt.
Old 06-25-2010, 09:18 AM   #4
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
Is grub more versatile in this respect?
Old 06-25-2010, 09:48 AM   #5
Senior Member
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You have to show us the output of
fdisk -l
Also if you change Lilo configuration in /etc/lilo.conf you must recompile it by command
lilo -b /dev/hda
If Lilo isn't happy with the new arrangement it would then tell you why.

You could change it to Grub1 or Grub2.

The easiest is to boot up any Linux with Grub1 inside, mount the Slackware partition (assumed it is hda1), copy two files into Slackware's /boot/grub, write your own menu.lst and do a setup

Step A - put Grub1 in Slackware

boot up a Linux with Grub1, like Mepis or Puppy (The Live CD may call hda1 as sda1 and make sure you know if Slackware is in the first bootable disk in the Bios. If not then make sure the boot loader knows it.)

copy Grub1 files across
mkdir /mnt/hda1
mount /dev/hda1 /mnt/hda1
mkidr /mnt/hda1/boot
mkdir /mnt/hda1/boot/grub
cp /boot/grub/stage* /mnt/hda1/boot/grub/
ls /mnt/hda1/boot/grub
if you see stage1 and stage2 inside then you are in business

Step B - Create your menu.lst
use an editor to create a file /mnt/hda1/boot/grub/menu.lst with following entries
title Slackware in hda1
root (hd0,0)
kernel /boot/vmlinuz ro root=/dev/hda1
Step C - Install Grub1 in MBR
setup (hd0
Let us know if you want Grub2 instead of Grub1.

Last edited by saikee; 06-25-2010 at 09:51 AM.
Old 06-26-2010, 08:32 PM   #6
Registered: Aug 2009
Posts: 112

Rep: Reputation: 18
Originally Posted by trist007 View Post
Is grub more versatile in this respect?
Yes. You can boot something that isn't even defined in the grub.conf I believe. It is very useful for someone who is constantly changing and tinkering.


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
Pass an option to LILO in order to have a script/command executed at/after boot ? Linux.tar.gz Linux - General 9 08-31-2009 11:13 AM
LILO Boot Menu question Demented Hacker Linux - Software 4 02-11-2006 02:16 PM
Linux boot question (lilo) vexer Linux - General 3 05-06-2005 08:36 PM
lilo boot question gram_vaz Mandriva 2 06-11-2004 09:57 PM
Another dual boot question - LILO difficulties dsknkt Linux - Software 9 05-11-2002 05:22 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:54 AM.

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