LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-04-2005, 05:32 PM   #1
deanerk
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Rep: Reputation: 0
Dual boot question - LILO on wrong drive?


Hey, first time poster here. Looked around for a bit, but didn't find an answer to my issue.

I'm a Linux Newbie. I've dinked around with a Mandrake install on an old machine of mine, but this weekend I decided to give a dual boot system a go. I re-installed WinXP on a 20GB partition of a 40GB drive first and left the other half for Mandrake 10.1. Windows install went fine. I thought the Mandrake install was looking good too, but the bootloader will not start and I can't boot to it now.

Here's a little background and what I've been able to determine on my own. I have 3 hard drives I call C:\, X:\, and Y:\ in Windows. C:\ is the 40GB drive I split for the OSs. X:\ is a 40GB storage drive I have a bunch of junk on and Y:\ was just a 160GB backup and storage drive. When I installed Mandrake, I chose the option "Use free space" on partitioning, assuming it would use the 20GB unallocated space on C:\. Well, it decided to load on my Y:\ drive aparently wiping out the few things I had there. I was also not getting the bootloader (LILO) to come up at reboot. I went back into the installation and this time did my best to familiarize myself with the "Custom disk partitioning" tool. (This is when I discovered that Mandrake had partitioned my Y:\ drive.) I removed the partitions created on the Y:\ drive and created similar ones manually on the 20GB partition I had free on my C:\ drive. I continued with the installation and all looked well, but I could not get LILO to start. I booted from disc and went into rescue and brought up the console and was able to get my partition information:

hda1: 131,069 Mbytes, type <0x7> (NTFS (or HPFS))
hde1: 19,077 Mbytes, type <0x7> (NTFS (or HPFS))
hde5: 5,812 Mbytes, type <0x83> (Ext2)
hde6: 1,592 Mbytes, type <0x82> (Linux Swap)
hde7: 11,684 Mbytes, type <0x83 (Ext2)
hdf1: 38,162 Mbytes, type <0x7> (NTFS (or HPFS))

From what I can tell, hda1 was assigned to my Y:\ drive. Does the bootloader always install to hda1 by default? I tried re-installing the bootloader from the rescue mode off the disc, but was not given a choice as to where it installs. It looks to me like it needs to exist on hde since that's the drive I boot to. Can anyone show me how to do that?

On a side note, My Y:\ drive does not show up in Windows anymore and in Disk Management is labeled as "Unreadable." I suspect I just need to have Windows reformat it... Not a big deal. Just a couple backup jobs and some recorded TV shows lost there.

Any help would be greatly appreciated.
 
Old 12-04-2005, 07:07 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
so the computer boots fine.. but directly into windows?
try changing your boot order in the BIOS.. set hde (the linux one right?) as the first device to try and boot from
 
Old 12-04-2005, 08:06 PM   #3
deanerk
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Yeah, the computer boots fine into Windows, but Windows is on the same physical drive as Mandrake. This is how I understand it:

hda1: 131,069 Mbytes, type <0x7> (NTFS (or HPFS)) = old Y:\
hde1: 19,077 Mbytes, type <0x7> (NTFS (or HPFS)) = C:\ Windows partition
hde5: 5,812 Mbytes, type <0x83> (Ext2) = Linux \
hde6: 1,592 Mbytes, type <0x82> (Linux Swap) = Linux swap
hde7: 11,684 Mbytes, type <0x83 (Ext2) = Linux \home
hdf1: 38,162 Mbytes, type <0x7> (NTFS (or HPFS)) = my X:\ drive

See, my C:\ drive is labeled hde with hde1 being my 20GB partition for Windows and hde5, hde6, and hde7 making up the other 20GB of the drive as Linux partitions. I don't know why Linux did not name my "C:\" drive hda, but I suspect the bootloader LILO installs to hda by default. I think I just need to know how to install LILO to hde...
 
Old 12-05-2005, 07:47 PM   #4
deanerk
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Original Poster
Rep: Reputation: 0
^bump

Just wanted to get this back on the first page to see if anyone has any ideas for me to try. I'm guessing all I need to know is a simple install command to tell the bootloader where to install when I'm in rescue mode running off the disc.

If I need to have this addressed in a forum other than the newbie one, I'll see what i can do about having an administrator move this.
 
Old 12-05-2005, 08:18 PM   #5
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
Don't forget deanerk, that if it's mandrake/mandriva you've installed, then you can boot the first CD (or DVD, whichever you have) and when it gets to the bit about asking you too install or other options (maybe called advanced options) then if you hit whichever key it says for that, then when it drops you into a terminal type prompt, if you put in "rescue" (without the quotes) and follow the intructions for re-installing the linux bootloader, you should be able to boot the linux install.

Once you're in, then presuming that you can access the net, check out the bootloaders .conf file - I'm presuming that you will have used the default for mandrake/mandriva which is lilo, so the config file is usually at /etc/lilo.conf - also, if you've put the bootloader in the wrong place during install? well it needs to go on the first part of the MBR of the first hard drive, otherwise it can't see all installed OS's - yes, that means that you overwrite the windows MBR.

Thats a common snag for the uninitiated, they presume that because it's the linux bootloader, it goes with the linux install - well it can, but you still have to have some method of getting to the linux bootloader - so if you don't put it on the first part of the MBR, you need a boot floppy or something similar to get to it.

Windows doesn't like linux at all. Yes, you can make the windows bootloader boot a linux install, but I understand that thats hard work to start with and needs some prior knowledge of how it all works.

Once you've got the bootloader working OK, you can always change the default OS so that the system will default to windows - handy if you have someone else who uses the system as well as yourself.

don't forget, any changes made to the /etc/lilo.conf, need to be "applied" - so you'd make the changes, then as root in a termial, you'd just do
Code:
/sbin/lilo
and from the response you should see the changes you made being "applied".

regards

John

p.s. and no, if you happen to use grub as your bootloader you don't need to "apply" any changes, just modify the file, save and quit - and in that example, the config file is either /boot/grub/grub.conf or /boot/grub/1stmenu.conf

Last edited by bigjohn; 12-05-2005 at 08:20 PM.
 
Old 12-05-2005, 09:08 PM   #6
deanerk
LQ Newbie
 
Registered: Dec 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you for the reply John.

I have gone back into the rescue mode after booting to my install DVD and gone through re-installing the bootloader, but I'm not asked which drive to install it on. For some reason, one of my storage drives without an OS is seen as the first drive (and labeled hda by Linux) and I'm assuming that LILO is put there by default. In my BIOS, my first boot device is CD-ROM and second is hard disk 0 which is the drive I now have Windows and Mandrake installed on. If I go into the .conf file, can i change the location of LILO or move it? I'll have to play around a little I guess...

I'm not so concerned about the default OS as long as i can get the bootloader to come up.
 
Old 12-06-2005, 07:26 AM   #7
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
Quote:
Originally Posted by deanerk
Thank you for the reply John.

I have gone back into the rescue mode after booting to my install DVD and gone through re-installing the bootloader, but I'm not asked which drive to install it on. For some reason, one of my storage drives without an OS is seen as the first drive (and labeled hda by Linux) and I'm assuming that LILO is put there by default. In my BIOS, my first boot device is CD-ROM and second is hard disk 0 which is the drive I now have Windows and Mandrake installed on. If I go into the .conf file, can i change the location of LILO or move it? I'll have to play around a little I guess...

I'm not so concerned about the default OS as long as i can get the bootloader to come up.
Would it be worth while working out why the storage drive is seen as /dev/hda ??? and then swap them round so that it isn't???

'Cos I'm wondering whether it's something to do with the fact that the storage drive you mention isn't bootable i.e. it's formatted for storage, but without an actual OS too boot or something like that.

Also, when I was learning about bootloaders and stuff like that, if it caused any problems I just used to re-install the Linux OS, this has always been on a single hard drive though.

I'm thinking that the storage drive is set as one of the masters i.e. maybe the windows drive should be plugged and switched as one IDE master with the storage drive as slave and then the linux drive set as master on the other IDE channel.

I could well be completely wrong (never having had the need to install additional discs etc - in fact, since I dumped windows, I still have something like 50 gigs or so unallocated - so apart from doing it as a learning exercise, for me, it would be pointless).
 
Old 12-07-2005, 08:09 AM   #8
ylts
Member
 
Registered: Feb 2005
Location: Estonia, Tartu
Distribution: Gentoo linux
Posts: 101

Rep: Reputation: 15
lilo may be installed on wrong harddrive change boot order in bios and check that. I have sata and old pata hd in my pc and grub likes to install on pata drive instead of sata. It can be same with lilo. I`m not familiar with lilo but with grub you can choose whereto install boot loader like grub-install /dev/sda
 
  


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
Dual Boot LILO w/ no Floppy Drive aragonh Slackware - Installation 1 11-14-2004 12:29 AM
DUAL BOOT disk drive question linuxRules Linux - General 4 07-01-2004 10:42 PM
just installed Gentoo on separate hard drive, dual boot question Gates1026 Linux - Newbie 10 05-04-2004 04:11 AM
LILO using wrong kernel on dual boot system MS3FGX Linux - General 7 03-08-2004 01:50 AM
Another dual boot question - LILO difficulties dsknkt Linux - Software 9 05-11-2002 05:22 PM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration