Dual Boot LILO Problem

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Alright, I have 2 SCSI drives. One has WinXP on it, and the other will have Mandrake 9.1 on it soon. I want to use LILO, which hardrive should LILO be installed onto? Last time I did this setup my MBR got trashed on WinXP drive so I am a bit weary...I just want it to work.:p

Thanks in advance.:beer:
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Put it on the MBR, it won't break anything unless you do something bad like remove the Linux partition before removing LILO.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
If your worried about the MBR, then just install it on a floppy! Safe as can be.]

Just configure it so that the partition it's installed on is boot = /dev/fd0... To make a floppy disk that will start the boot up proccess for your OS installed on your HD. Then after you make sure that will work put it on your hd. That's the safest way I know of.. otherwise:

Most installation CD's will allow you to boot into the installed OS from them.

Be sure to make a boot disk for windows. Win98 boot/rescue disk is pretty easy to make and you can use that to get into your OS if your fry your MBR by accident.

Otherwise just install it on the first harddrive's MBR. Usually boot = /dev/sda. Whatever. :)

here is the lilo mini-howto

Read thru that until your comfortable about what is going on.

 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
I decided to be safe and install LILO to a floppy disk. Once the install finished and it reboot it tried to access the floppy boot loader and just printed L 99 99 99...
I know this is a LILO error, I had it before when I had just delelted my Linux partition without uninstalling lilo. That time it was much simpler because Linux was on the same Physical drive as WinXP...but now its not...and its throwing a fit.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Can you boot linux up using the install disk as a rescue disk?

Just try to get back into the linux distro and just try to reinstall lilo on the floppy or just install it on the MBR of the disk. I suppose that if you have a floppy rescue disk for windows were you can boot from it to your windows then it will be pretty safe to just skip the lilo floppy stuff and use the MBR.

I think mandrake has a repair option on the first install cd.

check out what this guy had to say
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
I dont have a rescue floppy disk for WinXP, I didnt even think I could make one. So I am a bit weary of rewriting the MBR with LILO. I would like to get the floppy working as it seems to be the easiest option(Just stick a floppy in when you wanna boot Linux).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
That makes sense. Did you get it working? I am not sure about Mandrake, but can you boot into your linux OS by using the Install cdrom?
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
I dont think I can, I've tried...but I just may not know what to do. I can get to a "rescue" prompt, or I can get to a prompt that I can manually invoke the installer with special options. Would I have to run a command or should it just be an option?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
This is kinda generic, I don't have personal experiance with mandrake...

When the cd first gets activated and before it boots up the install it may ask if you want pass some options or something. It may give you a boot prompt.


Try typing in:

linux root=/dev/sd(whichever your root partition is)

the naming convention goes.

/dev/sda is your first SCSI disk,
/dev/sdb 2nd disk
/dev/sdc 3rd disk
/dev/sdd etc etc....


Then they have another set of device files

/dev/sda1 is the first partition on the first disk
/dev/sdd2 is the 2nd partition on the 4th disk
/dev/sdb4 is the 4th partition on the 2nd disk

etc etc...

Hope you get the idea.

So if you install the Linux root partition on the 2nd partition on the first disk you can try
linux root=/dev/sba2 ro
(ro is read only)

Then it should boot up ok.

Right now I am downloading a Mandrake CD install image for a freind. Hopefully I can figure it out if you can how to boot to root from the cdrom.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Alright, that last sugestion won't work for the Mandrake install... Once the it boots up it began the installation proccess for me.

But try this instead.


Let the install boot up all the way. Once it gets finished and began asking for the installation language stuff hit the buttons alt, control, and F2 at the same time to switch to a command line.


once you get the command line,
mount your root partition to the mnt directory.
If your root directory is located in /dev/sba1 then the command would be

mount /dev/sba1 /mnt

Then after you do that.

cd /mnt

then after you do that, you can use the chroot command. Chroot is a command which from the perspective of your user changes which "root" partition you belong too.

so

chroot ./
or
chroot /mnt/

that will put you in your OS in your harddrive. If you have any extra /boot partitions or /home directories then you can mount those to.

from there go ahead and edit the /etc/lilo.conf file and make sure that that is correct, then after you do that rerun the lilo command to reinstall the lilo boot manager on your floppy or in your MBR.

Hope that gets it for you.

to get back out of the harddrive. Umount everything if mounted extra stuff. Then type "exit" to get out of the chroot change, cd / to get back to the real root directory and then umount /mnt. Then reboot.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Okay, progress. I am able to edit the lilo.conf file. I am just not sure what is the correct information to have in it.

My linux boot is in /dev/sdb1
I am not concerned with loading WinXP from the floppy, just Linux, so I deleted those entries and everything else "seemed" to be correct...but obviously werent as I am still getting L 99 99 99 99 99...

What should the entry for linux look like?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
did you rerun lilo? The config is only used when you use the command "lilo" to install the boot loader, and make sure that it doesn't give you any errors.....

Could be a iffy floppy disk, try another one and see if that makes it better.

re-running lilo should fix it.

I don't know what the linux part should look like exactly because I don't know what mandrake named the kernel and if it needs to load a initrd thingie and stuff like that.


