Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MBR - is this safe?

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
Birdman
LXF regular


Joined: Thu May 05, 2005 12:59 pm
Posts: 145
Location: Wallington, Surrey UK

PostPosted: Sat Jul 23, 2005 5:20 pm    Post subject: MBR - is this safe? Reply with quote

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
Back to top
View user's profile Send private message
dandnsmith
LXF regular


Joined: Fri Apr 15, 2005 11:01 am
Posts: 308
Location: Berks, UK

PostPosted: Sun Jul 24, 2005 6:08 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
jjmac
LXF regular


Joined: Fri Apr 08, 2005 2:32 am
Posts: 1996
Location: Sydney, Australia

PostPosted: Mon Jul 25, 2005 2:55 am    Post subject: Reply with quote

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 ...
Back to top
View user's profile Send private message
Birdman
LXF regular


Joined: Thu May 05, 2005 12:59 pm
Posts: 145
Location: Wallington, Surrey UK

PostPosted: Mon Jul 25, 2005 12:38 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nordle
LXF regular


Joined: Fri Apr 08, 2005 10:56 pm
Posts: 1500

PostPosted: Mon Jul 25, 2005 12:56 pm    Post subject: Reply with quote

Im about to show my ignorance, but its not the first time Smile, 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
Back to top
View user's profile Send private message
jjmac
LXF regular


Joined: Fri Apr 08, 2005 2:32 am
Posts: 1996
Location: Sydney, Australia

PostPosted: Mon Jul 25, 2005 1:06 pm    Post subject: Reply with quote

(grin) I was worried there for a sec Very Happy

Oh well, you can guess my comments going to be Smile, (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:

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 Very Happy.


jm
Back to top
View user's profile Send private message
Birdman
LXF regular


Joined: Thu May 05, 2005 12:59 pm
Posts: 145
Location: Wallington, Surrey UK

PostPosted: Mon Jul 25, 2005 1:16 pm    Post subject: Reply with quote

nordle wrote:


I MUST have missed the point...


I thought much the same Smile 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.
Back to top
View user's profile Send private message
jjmac
LXF regular


Joined: Fri Apr 08, 2005 2:32 am
Posts: 1996
Location: Sydney, Australia

PostPosted: Mon Jul 25, 2005 1:17 pm    Post subject: Reply with quote

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 Smile


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 ...
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! 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
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast