reinstall XP while keeping BSD

Hi all,

I have two systems on one physical disk within my computer - WinXP (for my wife :-) ) and BSD (for me :-) ). As it is well known and common, my XP is not an exception and has become really eroded so now I intend to reinstall it.

However, I am afraid that while reinstalling Windows, the installer just wipes out the MBR and places there its own information - an information which tells the user that the only system on the disk is XP.

I have much of my work on my BSD part, so it would be really a pity to have lost it. Moreover, one of the partitions managed by BSD is a geli-crypted one.

I was thinking to backup somewhere my grub.conf and simply let XP installer to finish its work and overwrite MBR. Then I plan to boot with some LiveCD and do the manual work on GRUB.

Is my line of reasoning OK?
Could you please tell me how exactly to proceed so I could gladly re-install XP and keep my BSD intact?
Will my geli-partition stay untouched? (I do not see any reason for the opposite, however it is better to ask :-) )

Thnx a lot!
NoE
 
save mbr
dd if=/dev/ad0 of=/path/to/mbr.img bs=512 count=1
or you can probably copy /boot/mbr to some place safe ;) , fash

restore mbr
dd if=/path/to/mbr.img of=/dev/ad0 bs=512 count=1


alse there was some way to load bsd from Windows loader (vista for sure, not 100% sure about xp), but i can't find the article anymore

some windows don't let you specify disk partition sizes and just wipe out everything and create 1 big peace of junk (i have oem vista, that does this). I suggest you check if yours is different on emulator

otherwise it all should be ok.
if something goes wrong with mbr, don't worry it is more than possible to restore it.

If you have problems just let us know.
 
killasmurf86 said:
alse there was some way to load bsd from Windows loader (vista for sure, not 100% sure about xp), but i can't find the article anymore
I did it the past with linux and w2k (same as xp), I'm not sure it works for bsd. Theoretically it should but I've never tested it.
You just have to run dd in the same way but specifing the partition where the os to be booted is installed. For example, for linux it was the partition mounted as boot.
Then move the output file to c:/ and add an entry pointing to the file in c:/boot.ini (not sure about the name, can't remember).
I've never seen vista, but I think that doing the same with vista is far more complex and requires more operations from vista.

Another option should be installing xp and then using boot0cfg using the livefs cd.
 
Hi,

ale said:
Then move the output file to c:/ and add an entry pointing to the file in c:/boot.ini (not sure about the name, can't remember).

Perhaps you are refering to XP boot utility, which I do no like to use - I would like to use GRUB instead :-)

For Vista I am not sure and I have not the guts to proceed with. XP proved to be enough from Windows world :-)
 
NoE said:
Perhaps you are refering to XP boot utility, which I do no like to use - I would like to use GRUB instead :-)
That's fine. When you will be able to boot FreeBSD with the ms bootloader, you can install grub over the MBR.
 
killasmurf86 said:
if something goes wrong with mbr, don't worry it is more than possible to restore it.

How? I know only way with Live CD.
Also where to run dd from to restore mbr? From within Windows?
 
zeiz said:
How? I know only way with Live CD.
Also where to run dd from to restore mbr? From within Windows?
no dd under windows, I guess, although there are some strange bunch of "unix-utils" for windows :-)
....so I am gathering knowledge and guts to proceed - perhaps this weekend will be the right time. Anyway, I will place here the results of my work afterwards.
NoE
 
With my friend we are trying to compile a small instruction for newbies how to install and configure FreeBSD with dual boot with Windows (hopefully Win7 already). It supposed to be some kind of the Handbook but very "compressed" to fit in 3-4 pages. It's not important first to understand "why" it's important to know "how". Since Windows is well known subject for instant reinstall MBR restoration is very important point. It would be easier having a floppy, however nowadays many computers have no fdd. So any hints and tips would be highly appreciated :)
 
killasmurf86 said:
save mbr
dd if=/dev/ad0 of=/path/to/mbr.img bs=512 count=1
or you can probably copy /boot/mbr to some place safe ;) , fash

restore mbr
dd if=/path/to/mbr.img of=/dev/ad0 bs=512 count=1

so finally I have gather enough guts to proceed. I have saved the mbr.img as you have proposed and reinstall XP on its partition - it went fine although sometimes it drove me mad :-)

however after finishing it, I have started Live DesktopBSD and restored the mbr.img (from fat32 USB disk) and everything is at it was.

so thnx a lot and good luck to you when you will need it!
 
Back
Top