Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.
|
|||||||
Download Now:
Changing Linux on Slave Drive to Master Drive
|
|
Thread Tools | Search this Thread |
|
#1
|
||||
|
||||
|
Changing Linux on Slave Drive to Master Drive
I have Windows XP installed as the master drive (hda) and Mandriva 10.2 Linux on the slave drive (hdb). I want to physically remove the WinXP hard drive from my computer and make Linux the only drive. I boot up the computer using LILO, which is installed on hda. So how do I do all of this without messing up the bootloader settings?
|
|
#2
|
||||
|
||||
|
First, save the existing /etc/lilo.conf; cp /etc/lilo.conf /etc/lilo.0901705.conf
Second, read manpage re mkbootdisk. you may need this to recover the as-is configuration Third, I found it a lot safer to work out my LILO configuration using a floppy boot disk rather than my hard disk. To do this, you must replace the boot=/dev/hda with boot=/dev/fd0 in the lilo.conf file. That way, if I messed up any of the configuration in my lilo.conf file, I could take out the boot disk and boot into Linux as before. Once I was happy everything booted fine using the floppy disk, I then changed my lilo.conf back to use boot=/dev/hda and ran /sbin/lilo a final time to upload my changes. man 8 lilo explains the program options man 5 lilo.conf explains each line in the conf file before you make changes, issue the following as documentation ...mount later, this command will show /dev/hda? on / type ext2 (r/w) when you're successful Your existing LILO config should be at /etc/lilo.conf and will contain items like: boot = /dev/hdb? (first HD, some partition number suffix) ... bunch of stuff best left alone image = ... whatever it says .label = ... your lilo prompt at boot time .root = ... /dev/hdb? (note it matches line 1) other = /dev/hda1 (first HD, 1 partition) .label = WinXP (the lilo prompt for XP) .table = /dev/hda delete the lines from OTHER to the bottom, change hdb? to hda? (ie the same partition number, just different drive) save the modification to disk create the LILO floppy: try the -t option to see what it would do before doing it, and use boot= /dev/fd0 until you're pleased with the result. power down and move the 2hd to the end of the cable (cable select) and set as master if needed. the first hd can be used later via /etc/fstab insert the floppy and boot from it (you may need to change BIOS) if all is well, you will see your full system running and the command mount will verify the results. Now you can change the boot= /dev/fd0 back to boot= /dev/hda? and do the update for real. booting from the HD should be safe and give you what you want. ISSUE: /etc/fstab lines containing HDxy will need adjusting If you have several MOUNTABLE devices, this table may interfer with your results. Until booting the HD works, rename this file with the 'mv' command. Moving the cable connector will swap hda and hdb notations. When you recable the original HD, you have two options: use the space as DOS FAT or reformat as Linux ext{2,3} If you reformat the original, then all hda entries can be deleted. Any hdb entries in the saved fstab file need to become hda Modifications to /etc/fstab can be utilized immediately via login as root or the su command The new hdb will need a mount-point, so cd / mkdir /originalHD and then you can mount eg 'mount /dev/hdb /originalHD' Another typical location for mounts is /var/mnt/xxx |
|
#3
|
||||
|
||||
|
Excellent
![]() I knew someone would write this thing better than I ever could. |
![]() |
| Similar Topics | ||||
| Topic | Replies | Forum | ||
Installing an IDE drive as a slave with SATA as master
|
2 | Storage and Networking | ||
Master/slave drive not recognized
|
2 | Storage and Networking | ||
will erasing master drive leave slave unbootable?
|
3 | Storage and Networking | ||
Got New Master Hard Drive Old Slave Won't Work
|
2 | Storage and Networking | ||
Cannot Master boot but can see files as slave drive
|
0 | Windows OS | ||
| Thread Tools | Search this Thread |
|
|
All times are GMT -4. The time now is 12:11 PM.




Installing an IDE drive as a slave with SATA as master