LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 06-23-2010, 08:23 PM   #1
trist007
Member
 
Registered: May 2008
Distribution: Slackware
Posts: 974

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


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

Code:
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:

Code:
boot=/dev/sdb
root=/dev/sdb1
image=/boot/vmlinuz
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:

Code:
boot=/dev/hda
root=/dev/hda1
image=/boot/vmlinuz
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, 09:07 PM   #2
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,492

Rep: Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892Reputation: 1892
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, 09:14 PM   #3
halborr
Member
 
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, 08:18 AM   #4
trist007
Member
 
Registered: May 2008
Distribution: Slackware
Posts: 974

Original Poster
Rep: Reputation: 56
Is grub more versatile in this respect?
 
Old 06-25-2010, 08:48 AM   #5
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
You have to show us the output of
Code:
fdisk -l
Also if you change Lilo configuration in /etc/lilo.conf you must recompile it by command
Code:
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
Code:
su
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
Code:
title Slackware in hda1
root (hd0,0)
kernel /boot/vmlinuz ro root=/dev/hda1
Step C - Install Grub1 in MBR
Code:
grub
setup (hd0
quit
Let us know if you want Grub2 instead of Grub1.

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

Rep: Reputation: 18
Quote:
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.
 
  


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
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 10:13 AM
LILO Boot Menu question Demented Hacker Linux - Software 4 02-11-2006 01:16 PM
Linux boot question (lilo) vexer Linux - General 3 05-06-2005 07:36 PM
lilo boot question gram_vaz Mandriva 2 06-11-2004 08:57 PM
Another dual boot question - LILO difficulties dsknkt Linux - Software 9 05-11-2002 04:22 PM


All times are GMT -5. The time now is 09:43 PM.

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