Question Locked

I wish to remove Mandriva 2009 and leave XP behind

0 helpful
22 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do I do it? I tried google searching this but I get answers like.

"If you want to remove the grub boot and mandriva partition:
1 - boot with Mandriva One(he live edition)
2 - login as root : su -
3 - erase the first sector : dd if=/dev/zero of=/dev/hda bs=512 count=1
(replace hda for sda if your hard drive is SATA-connected) PAY ATTENTION TO
THIS COMMAND, DO NOT FORGET THE BS PARAMETER AND COUNT PARAMETERS
4 - remove the mandriva partition using the disk manager in the mandriva
control center
5 - reboot (so the changes will be taken into account).
6 - you should be directly into windows now. Defragment the disk, reboot
7 - start again the One edition and in the disk manager, select the windows
partition and click on the advanced options. enlarge the disk to the maximum
and validate.
8 - reboot, and you have now your full disk available"

Which just leave me scratching my head. Right about the "su" point it completely loses me.

I don't have XP discs.

I want to remove the duelboot Mandriva and restore the drive for XP only.

Help?

I have Hirens Boot CD already created if this can help.

22 replies

by seanferd

Was XP installed first?

Just delete the Mandriva partitions, and run FIXMBR (or one of the equivalents on the Hirens) to restore the XP boot loader.

I can't remember from the last time I did this, but does GRUB back up the other boot loader and allow a restore? Get into the GRUB GUI and have a look. All I know is, it took me all of two minutes, but my RH install was on another disk, so I didn't have to worry about the partitions.

Not sure about reclaiming the newly unused disk space while keeping the XP install intact, but try the Easus free version
http://www.partition-tool.com/
if none of the Hirens CD utilities covers this.

edit: You can get a copy of fixmbr on the 'net. Example- http://www.ambience.sk/fdisk-master-boot-record-windows-linux-lilo-fixmbr.php (doesn't matter that it mentions LILI instead of GRUB).

Or an XP boot disk
http://www.bootdisk.com/

Or see
http://support.microsoft.com/kb/305595

You can make a boot or ERD disk from your XP installation. If recovery console is installed, you can use that to fixmbr.

by slayer_

Ok, yes XP was installed first.
I assume fixmbr is a dos command. How do you run it though? How can you get to safemode in XP with grub in the way?
I also have no idea if it backs it up, and its impossible for me to get to the grub config utility in Mandriva as my Mandriva install is completely wrecked and unusable.

A detailed step by step one be very helpful, something I can print off and follow along please.

by seanferd

so it loads first. Better yet, set the timeout on GRUB for 10-30 seconds, so you know when it is finished. Does it have a choice to just restore the previous boot record? If so, use that.

If you have recovery console installed, press F12 once GRUB has finished to get to the Windows boot options. From there, follow the instructions to load the recovery console.

http://pcsupport.about.com/od/fixtheproblem/tp/recovery_console_commands.01.htm

You should be able to access GRUB when it is active during boot - it is separate from the distro. How would you choose to access either OS otherwise?

Let me take a look at the Mandriva docs to see what is up with this. I had no problems with a way-out-of-date RedHat install, you just pressed a key to enter the GRUB menu.

if you can, borrow someone's XP disk, boot from the CD, and run the recovery console from there. We can worry about the partitions later.

by oh smeg

Partitions and allow the system to Boot but do not choose to use whichever Boot Loader you have running here. Just let it start the default OS which should be XP.

Mandriva should have installed the Boot Loader to the Root of the Drive in the Primary partition if it was being used or you could be using the XP Boot Loader.

Yes [b]FIXMBR[/b] is a DOS command and you can run this from the XP Install Disc or any M$ Boot Disc but you need a Boot Disc to do this.

http://www.bootdisk.com/bootdisk.htm

You'll also need some kind of Partitioning Utility like GParted

http://gparted.sourceforge.net/livecd.php

To reclaim the unused portion of the HDD that previously had Mandriva installed on it.

Col

by seanferd

http://www.sysint.no/Download/tabid/162/Default.aspx

