Click to See Complete Forum and Search --> : LILO wont boot on new install...


Stween
08-29-2001, 10:46 AM
I decided to perform a fresh install of Mandrake 8 when i built my new system so i wasnt left with the gunk id left sitting around from my tinkering with the previous install.

However, LILO doesnt appear to like it. I put / on /dev/hdb7 rather than /dev/hdb5 as i had done before, but it came up with

LI 01 01 01 01 etc etc

booting from a floppy, i then copied everything from /dev/hdb7 to hdb5 (the latter was formatted and completely empty), set /etc/fstab to point there and ran /sbin/lilo again.

Since the contents of hdb5 were a carbon copy of hdb7 and /etc/fstab referred to hdb5 as /, i thought it would run, but i end up with exactly the same problem... :(

I am running linux on the same 2.52GB drive iv always used for it and have never had any problems... How can i fix this?? Is the simplest solution re-installing (a bit windows-esque, i know)? Id rather not do that coz for once i feel iv selected the correct packages first time round :)


Cheers for any advice,
Stween

Sidey
08-29-2001, 01:12 PM
try putting the kernel image(s) in the same place it was before (on the old install) and re-running lilo. Might be a problem with the > 1024th cylinder lilo thing

bdg1983
08-29-2001, 04:30 PM
Where is lilo installed to, hdb5 or the mbr. If hdb5, then that could be the problem.

You can check your /etc/lilo.conf to find out.

I have to be careful saying anything about installing the bootloader to the mbr as I've noticed that a particular someone has returned. ;)

Stween
08-29-2001, 05:49 PM
ok iv tried it on the MBR and not, as far as i can tell (hey, there's only so much i like to mess with boot-time stuff :) )

But i actually made a mistake in my first post.... i only get the 'L' of LILO, not 'LI', before the '01''s come up ... i believe the different letters that appear convey a different error??

Im getting to the point where im just gonna have to re-install. Not because its the right thing to do, but because im fed up booting from a floppy :)


Cheers,
Stween

bdg1983
08-29-2001, 06:05 PM
As far as I know, you have two choices.

Install the bootloader in the mbr so multiple operating systems can be booted.

or

Install the bootloader in the Linux boot/root partition which would mean you have to set that partition as the active partition if you don't want to use a bootdisk.

Anyone else have any comments/corrections?

Stween
08-30-2001, 01:58 PM
ok my mistake here but i figured since LILO wasnt working i would try GRUB that i saw as an option for bootloader under the Mandrake install...

It came up with an error too, however, and now i dont know how to uninstall it.

None of the docs i have here on my system regarding GRUB point toward any way of removing it from the system (perhaps i am missing something really obvious, but its pissed me off)

God help me! :)

Stween

bdg1983
08-30-2001, 03:48 PM
This is a article from Caldera on installing Linux to a 2nd hardrive and using Grub. Hope it helps.

Description:

The system fails to boot after installing linux to a second hard drive. It just displays "stage1" on the screen and hangs.

Solution:

After installing eDesktop, without rebooting the system, open a console screen (Press Ctrl-Alt-F1) and login as root. If you have already rebooted and cannot get the system to boot, then boot using the installation cd. See the BOOTING FROM CDROM section below.

Edit the /etc/grub.conf file using vi or your favorite text editor (type "vi /etc/grub.conf" and press enter.) If you need help with the vi editor, see this faq:
http://support.calderasystems.com/caldera?solution&11-991104-0005&130-941758405

The /etc/grub file will look similar to the following:
root (hd1)
install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 0x8000 (hd1,0)/boot/grub/menu.lst
quit

root (hd1) - Indicates that the root mount point is on the second hard drive. The first hard drive is (hd0).