Even if it's pointing at the wrong kernel or pointing at the wrong partition then it still should give you something other then L 99 99 99 99 99 99.... type of stuff.

Try using a different floppy disk...

you have XP on the first disk right? Then you could try install lilo to /dev/sbb if you can select in the bios which HD to boot from. In my bios I can boot hit f8 during post and select which drive to boot from, maybe you can do something similar from yours.

I did a search on google and found mandrake users running into the L 99 99 99 thing. here

maybe try to clean off the floppy disk with "dd if=/dev/zero of=/dev/fd0"
That will overwrite the floppy disk with zeros, if it gives errors then it's probably a bad floppy.
Then format the floppy
fdformat /dev/fd0
mkfs -t fat /dev/fd0 to format it into a dos floppy. (or use -t ext2 option to make it linux)

Then try the lilo thing.


heres from Lilo's man page:
BOOT ERRORS
The boot process takes place in two stages. The first
stage loader is a single sector, and is loaded by the BIOS
or by the loader in the MBR. It loads the multi-sector
second stage loader, but is very space limited. When the
first stage loader gets control, it types the letter "L";
when it is ready to transfer control to the second stage
loader it types the letter "I". If any error occurs, like
a disk read error, it will put out a hexadecimil error
code, and then it will re-try the operation. All hex
error codes are BIOS return values, except for the lilo-
generated 40, 99 and 9A. A partial list of error codes
follows:

00 no error
01 invalid disk command
0A bad sector flag
0B bad track flag
20 controller failure
40 seek failure (BIOS)
40 cylinder>1023 (LILO)
99 invalid second stage index sector (LILO)
9A no second stage loader signature (LILO)
AA drive not ready
FF sense operation failed

Error code 40 is generated by the BIOS, or by LILO during
the conversion of a linear (24-bit) disk address to a geo?
metric (C:H:S) address. On older systems which do not
support lba32 (32-bit) addressing, this error may also be
generated. <b>Errors 99 and 9A usually mean the map file (-m
or map=) is not readable, likely because LILO was not re-
run after some system change, or there is a geometry mis-
match between what LILO used (lilo -v3 to display) and
what is actually being used by the BIOS (one of the lilo
diagnostic disks, available in the source distribution,
may be needed to diagnose this problem).</b>

Try posting you lilo.conf (copy it to your floppy) and see if we can spot the problem if any.

May be that your bios can't read the files from the second SCSI disk... could be a bios limitation.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Maybe im stupid...but I cant get my floppy to mount so I can copy lilo.conf to it. I keep on getting weird errors.

I've tried
mount /dev/fd0 /mnt
it told me i had to specify file system so then i tried
mount /dev/fd0 /mnt msdos
mount /dev/fd0 /mnt ext2

and neither of them worked...
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
If you have questions about any commands you can simply use the "man" command.

Such as "man mount" or "man man" :)

Anyways the correct syntax would be

mount -t msdos /dev/fd0 /mnt

Dos puts the modifiers at the end of the command, Bash-like shells put it right after the command's name.

t for type.

from man mount:

-t vfstype
The argument following the -t is used to indicate the file sys-
tem type. The file system types which are currently supported
are: adfs, affs, autofs, coda, coherent, cramfs, devpts, efs,
ext, ext2, ext3, hfs, hpfs, iso9660, jfs, minix, msdos, ncpfs,
nfs, ntfs, proc, qnx4, ramfs, reiserfs, romfs, smbfs, sysv,
tmpfs, udf, ufs, umsdos, vfat, xenix, xfs, xiafs. Note that
coherent, sysv and xenix are equivalent and that xenix and
coherent will be removed at some point in the future -- use sysv
instead. Since kernel version 2.1.21 the types ext and xiafs do
not exist anymore.

Another command is
fdformat
to format or erase a floppy. that will test it.
and mkfs (make filesytem)
The floppy gets treated like anyother physical disk in this system, just a very small one

I don't know if the install cd has complete enough shell to use the man comand. It should, but if you use the chroot (to change the root partition to your OS's on the harddrive as I described before) command you ought to be able to get the descriptions from there. There are also copies of man files on the internet. Just make sure that you look at ones made for GNU's (linux) tools, because their are other versions for common commands for BSD and other Unix OSes that may or may not match up.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
mount -t msdos /dev/fd0 /mnt


I tryed that, and it spit out something like:
Cannot mount this device, device number doesnt exist or the nfs msdos doesnt't exist...soemthing to that effect.

I did fdformat /dev/fd0 and formatted the disk. And tried again..still no go.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
fdformat only does the low-level format of the floppy. You still have to make a filing system for it.

mkfs -t msdmos /dev/fd0

Sorry I guess I should of been more clear about that. You realy don't have to do the fdformat thing unless your dealing with a questionable floppy. mkfs command is usually enough.

It's kinda like the difference between

format a:
and
format a: /q

in dos.

the format a: is like using fdformat then using mkfs -t msdos (or mkfs.msdos is the real command) were as format a: /q is like just using mkfs.msdos(or mkfs -t msdos)...

Sorry about that.