MBR - is this safe?

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

MBR - is this safe?

Postby Birdman » Sat Jul 23, 2005 4:20 pm

My recently built box holds a mix of old and new. I made the mistake of having my old ide drive contected as well as my new SATA drive when I installed WinXP. The result is WinXP installed on the SATA but the bootloader sitting on /dev/hda. As the SATA drive will be the constant in my future plans I want to install lilo on my linux boot partition, and have WinXP bootable from there. The only way I can see this working is to disconnect /dev/hda so that only the SATA drive is connected and run fixmbr from the windows recovery console. Doing this should allow lilo to use the chainloader and also boot WinXP. FYI I currently have windows boot from the /dev/hda mbr and pop in a floppy (with lilo installed on it) to boot linux.

The big question is - Am I safe doing this?

Thanks.

NB I suppose this is really a windows question, but I trust linux folk :wink:
Birdman
LXF regular
 
Posts: 145
Joined: Thu May 05, 2005 11:59 am
Location: Wallington, Surrey UK

Postby dandnsmith » Sun Jul 24, 2005 5:08 pm

You need to get
1. the SATA drive bootable from the BIOS
2. a MBR installed and configured on the SATA drive
3. the Windows partition marked as bootable
4. WinXP on the SATA set to boot on the SATA drive

1. - easy to fix
2. - not sure if fixmbr will do this (will fixboot?)
3. - can do this in linux
4. - need to see about the NTLDR file and boot.ini (probably both on the PATA drive at present.
Derek
dandnsmith
LXF regular
 
Posts: 314
Joined: Fri Apr 15, 2005 10:01 am
Location: Berks, UK

Postby jjmac » Mon Jul 25, 2005 1:55 am

Am i going crazy, isn't this basically the same situation (or very similar) as to what you had the other month !?


jm
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
jjmac
LXF regular
 
Posts: 1996
Joined: Fri Apr 08, 2005 1:32 am
Location: Sydney, Australia

Postby Birdman » Mon Jul 25, 2005 11:38 am

jjmac wrote:Am i going crazy, isn't this basically the same situation (or very similar) as to what you had the other month !?


jm


jm, you're not going crazy. You may recall that I had several issues to resolve and as I had managed to install lilo on a floppy (thanks for your help) I needed to move on to sort out other stuff. Now that I have made progress I am looking to revisit this boot issue. I am now more familiar and comfortable with how lilo works and understand a little more about the boot process. It seems to me that the solution to problem is going to have to revolve around Windows. By discontecting /dev/hda Windows will have no way of booting. If I have XP use its own tool to write to the MBR of /dev/sda then XP will have a way of booting and I then simply reconfigure lilo to include Windows. I still do not know enough to be confident that I am not going to destroy access to my linux stuff on the drive.

As an aside. I am "borrowing" a backup script that will use rsync to mirror specified file systems to a large partition I have created on /dev/hda. Once I have implemented this I will have a bang up to date backup of everything that matters and will give me a little more confidence to experiment. Even so, it would be nice to have it work and not to have to spend hours piecing my system back together again :wink:
Birdman
LXF regular
 
Posts: 145
Joined: Thu May 05, 2005 11:59 am
Location: Wallington, Surrey UK

Postby nordle » Mon Jul 25, 2005 11:56 am

Im about to show my ignorance, but its not the first time :), but why is there a problem?

If your using lilo, then the only thing which needs to know which drive to boot first is the BIOS.

Once the BIOS is configured to boot the desired drive, this will load lilo and that takes over, so as long as lilo is told where the windows partition is, its all good and you can boot anything.

I MUST have missed the point...
I think, therefore I compile
User avatar
nordle
LXF regular
 
Posts: 1500
Joined: Fri Apr 08, 2005 9:56 pm

Postby jjmac » Mon Jul 25, 2005 12:06 pm

(grin) I was worried there for a sec :D

Oh well, you can guess my comments going to be :), (what does the table look like these days) (grin)

]# cfdisk -Pt /dev/hd<n>

Might as well let XP have its' way though. Just do a dd copy of the hda master boot to a floppy, then install Lilo to the hda master boot, add references to XP and the other disks in /etc/lilo.conf, then run lilo as root with the -t switch (test), then if that passes, run it without the switch. You should get a copy of the mbr in your /boot directory as "boot.0300" for hda. Once it's working you can experiment with other configs, and restore hda back to its' original state. But getting it up and working would probably be the best idea first. I can remember you spent a lot of time on this before.

my old OSR2
Code: Select all
other=/dev/hda1
  map-drive=0x80 to=0x81
  map-drive=0x81 to=0x80
  table=/dev/hda
  label="dos"
# not really needed, since this drive is already 0x80,
# but "master-boot" is a good idea to put on any
# "other=" that must boot from the "C:" drive.
##  master-boot
##  alias=8


I think i must have had the disks (ide) swaped at the time, thus the map= options.

wow/duck ......, i just posted and theres nordle,..... nop, your not missing the point :D.


jm
jjmac
LXF regular
 
Posts: 1996
Joined: Fri Apr 08, 2005 1:32 am
Location: Sydney, Australia

Postby Birdman » Mon Jul 25, 2005 12:16 pm

nordle wrote:
I MUST have missed the point...


I thought much the same :) However, the "first" drive on my system is apparently the IDE drive. This is what windows needs to boot. My SATA drive is not the first drive. I find it most bizarre the way Windows sees the system. My IDE drive just happens to have a FAT32 partition on it. I created an NTFS and FAT32 partition on my new SATA drive as a home for XP. Following the installation XP sees /dev/hda1 as the C:\ drive and /dev/sda2 (where XP is actually installed) as the D:\ drive. The FAT32 data partition is /dev/sda6 (or in win speak - E:\).

I have tried to trick windows with lilo but because the first stage bootloader for windows is on /dev/hda lilo cannot get to stage two ie load XP from /dev/sda2. This is why I have lilo on a floppy at the moment. If I write it to hard drive I will not be able to boot XP (you may see this as being a good thing :wink: ) Having the Windows first stage bootloader on /dev/sda I believe should solve the problem. However, unlike with lilo, that I can test using a floppy and not break my system, I just need to press the button and wrtie to the MBR with Windows. Until I am pretty certain that this will not destroy everthing I do not have the bottle to do it.
Birdman
LXF regular
 
Posts: 145
Joined: Thu May 05, 2005 11:59 am
Location: Wallington, Surrey UK

Postby jjmac » Mon Jul 25, 2005 12:17 pm

birdman, your over complicating the whole thing. I think that was the case before as well. nordle just put it in a nutshell. Just set the boot sequence in the bios and then it will be up and running. Once thats done then you could experiment with some other config if you want. Don't go installing Lilo all over the place though, it's messy (grin), dump the configs :)


jm
http://counter.li.org
#313537

The FVWM wm -=- www.fvwm.org -=-

Somebody stole my air guitar, It happened just the other day,
But it's ok, 'cause i've got a spare ...
jjmac
LXF regular
 
Posts: 1996
Joined: Fri Apr 08, 2005 1:32 am
Location: Sydney, Australia


Return to Help!

Who is online

Users browsing this forum: No registered users and 3 guests