LinuxQuestions.org
Help answer threads with 0 replies.
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 08-30-2003, 01:23 PM   #1
karthik1024
LQ Newbie
 
Registered: Aug 2003
Distribution: RH - 9
Posts: 1

Rep: Reputation: 0
Question Booting from a slave disk alone


Hello everyone,

I am relatively new to linux. I had installed windowsXP and linux on the same hard-disk. Everything was working fine until my hard-disk developed a snag. Now it can only work as a slave and not as a master. I was wondering if it is possible to create a boot file using some program like lilo and write it to the MBR of a CD such that the CD causes the system to boot from the slave disk to windows/linux. I'll be thankful if someone can tell me wheather this is possible and if it is how to exactly go about doing it.

Thanks a lot.

Karthik
 
Old 08-30-2003, 06:04 PM   #2
nhs
Member
 
Registered: Aug 2003
Location: Edinburgh, Scotland
Distribution: Gentoo
Posts: 246

Rep: Reputation: 30
Try pressing DEL or ESC or F2 or whatever key your boot screen says you need to access the BIOS Setup and see whether you can change the boot order to boot from the second hard disk. This varies from one BIOS to the next however the relevant information will be in your Motherboard manual.

Once you've changes the BIOS settings, save them and reboot. When the lilo screen appears, press ESC to get the lilo prompt and enter:

linux root=/dev/hdb

Followed immediately by the number of the partition Linux resides on (1 for first partition, 2 for second, etc.). This will probably be 2. Press ENTER.

Once the machine has booted you should find yourself at a login prompt of some kind. Log in as root and, using whichever text editor you can (kedit, gedit, kate, emacs, vi) edit /etc/lilo.conf file so that the line root=/dev/hda2 reads root=/dev/hdb2 instead. You will also have to change boot=/dev/hda to boot=/dev/hdb and other=/dev/hda1 to other=/dev/hdb1. Any other references to /dev/hda will need to be changed to /dev/hdb. Once complete, add the lines:

map-drive=0x80
to=0x81
map-drive=0x81
to=0x80

under the other=/dev/hdb1 line. This will swap the Master and Slave in the BIOS so that the Windows boot loader can function (Windows can't boot off the second hard drive). Once done, save and exit whichever text editor you are using (if emacs then CTRL+X followed by CTRL+S to save and CTRL+X followed by CTRL+C to quit) (if vi then ESC followed by :wq to save and quit) and run lilo to install the modified boot loader. Next open up /etc/fstab and change any mention of /dev/hda to /dev/hdb. Save this file as well.

Reboot, lilo should boot both Linux and Windows XP fine.

I apologise if I have told you lots that you already knew however I have tried to cover everything (I have probably still forgotten something).

Good luck.
 
  


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
booting from secondary slave sharad durgawad Linux - Enterprise 2 03-18-2006 01:47 PM
How to boot from Slave hard disk? TigerLinux Linux - General 10 10-08-2005 02:44 AM
Mounting hard Disk (Slave) amer_58 Linux - Newbie 2 03-17-2005 06:35 PM
IDE controller ( 8212 ) and Disk as Slave LaoNiu Linux - Hardware 4 11-10-2004 06:32 AM
Duel Boot XP With Linux Booting From Slave Drive Toje Linux - Newbie 9 02-08-2004 04:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 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
Open Source Consulting | Domain Registration