an MBRfix is available here. Include that on the disk. Assuming the XP has no Recovery console, which would be easier.

The Hirens Boot CD has many MBR tools
http://www.hiren.info/pages/bootcd

I think this seems more complicated than it looks. Part of the problem is that Mandriva has a GRUB setup util in the OS, and I see no mention of a key to press at boot time to invoke the GUI menu. (I always leave mine with a timeout.) If the GRUB is modified by the distro, I have no idea how to access it. But there are several ways to go, and the procedure should be fairly short and painless, really.
(see list under MBR)
One of those has to work for XP.

by rob miners

if your system is capable of running Vista. It hasn't been tested either.

The Windows Vista Recovery CD could be used to Boot your PC so that you can use Bootsect.exe to restore the Ntldr program. Use the Vista Recovery CD to Boot to a Command Prompt where you can run these Commands to apply the master boot code that is compatible with NTLDR to the volume labeled C.

1. Creating a Windows Vista Recovery CD

2. Download from here

Burn it to CD with Nero or similar.

Boot from the Vista CD and on the first screen click Next, click Repair your computer, click Next and select Command Prompt.
type the following command: bootsect.exe /nt52 C: and press Enter.

After the computer restarts, Ntldr.exe loads and Boot.ini loads.

Delete or remove the partition/s where you have installed Mandriva 2009 in Disk Manager if you can see it. If not use the command line DiskPart by booting from the Recovery CD.

Type in diskpart and press Enter after each command as in this example:

X:\sources>diskpart

Microsoft DiskPart version 6.1.7000
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: W780

DISKPART> sel dis 0

Disk 0 is now the selected disk.

DISKPART> list par

Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 200 MB 1024 KB
Partition 2 Primary 32 GB 201 MB
Partition 3 Primary 42 GB 32 GB

DISKPART> sel par 3

Partition 3 is now the selected partition.

DISKPART> del par 3

Bootsect Command-Line Options

http://technet.microsoft.com/en-us/library/cc749177.aspx

A Description of the Diskpart Command-Line Utility

http://support.microsoft.com/kb/300415

by slayer_

XP was installed first.

I have no idea how Mandriva installed, I did everything default, it made partitions for everything, and shrunk my XP partition to 7gb.

When the system boots up, grub loads and I can choose in this order:
Mandriva 2009
Mandriva 2009 safe mode
Windows XP

I don't wish to change the order as I simply want to remove Mandriva all together as it does not meet my needs for an OS. While attempting to make it meet my needs, I have completely wrecked it to the point that the GUI no longer works and I can only use Mandriva in the CLI, which is completely useless to me. I took courses on Nix CLI a LONG time ago and the only thing I remember now is "LS" and "CHMOD".

I am confident I can figure out hwo to reclaim the space, or otherwise I can make a new partition and it can be my programs partition, so merging is not a problem, but removing GRUB and Mandriva is. I want them gone. Partition deletion should be easiy enough from "manage" inside XP, if not, I can use Hirens.

Now what I have picked up so far from these responses is that I need an XP boot disk. I do not have one... Not for XP Home anyways, but that Hirens boot CD has a fixmbr built into it? If not, I know it has the MINI XP that Im betting can do the same thing right?

Will FixMBR remove grub and let me boot into XP nativly and thus allow me to simply delete the mandriva partitions?

by slayer_

I don't even have Vista. This computer would probably explode if it came in contact with Vista, it doesn't have the CPU, HDD, or RAM for Vista, no where even close!

Also it isn't Lilo its grub (haven't seen Lilo is a long time...)

"Boot from your media CD"????

by slayer_

Immediately after I login to the distro, it kicks me back to the login screen. Occasionally it throws me to the CLI.

by rob miners

I thought that you may have downloaded something that would boot the System for you to allow you to run Mbrfix. Has this System got a floppy drive. If it has, boot into XP and creat a Boot disk. Copy MbrFix onto it and boot from it. Run MbrFix and see if it will work for you. I'm not familiar with Hirens and I couldn't find a download on the link that Sean provided so that I could test it.

How to create a bootable floppy disk for an NTFS or FAT partition in Windows XP

http://support.microsoft.com/kb/305595

by seanferd

Yes, all you need to do is rewrite the MBR, then nothing but XP will boot. Take your pick of the suggestions as to how you want to do this. Make an XP boot disk (floppy, CD, flash drive) and add the MBRfix.exe to it. Or, use one of the appropriate programs off the Hiren's CD http://www.hiren.info/pages/bootcd
**
MBR (Master Boot Record) Tools
MBRWork 1.07b
a utility to perform some common and uncommon MBR functions

MBR Tool 2.2.100
backup, verify, restore, edit, refresh, remove, display, re-write...

DiskMan4
all in one tool for cmos, bios, bootrecord and more

BootFix Utility
Run this utility if you get 'Invalid system disk'

MBR SAVE / RESTORE 2.1
BootSave and BootRest tools to save / restore MBR

Boot Partition 2.60
add Partition in the Windows NT/2000/XP Multi-boot loader

Partition Table Doctor 3.5
a tool to repair/modify mbr, bootsector, partition table

Smart Boot Manager 3.7.1
a multi boot manager

Bootmagic 8.0
This tool is for multi boot operating systems

MBRWizard 2.0b
Directly update and modify the MBR (Master Boot Record)
**
Try one, and seeif it says it will work for XP, or look up the documentation. You already have a bootable CD with MBR tools on it.

You also mention you don't have an XP boot disk -not for XP Home, anyway. Good news! Doesn't matter! If you have an XP Pro boot disk, it should be fine - all you need to do is rewrite the MBR - you aren't installing the OS. (Same goes for a VIsta CD - you aren't installing the OS, just fixing the MBR).

I'm still surprised that there are no options in the GRUB boot menu to at least configure it, if not restore the old XP MBR.

And if you want to, making an XP boot floppy is easy - just format the floppy, and check the box "Make MS-DOS startup disk". Add the MBRfix file to it.

by slayer_

XP should just boot up normally and the Mandriva partitions are just dead and can be removed through the partition manager in XP?

by seanferd

All you need to do is the FIXMBR type thing to restore the XP boot sector. Just use whichever option you can easily boot and use.

If the XP partition manager can see the (ext3?) partition, you can probably delete them. Then you create new partition(s) and format them, so XP can use them. If the XP partition manager won't work for some reason, just use one of the free partition managers linked in previous posts (GNUParted, Easus), or there seems to be a lot of them on the Hiren's CD.

If you pick a specific method you want to use, but are unsure of any command switches (if necessary), just post back. :)

by slayer_

Thanks for help, MBR Doctor had the tool I used, was easy, just select the partition I want to boot from, and choose rebuild MBR.

Thanks for help folks, now I gotta go reclaim space.

by slayer_

I gave up with Nix, and decided to fix the system, got Windows down to 20 processes after bootup. After SP3, only using 300mb of RAM out of the 512 it has. Got Orca and GOM installed, its running super smooth. only using 5gb of space now. it is far faster than Mandriva was, and I haven't wrecked it yet. And I recently learned that this system can play some of my older games very nicely such as monster truck madness and X-com whereas me newer systems cannot. I bet it can play populous nicely as well (LAN Parties! lol). It may be an integrated SiS, but its peppy comparatively to the Intel Equivalent. I ran GTA3 on it and got roughly 15fps at mid graphics and 640 x 480 Res. That's respectable :).

It's just a system to sit in my bedroom, a staged computer, for while we are selling the house, to show what this space in the room is used for. And it just plays screensavors and various cute movies randomly.

by rob miners

looks like you have it all worked out. Good Luck ;) :D

by slayer_

Next time I am watching Top Gear and they make reference to an old episode, I can immediately go and watch it on youtube :).

When I move out I'll probably take this machine with me to be my new server and junk my old junker in the basement doing the same task. I can get far better security on XP than I canon win98 lol. It's just too bad this system is way to small for vista.

by seanferd

I thought it should be fairly painless. Glad you found a tool you could easily use.

This discussion is closed to new replies.