PDA

View Full Version : Trouble getting to Windows with Lilo



TnT
3rd September 2002, 12:42
I am dual booting Mandrake 8.1 and Win98. My Linux drives on ide1 and my DVD and CD burner on ide2. On my Promise Ultra100TX2 I have Win98 on ide1 and 2 other fat32 drives on ide2. When in Linux the drives on the Promise are detected just fine, and I can go into them. When I select to boot to Win in Lilo it goes to the Loading Windows... and hangs. I ran /sbin/lilo in Linux and it said it detected windows.

Also when Linux is loading I get a few errors. One says something about hdb1 and too many file systems loaded. Then later on there are errors about hdb and bad CRC and something else. It goes by pretty quick so can't really make it out. hdb is the slave on the drive I have Linux installed. Most of it is /home, then there is 502MB of swap and then I left a couple hundred empty for emergency. I also have 502MB swap on the drive with / but if I remember correctly I should have swap space on all my main Linux drives, right?

Ribbit
3rd September 2002, 12:57
Originally posted by TnT
I am dual booting Mandrake 8.1 and Win98. My Linux drives on ide1 and my DVD and CD burner on ide2. On my Promise Ultra100TX2 I have Win98 on ide1 and 2 other fat32 drives on ide2.

I don't have much experience with add-in IDE cards (is this a RAID card?), so I'm not sure how much I can help. It would really help, though, to know exactly what your partition layout is (e.g. /dev/hda1 is Win98, etc..)

When in Linux the drives on the Promise are detected just fine, and I can go into them. When I select to boot to Win in Lilo it goes to the Loading Windows... and hangs. I ran /sbin/lilo in Linux and it said it detected windows.

LILO isn't 'detecting' anything, it's just blindly configuring itself as /etc/lilo.conf tells it. Is that 'Loading Windows...' a LILO message? If so, /etc/lilo.conf is probably wrong.

(BTW, if you're up to installing a different bootloader, I heartily recommend GRUB - it doesn't need reconfiguring every time some little thing changes, and doesn't leave you high and dry if you haven't got everything right.)

Also when Linux is loading I get a few errors. One says something about hdb1 and too many file systems loaded. Then later on there are errors about hdb and bad CRC and something else. It goes by pretty quick so can't really make it out.

You can read all this afterwards by running 'dmesg' as root.

hdb is the slave on the drive I have Linux installed. Most of it is /home, then there is 502MB of swap and then I left a couple hundred empty for emergency. I also have 502MB swap on the drive with / but if I remember correctly I should have swap space on all my main Linux drives, right?

It doesn't matter where you put your swap (other than performance considerations), all that matters is that you have enough (where nobody really knows how much is 'enough'). Again, more detail on partition setup would help - what you've given isn't quite enough to help.

Colin Morey
3rd September 2002, 13:00
once you've booted into windows you can use the 'dmesg' command to show you the boot up messages, pipe it through 'more' if it scrolls to fast, (dmesg | more), if you're getting CRC errors check your harddrive cables are seated properly, (try unplugging and re-plugging to confirm).
For best performance with swap on IDE you want it on the fastest drive on each channel, (ide can only transfer/work with one drive per channel at a time, unlike scsi).

the command 'cat /proc/swaps' will tell you what you're currently running with regards to swap.

Colin

Colin Morey
3rd September 2002, 13:03
you don't/shouldn't run dmesg as root

all of the commands i've given you can be run as a normal user

and yes it does matter where you put swap!, putting it all on the slowest drive in the system, that also has mysq/<favourite io intensive app> is plain silly.

TnT
3rd September 2002, 14:51
Thanks for the info. I was considering using Grub, but haven't heard much about it. I'm away from my computer, but this is what I can remember for sure:
/dev/hda1 is /
/dev/hda2 is /usr
/dev/hdb1 is /home
then the 3 fat32 drives

Right now I'm dual booting by selecting which drive to boot from in BIOS. Just gotta remember to hit DEL right after I power on :D

Colin Morey
4th September 2002, 00:19
grub is nice in many, many ways, but you do need to read the documentation, as it thinks of drives slightly differently to lilo.

I'd be interested in the output of 'cat /proc/swaps' and your lilo.conf

C

Ribbit
4th September 2002, 01:57
Originally posted by Colin Morey
you don't/shouldn't run dmesg as root

I stand corrected.

and yes it does matter where you put swap!, putting it all on the slowest drive in the system, that also has mysq/&lt;favourite io intensive app&gt; is plain silly.

That's why I said "other than performance considerations". TnT seemed to be under the impression that he had to have a swap partition on every Linux drive - what I was trying to say was that that isn't the case.

TnT, I think your problem is that Windows isn't installed on your first hard disk. AFAIK, every version of DOS/Windows needs to be booted from a primary partition on the first hard drive. What you need to do is figure out how to set up LILO so that it knows how to boot when your Promise is set to be the boot device. As I said earlier, I don't have much experience with add-in IDE cards, so I'll leave someone else to step in (although I'll be following this thread). Good luck.

albatorsk
4th September 2002, 02:55
Nope, that's not it. Windows doesn't care about what partition on what disk it's installed on. I boot my Windows (XP, and before that 2000) from the fourth partition on my secondary SCSI-disk. I am absolutley certain the same goes for IDE.

TnT, could you please post your lilo.conf?

leech
4th September 2002, 04:27
Originally posted by albatorsk
Nope, that's not it. Windows doesn't care about what partition on what disk it's installed on. I boot my Windows (XP, and before that 2000) from the fourth partition on my secondary SCSI-disk. I am absolutley certain the same goes for IDE.

TnT, could you please post your lilo.conf?

Actually that's not 100% true. I have a SCSI and IDE setup here, and I have to have Lilo on my IDE drive along with Windows to get anything to work right. My setup is like this

Lilo is on /dev/hda1
/dev/hda1 = WindowsXP
/dev/sda1 = /
/dev/sda5 = swap
/dev/sdb1 = Fat32 (where I put games for better load times)

So I think with that extra controller in there, probably what he'll have to do is set in lilo.conf to boot off of whatever LINUX says is the first drive on the Promise chain. THEN go into the bios and make it so the promise controller loads up first. But you'll have to change it so that it mounts / as /dev/hdc1 (or whatever linux would think the drive is if /dev/hda1 is on the promise controller and /dev/hdc would be the first drive on the onboard controller)

I hope this makes sense, since I'm posting at 5:30am before work and I'm kind of in a hurry to leave. Good luck. By the way, after all the crap I've had to do, I can practically write a lilo.conf by hand :D

Leech

TnT
4th September 2002, 13:22
D'oh! I forgot to put the files on a disk so that I could post it here when I got to work.
Here's a more thorough version of what I know (what I know last time was slightly wrong :rolleyes: ):
Promise is the non-raid version
hda1 is / and /usr with lilo
I think swap is listed as hda6 (probably will move this to same drive as /home once everything else is worked out)
hdb1 is /home
hde1 is Win98
hdg1 is fat32
hdh1 is fat32

If I try to switch my 2 Linux drives, which are on the mobo, with my Win98 drive, which is on the Promise, how much will I have to change in the configuration files? Should I do any necessary changes before I power down and switch?

Ribbit
4th September 2002, 14:38
The changes you need to make are in /etc/lilo.conf and /etc/fstab. You will need to make the changes before making the switch. You should theoretically also run LILO before switching, although I don't know how well it will cope with an 'incorrect' configuration or with drives being switched from under it, so make a boot disk (and check that it works!).

You are about to potentially really screw things up here, so make sure you know how to reverse everything if you have to. Waiting for another informed opinion wouldn't be a bad idea either.

leech
4th September 2002, 16:40
Originally posted by TnT
D'oh! I forgot to put the files on a disk so that I could post it here when I got to work.
Here's a more thorough version of what I know (what I know last time was slightly wrong :rolleyes: ):
Promise is the non-raid version
hda1 is / and /usr with lilo
I think swap is listed as hda6 (probably will move this to same drive as /home once everything else is worked out)
hdb1 is /home
hde1 is Win98
hdg1 is fat32
hdh1 is fat32

If I try to switch my 2 Linux drives, which are on the mobo, with my Win98 drive, which is on the Promise, how much will I have to change in the configuration files? Should I do any necessary changes before I power down and switch?

If you switch the two linux drives to the promise controller then make the BIOS boot off the promise controller first, you shouldn't have to change any of lilo, because /dev/hda1 will be the first boot device (according to BIOS setting will be your Promise Controller's Master drive.) If you must have win98 on your promise controller, try this out.

First off, make a boot disk. Make sure you do all the changes you want to your Bios (put the Promise controller to be the first boot device, put your drives wherever you want them) then boot off the floppy disk. This will make linux know where all the drives are with their proper device names. Then of course you'll have to mount your drives (at least / and your Win98 drive) then go into your mounted /etc/lilo.conf file with a text editor (I like Pico myself :D) and change a few lines.

boot=/dev/hda (it's probably this now)
root=/dev/hdd1

From what it looks like to me right now you have two harddrives on your motherboard /dev/hda and /dev/hdb then your CD-rom's are /dev/hdc, /dev/hdd. Those will be renamed if you boot off the floppy with the promise controller as the primary boot device. Your drives should then be:

/dev/hda1 Win98
/dev/hdb1 Fat32
/dev/hdc1 Fat32
/dev/hdd1 /
/dev/hdd2 /usr
/dev/hdd3 swap
/dev/hde1 /home
/dev/hdf cd-rom
/dev/hdg cd-rom

Of course this is kind of a guess sine you didn't post what other partitions/drives you have. Hope this helps. And I hope I don't help in trashing your system :D

Leech

TnT
5th September 2002, 12:16
Okay here we go I grabbed the files
lilo.conf:


boot=/dev/hda
map=/boot/map
install=/boot/boot.b
vga=normal
default=linux
keytable=/boot/us.klt
lba32
prompt
timeout=50
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label=linux
root=/dev/hda1
initrd=/boot/initrd.img
append=" hdd=ide-scsi devfs=mount"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hda1
initrd=/boot/initrd.img
append=" hdd=ide-scsi devfs=mount failsafe"
read-only
other=/dev/hde1
label=windows
table=/dev/hde
map-drive=0x80
to=0x81
map-drive=0x81
to=0x80
other=/dev/fd0
label=floppy
unsafe


Okay isn't it odd that it says ide-scsi for the Linux drive? That is on the mobo. I don't know what the mapping means for the windows drive.

cat /proc/swaps:


Filename Type Size Used Priority
/dev/ide/host0/bus0/target0/lun0/part5 partition 514040 0 -1
/dev/ide/host0/bus0/target1/lun0/part5 partition 514040 0 -2


Okay I know that is a lot of swap space, but the hard drives are pretty big and I plan to do a lot of multimedia/graphics stuff once everything is set up so better safe then sorry. I might take out the swap on the first drive though.

I'll try other suggestions first before moving the drives.

Thanks again for the help guys

leech
5th September 2002, 16:06
Okay isn't it odd that it says ide-scsi for the Linux drive?

This probably for the CD-R drive in your computer, ide-scsi is the device driver for it (ide CD-RW's emulate SCSI)

Try my suggestion of creating a new lilo bootsector with a bootdisk, if that's the setup you'd like. Or just move the linux drives over to the promise controller (which will make Linux faster anyhow, and who cares about windows, right? :D)

Leech

Colin Morey
5th September 2002, 16:18
right, your cat /proc/swaps looks fine, apart from one thing, you're best off setting the priority to -1 on both, and i can't find out immediatly, best thing to do i think would be to grep for the command "swapon" in /etc
(grep -ri swapon /etc/*) and paste the output here, (or wait until i can get access to a mandrake box, (only 8.0 though)

Marshmallowman
5th September 2002, 18:52
when you change you boot drive in your bios the ordering of your drives can change, hde1 may not be the right drive....But I don't that is your problem.

win 98 is very inflexible about which drives it boots and runs from. it will usualy like to be the primary boot drive...C: (hda1)
(are they primary drives or extended partitions?)

eg set the drive you originally installed win98 form as the boot drive and put lilo on that.
If you installed win98 on say the D: drive and have added drives since then, win 98 may be terminally confused until you remove the extra drives

I have been through the win 98 drive blues before...it may be a lot easier to go to a better OS.

win NT,2k and XP are a lot more flexible, and all those kind drive Identification problems do not exist on them...

leech
5th September 2002, 20:09
Though of course with WinXP you'll definitely need some sort of rescue disk, since it will copy over your lilop boot record. I believe how I lined it up for you it should work, since like I said, setting the promise controller in your bios to be the boot device will make linux rename the drives, and you'll have to have to boot disk to run lilo again with the correct drive identifications.

Leech

Marshmallowman
5th September 2002, 21:47
yes a working linux boot disk is your friend, make sure you have a working one before playing around.

Ribbit
6th September 2002, 02:04
Originally posted by Colin Morey
right, your cat /proc/swaps looks fine, apart from one thing, you're best off setting the priority to -1 on both, and i can't find out immediatly, best thing to do i think would be to grep for the command "swapon" in /etc
(grep -ri swapon /etc/*) and paste the output here, (or wait until i can get access to a mandrake box, (only 8.0 though)

You mean set priority to 1 - you can't set it to negative numbers. Anyway, to do this edit /etc/fstab, find the lines which represent the swap (they have the word 'swap' in them), and change the word 'defaults' in those lines to 'pri=1'. To make the change effective immediately, do 'swapoff -a ; swapon -a' as root (this assumes you're not using enough memory to need the swap).

TnT
6th September 2002, 17:40
Thanks for all the help guys. I think I'll just get it so that I won't have to use windows, and dual booting from BIOS when I need to until I get a nice Lian-Li removable drive tray (the cheapo one I have now messed up one of my drives a while back).

TnT
11th September 2002, 12:32
Okay solved the problem by moving both my OS drives to the mobo (Linux is master) and reinstalled Linux (there were some funky problems and I wanted to redo partitioning anyways). Everything works great now.

The PIT
12th September 2002, 11:05
What I want to do is add linux to the boot.ini under XP. I've done this in the past using a programme called bootpart but can't remember how I did it.
THis is the layout.

Master Disk one C:Drive winme E:F:G:
Slave Disk Two D:Winxp
On promise controller tx2 (Cdroms don't like working of this under XP)
Master Linux.

Now I tell Linux to make this linux disk bootable and then point the boot.ini to this but I forgotten how.

If I just let Linux create it's own menu when the drive gets stuffed which it's loaded on you can't boot into 98 or Xp. Okay fdisk /mbr would work but it won't if you upgrade linux in the future.