The GRUB program is large enough that it has been broken into multiple parts or stages. Stage1 is small enough to be loaded into the master boot record or the boot sector of any partition. Stage1 then loads Stage2 which in turn looks for a file called menu.lst (by default, menu.lst is located in /boot/grub.) When Stage1 and Stage2 are located on separate drives the install line must be modified to look like the following:
install /boot/grub/stage1 (hd0,0) d (hd0) /boot/grub/stage2 0x8000 (hd1,0)/boot/grub/menu.lst
Note the addition of the "d (hd0) parameter.
Save these changes and then run the following command from the console prompt:
grep -v ^# /etc/grub.conf | grub --batch

BOOTING FROM CDROM:

You can use the eDesktop 2.4 install CD to boot into your system. Boot up your computer with your install cdrom in the drive. Highlight the Standard Install on the menu (or the cautious install, if you know that this is necessary for your hardware). Then press the letter 'e'. This will display three lines of parameters that you can edit. The first line should say "root (fd0)" The second line is a list of kernel parameters, and the third line specifies the initrd.

Highlight the second line, and hit 'e' to edit it.
At the end of this line, add root=/dev/<the linux partition> BOOT_IMAGE=boot

for example to boot from /dev/hda2 you would type at the end of the second line root=/dev/hda2 BOOT_IMAGE=boot

After editing the line, press enter to leave the edit mode, and press 'b' to boot. This should work on both IDE and SCSI.

Linuxcool
08-31-2001, 02:53 AM
You said that you edited your fstab file, but not your lilo.conf. You would have to edit your lilo.conf file because your ' root= ' line would still be pointing to ' /dev/hdb7 ' and not to ' /dev/hdb5 '.

I'm not sure about this but I believe that all you have to do to get rid of grub is just to rerun lilo. That will put lilo in the mbr or the root partition. Whichever one you set it up for.

Stween
08-31-2001, 07:45 AM
well iv now uninstalled grub (fdisk /mbr from DOS...) .... i did actually install LILO over grub but when i uninstalled LILO, GRUB came back, which suggests to me im not installing LILO to the MBR ... how would i do this??

I am getting pissed off now coz iv never had prolems like this... all thats changed from my previous setup is that my smaller hard drive (the one that i run linux from) is now the slave on the first IDE chain with the larger windows drive as the master, where before i had each drive on a seperate chain...

Here is my lilo.conf so that someone can perhaps confirm what im doing is correct or tell me im a stupid idiot and show me the glaring error :)


boot = /dev/hda
timeout = 30
prompt
VGA = EXTENDED
DEFAULT = win

image = /boot/vmlinuz
label = linux
root = /dev/hdb5
read-only

other = /dev/hda
label = win
TABLE = /dev/hda


[ 31 August 2001: Message edited by: Stween ]

HEX 1B
08-31-2001, 06:10 PM
Originally posted by Stween:
<STRONG>well iv now uninstalled grub (fdisk /mbr from DOS...) .... i did actually install LILO over grub but when i uninstalled LILO, GRUB came back, which suggests to me im not installing LILO to the MBR ... how would i do this??

I am getting pissed off now coz iv never had prolems like this... all thats changed from my previous setup is that my smaller hard drive (the one that i run linux from) is now the slave on the first IDE chain with the larger windows drive as the master, where before i had each drive on a seperate chain...

Here is my lilo.conf so that someone can perhaps confirm what im doing is correct or tell me im a stupid idiot and show me the glaring error :)


boot = /dev/hda
timeout = 30
prompt
VGA = EXTENDED
DEFAULT = win

image = /boot/vmlinuz
label = linux
root = /dev/hdb5
read-only

other = /dev/hda
label = win
TABLE = /dev/hda


[ 31 August 2001: Message edited by: Stween ]</STRONG>

Might want to backup your configuration files and application directories and do a fresh reinstall. Then restore back the stuff you need.

Yea, This boot loader dance can go on forever.

Good Luck.

Linuxcool
08-31-2001, 06:52 PM
Your lilo.conf file has some major problems.

Here's yours:

boot = /dev/hda
timeout = 30
prompt
VGA = EXTENDED
DEFAULT = win
image = /boot/vmlinuz
label = linux
root = /dev/hdb5
read-only
other = /dev/hda
label = win
TABLE = /dev/hda

Now change it to this:

boot = /dev/hda
map = /boot/map
install = /boot/boot.b
timeout = 30
prompt
#VGA = EXTENDED
default = win
image = /boot/vmlinuz
label = linux
root = /dev/hdb5
read-only
other = /dev/hdaX
label = win
table = /dev/hda

Replace the X with the correct number which I suspect is ' 1 '. Then rerun /sbin/lilo as root and hope that it works.

[ 31 August 2001: Message edited by: Linuxcool ]

Stween
09-01-2001, 05:46 AM
I have already done a fresh install (twice, in fact... but not just coz of the bootloader problem), Hex1B, and i tried altering my lilo.conf to what u say, linuxcool, and the same error happens

I have tried arsing about with the lilo.conf so much i dont know what else there is to try...

Perhaps if i went back to how i had the system before, with the linux drive as master on the secondary IDE chain?? would (should?) that make a difference?? I dont want to spend the rest of my days with a boot floppy!! :)


Stween

error27
09-01-2001, 09:39 AM
Linuxcool fixed a bunch of the mistakes but I think he missed some still.

Basically lilo can boot from what ever partition you want it to. Unless you are using really old software the 1024 limit doesn't apply any more.

Tell us exactly how you have your computer set up and we'll fix you're lilo for you.

1) Where is the kernel that you want to boot? ( hda1, hda2 etc)
2) Where is your windows partition?
3) Where do you want your root directory to be?

Stween
09-02-2001, 06:28 AM
ok...

i have the kernel on hdb5 -- this is also the / partition (i havent made a seperate /boot partition as i have never needed to).

Windows takes up all of my other drive, which is hda.

my hdb5 partition only weighs in at 400MB, with hdb6 (/usr) 1.2GB and hdb7 (/home) at 800MB with a mere 50-something for swap on hdb8... i have often wondered why the numbering starts at 5 here as i just recently repartitioned after these problems started in a poor attempt to fix this problem and i expected to see hdb1 hdb2 etc etc... why is this??


Cheers,
Stween

error27
09-02-2001, 06:41 AM
&gt;&gt;i have often wondered why the numbering starts at 5 here as i just recently repartitioned after these problems started in a poor attempt to fix this problem and i expected to see hdb1 hdb2 etc etc... why is this??

The numbering is supposed to start at 1.

So basically the whole second hard drive is Linux? And you haven't really got any valuable data on it yet? I'm in assuming those two things?

If so then I suggest that you reformat and repartition that harddrive. Then reinstall from scratch.

Always be sure before you start reformatting things though.

Linuxcool
09-02-2001, 05:34 PM
When you see partition numbers starting at 5 and going up, these are logical partitions. Apparently, mandrake created an extended partition and then partitioned it for four logical partitions ( hdb5, hdb6, hdb7, and hdb8 ). So, there is an extended partition with a number of 1, 2, 3, or 4 on it.

Well Stween, we've had a look at your lilo.conf file how about posting a copy of your fstab file.

error27
09-02-2001, 08:48 PM
Sorry I doubted you LinuxCool. That lilo.conf file looks fine. And thanks for the info about the wierd hard drive numberring.

Stween you did do the fdisk /mbr under does right? What happens when you type /sbin/lilo as root?

Could you just paste the out put here?

Linuxcool
09-03-2001, 01:16 AM
Stween do as error27 suggests and run the command, but run this slightly modified one /sbin/lilo -v. The -v will provide more info. The more -v you add the more lilo will print out. Don't try three of them. It prints out a lot of lines. Also, post a copy of your fstab file.

Stween
09-03-2001, 05:45 AM
alrite, here's my /etc/fstab... it may look a bit of a mess, but i havent really had much of a chance to format it nicely as i would normally :)

/dev/hdb5 / ext2 defaults 1 1
none /dev/pts devpts mode=0620 0 0
none /proc proc defaults 0 0
/dev/hdb6 /usr reiserfs defaults 1 2
/dev/hdb7 /home reiserfs defaults 1 2
/dev/hdb8 swap swap defaults 0 0
/mnt/cdrom /mnt/cdrom supermount fs=iso9660,dev=/dev/cdrom 0 0
/mnt/floppy /mnt/floppy supermount fs=vfat,dev=/dev/fd0 0 0
/dev/hda1 /mnt/windows vfat user,exec,umask=0,codepage=850,iocharset=iso8859-1 0 0



and heres my output from lilo with -v set to 2...

[root@localhost stween]# /sbin/lilo -v 2
LILO version 21.7, Copyright (C) 1992-1998 Werner Almesberger
Linux Real Mode Interface library Copyright (C) 1998 Josh Vanderhoof
Development beyond version 21 Copyright (C) 1999-2001 John Coffman
Released 24-Feb-2001 and compiled at 18:11:44 on Apr 8 2001.

Reading boot sector from /dev/hda
Merging with /boot/boot.b
Secondary loader: 11 sectors.
Boot image: /boot/vmlinuz
Setup length is 10 sectors.
Mapped 1630 sectors.
Added linux
Boot other: /dev/hda1, on /dev/hda, loader /boot/chain.b
Mapped 6 (4+1+1) sectors.
Added win *
/boot/boot.0300 exists - no backup copy made.
Map file size: 15360 bytes.
Writing boot sector.
[root@localhost stween]#


[ 03 September 2001: Message edited by: Stween ]

error27
09-03-2001, 05:59 AM
in your /etc/lilo.conf change

other = /dev/hda1
to
other = /dev/hda

and type lilo.

Stween
09-03-2001, 03:15 PM
well .... i got it to work. Frustrated, i booted up the Mandrake install disk, went to the partition management screen, and cleared everything on the secondary drive. Then made sure the numbering started from hdb1 (the mandrake installer was intent on setting the partition type to 'extended' or wotever thus making the order hdb5 hdb6 etc).

Carrying on with the rest of the install, it worked, which was a very nice moment indeed :)

Now if i just need to get rid of all this graphical gumf thats been install ..... give me a decent text mode any day!! :D

Linuxcool
09-03-2001, 06:09 PM
error27, other= has to point to an actual partition. hda just designates the whole drive. My windows part of my lilo.conf file looks like this:
other=/dev/hda1
label=win
table=/dev/hda


This gets me into windows every time.

Stween, glad you got it going. The only reason I can think of that would cause mandrake to use an extended partition is that you wanted to have four partitions. If it makes four primary partitions, there will be no numbers left to make any more partitions. That could be why it did it.

error27
09-03-2001, 10:48 PM
stween I'm interesting in seeing the working lilo.conf file. do you think you could post it to the list?

Stween
09-04-2001, 08:22 AM
well here is the full, working, lilo.conf (bear in mind its gonna be different to anything i described above having reformatted/repartitioned etc etc...)

boot=/dev/hda
map=/boot/map
install=/boot/boot.b
vga=normal
default=windows
keytable=/boot/uk.klt
lba32
prompt
timeout=30
message=/boot/message-graphic
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label=linux
root=/dev/hdb1
append=" quiet"
vga=788
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hdb1
append=" failsafe"
read-only
other=/dev/hda1
label=windows
table=/dev/hda

image=/boot/l243
label=l243
root=/dev/hdb1
read-only
optional
append=" quiet"

This is the default that mandrake put on the system, plus a kernel i compiled myself. I have to say i dont know where the 'append=" quiet"' bit springs from, but hey, it works :)

error27
09-04-2001, 08:56 AM
thanks for posting that. I'm always fascinated to see where I went wrong.

good to hear that it's working man. :)