Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to make second HD (linux) bootable?[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
calicoman
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 171

PostPosted: Sat Feb 23, 2008 11:38 pm    Post subject: How to make second HD (linux) bootable?[solved] Reply with quote

Not sure this should be here on on the installation section, but here goes.

I had winXP on drive C and Gentoo on drive D. My C drive just failed and what I want to do is to change my BIOS and boot directly into the Gentoo drive. I am thinking that there is more to that than just using my install disk and changing hdb1 to be bootable with cfdisk. Also, I think that the boot map needs to be copied to hdb1.

I hope that I can do this without using grub as I have already lost one windows drive because I misconfigured it. I used lilo to dual boot until todays crash. Is the bootloader actually installed on the first drive or is it on the Gentoo drive and referenced by the mbr on the winXP drive. How about the partition table also.

Since I have always dual booted I have had to learn this stuff.


EDIT: SEE MY LAST POST FOR A CLEARER PICTURE OF WHAT I WANT


Last edited by calicoman on Sat Mar 01, 2008 2:59 pm; edited 2 times in total
Back to top
View user's profile Send private message
flybynite
l33t
l33t


Joined: 06 Dec 2002
Posts: 620

PostPosted: Sun Feb 24, 2008 12:00 am    Post subject: Reply with quote

More info is needed to make sure you are trying to do the right thing.

Can you boot into gentoo by selecting inside the lilo menu or does the menu not show now?

Are you planning on removing the C: drive? Is the drive itself the problem or is just windows messed up?

Can you show your current /etc/lilo.conf? You might be able to use a live cd to do this.

There are a couple of choices you made when installing lilo that we need to know to be sure.

If you just want to temporarily boot linux you can make a grub boot floppy or use a live cd.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Feb 24, 2008 2:58 am    Post subject: Reply with quote

One easy way to check which harddrive the bootloader is installed on is to just unplug the Windows harddrive, and then see if the machine is able to boot Gentoo directly.

BTW, the "bootable" flag that you can see with fdisk / cfdisk is purely a figment of Microsoft's imagination, and has no effect on your ability to boot Linux.
Back to top
View user's profile Send private message
calicoman
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 171

PostPosted: Sun Feb 24, 2008 3:17 am    Post subject: Reply with quote

I have already replaced C: with an old 144MB drive I had kept laying around just for emergency purposes, booted with my install CD and rewrote the partition table and reinstalled lilo. So I am actually using D: drive.


Lilo.conf is:


lba32
# MBR to install LILO to:
boot = /dev/hda
map = /boot/.map

default=Gentoo
menu-scheme=Wb
prompt
# If you always want to see the prompt with a 15 second timeout:
#timeout=200
delay = 50
# Normal VGA console
vga = normal

# End LILO global section

# Linux bootable partition config begins
#
image = /boot/linux-2.6.23-gentoo-r8
root = /dev/hdb3
label = Gentoo
read-only # read-only for checking
#
# Linux bootable partition config ends
#

#
# DOS bootable partition config begins
#
other = /dev/hda1
label = WindowsXP
table = /dev/hda
#
# DOS bootable partition config ends
#

I guess I have already answered the question of where lilo resides and that can be readily changed. Does the table refer to the partition table for both hda and hdb ?

The reason I want to make this drive bootable is that I would just as soon have both drives bootable (when I replace C: drive) and make my choice from the BIOS.

What really makes me mad is that it was the newest drive I have in all my 4 computers and now I will probably have to spend another $100 for another version of XP (other 3 use winME)as well as the cost of a new drive. Oh well it will make Billy glad.

Anyway, I appreciate the response.
Back to top
View user's profile Send private message
robdd
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2005
Posts: 142
Location: Sydney Australia

PostPosted: Sun Feb 24, 2008 3:36 am    Post subject: Reply with quote

Hi calicoman, I'm glad that you're back in business, even though you have lost your Windoze disc :(

I'm sorry to hear that you have had problems with grub - I haven't had any trouble so far. One very useful tool is a grub floppy and/or a grub CD which you can boot off. Then, even if you're primary drive is toast, you can use grub to boot off the second hard drive very easily.

There *is* a "gotcha" if you try to move an IDE drive from slave to master and then boot into Linux - the entries in fstab change from hdbX to hdaX, so you have to edit the fstab entries before you can boot. Same holds true for SCSI or SATA discs.

Quote:

BTW, the "bootable" flag that you can see with fdisk / cfdisk is purely a figment of Microsoft's imagination, and has no effect on your ability to boot Linux.


cyrillic is almost right here - I was caught by my new Intel motherboard, which is sooooooooo smart that it won't boot off a primary partition that doesn't have the bootable flag set. It really had me going for a while. Gee I hate software (and now firmware) that tries to help me - and then gets it wrong !

Regards, Rob D.
_________________
Rob Diamond
Gentoo Hack, hack, hacker
Sydney, Australia
Back to top
View user's profile Send private message
calicoman
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 171

PostPosted: Mon Feb 25, 2008 4:30 pm    Post subject: Reply with quote

Thanks for the replies guys.

I guess I didn't explain myself adequately. I can boot and get to Gentoo without problems.

What I want to do is change the boot order in my BIOS and boot directly to my second drive (Gentoo). In the process of setting up to do this I don't want to screw up this drive. Can I change the line in lilo.conf to:
boot=/dev/hdb
and accomplish this. It would seem to me that it would work if my drive hdb partition table is written to hdb and not hda. Would I also have to do something to the:
table=/dev/hda
section?

Frank

Edit 2/28/08
Back to top
View user's profile Send private message
calicoman
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 171

PostPosted: Sat Mar 01, 2008 3:47 am    Post subject: Reply with quote

EDITED BUMP
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Mar 01, 2008 4:30 am    Post subject: Reply with quote

Quote:
boot=/dev/hdb

Did you ever think how a PC boots? After POST is finished BIOS executes the code on the MBR of first HDD. You change boot order in the BIOS - another disk becomes first - and is new hda. Obviously you need to fix your fstab before you re-run lilo.
Back to top
View user's profile Send private message
pappy_mcfae
Watchman
Watchman


Joined: 27 Dec 2007
Posts: 5999
Location: Pomona, California.

PostPosted: Sat Mar 01, 2008 5:45 am    Post subject: Reply with quote

calicoman wrote:
Thanks for the replies guys.

I guess I didn't explain myself adequately. I can boot and get to Gentoo without problems.

What I want to do is change the boot order in my BIOS and boot directly to my second drive (Gentoo). In the process of setting up to do this I don't want to screw up this drive. Can I change the line in lilo.conf to:
boot=/dev/hdb
and accomplish this. It would seem to me that it would work if my drive hdb partition table is written to hdb and not hda. Would I also have to do something to the:
table=/dev/hda
section?

Frank

Edit 2/28/08


I don't see why you don't do it the easy way:

Physically reconfigure the drive. If the drive has jumpers, set it to master instead of slave or cable select. If the drive actually configures itself with cable select, just swap the master cable to the drive. If you do this, your Gentoo drive will become /dev/hda.

You will then have to edit /etc/lilo.conf, and replace all instances of /dev/hdbx with /dev/hdax. You will also have to edit /etc/fstab. This is a very important step. An incorrect /etc/fstab can prevent booting. I found that out the hard way.

You will also have to set the bootable flag via fdisk or cfdisk. This goes without saying, but I said it nonetheless.

The final step is to run lilo. If it works the first time, smile and breathe a sigh of relief. If not, tweak /etc/lilo.conf if need be. Reboot and you're done.

What you want to do 's a very doable thing. You just have to make absolutely sure you are looking at your fstab and lilo.conf the way your computer does. If you do, things will go smoothly. If not, then you'll get experience in debugging.

Good luck.

Blessed be!
Pappy
_________________
This space left intentionally blank, except for these ASCII symbols.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum