LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   formating without erasing fedora and mbr (https://www.linuxquestions.org/questions/linux-general-1/formating-without-erasing-fedora-and-mbr-218556/)

a2ps 08-16-2004 09:48 PM

formating without erasing fedora and mbr
 
hi there,

i really don't know if this is the right place to post this question, but ill try it anyway.

so i have a hard drive that is split up into 5 partitions.
hda1, 5, 6 and 7 are ntfs partitions and windowsXP is installed on hda1.

and hda7 and 8 (swap) are for my fedora system, and i have grub on MBR. unfortunately i have to stick up with dual booting since this computer is not mine only, and now i have a need to format my windows partitions, so my question is, how can i format them and install windowsXP on hd1 without erasing fedora and the MBR because last time i did it, i had to install and config the fedora all over again..

Ive been using this method:

start the computer with win98 boot disk, erase the primary (hda1) partition with fdisk, create a primary one on that space and then after restarting the computer erasing it with the format utility. then i go into the i386 winXP cd directory and run winnt.exe

everything goes just fine, but after the installation, theres no more grub installed.. and so with no boot disk i cant go into my fedora installation, and i think it also erases fedora since it said it couldn't find any system with the explore2f utility for windows neither with partition magic.

thanks

dalek 08-17-2004 12:38 AM

I'm not a expert at this one but you should be able to install, re-install whatever, windoze and then boot the Redhat, Fedora, CD and go into rescue mode and follow the steps. That should put grub back on the MBR for you. I would copy or print the following.

fdisk -l /dev/hd<your drive here, sounds like b>

cat /boot/grub/grub.conf

Make a note of which one has the boot directory. I !think! it asks for that when you do the rescue. The stuff should be there from what you said. Windoze just hates Linux is all. May be just envy. :D

Hope that helps or gives a bump to get a real expert.

Later

:D :D :D :D

motub 08-17-2004 04:57 AM

If Fedora uses Reiser or some other fs (other than ext2 or ext3) by default (or you have specified some exotic filesystem type), Partition Magic won't see it, nor will explore2fs (explore2fs only works with ext2 and ext3, and afaik, PM doesn't know anything about working with Reiserfs, much less JFS or XFS or whatever).

Although you'd think that PM would see something, even if it didn't know what it was--- but as much as I like PM, I don't trust it so much when dealing with Linux partitions that I consider the fact that it doesn't see the partitions conclusive evidence that the partitions were erased.

There is no reason that the Fedora partitions should have been erased unless you specifically erased them yourself. The easiest way to make sure that they have not been is to boot from Fedora CD 1 and use the "rescue" function to boot into your installed Fedora. You'll have to do that anyway to restore the bootloader.

There is a remote possiblity that using a Windows FDISK to erase "non-DOS partitions", as you would have to do to erase an XP partition formatted to the NTFS filesystem, could also erase the Fedora partitions, but 1) I don't think Win98 FDISK is even capable of erasing Linux partitions, and 2) you have to specify a partition to be erased, so if you didn't specify the Fedora partition, it should not be touched.

Why don't you just use Linux fdisk, or cfdisk, or parted, or qtparted instead? You could even use the Fedora installer; just go up to the partitioning section, delete the XP partition, create a new partition (it can be FAT32, even; Windows will be happy to reformat it to NTFS during install), write the new partition table, then hit the reset button to get out of the install, and reboot to the XP CD to install XP.

Why do you run winnt.exe, anyway? Is there something wrong with just using setup.exe? On the whole, it seems like you're using an overcomplicated process to do a relatively simple task.

Anyway, hope this helps.

michaelk 08-17-2004 06:22 AM

You can not prevent XP from overwriting the MBR and it should ignore your linux partitions.

To restore the MBR boot the Fedora 1st install CD, select rescue mode and then enter the following commands:
chroot /mnt/sysimage
grub-install

LinuxLala 08-17-2004 12:05 PM

You can also, before reinstalling XP, boot into fedora and make a boot floppy. I'd say that the rescue cd option works just as well.


All times are GMT -5. The time now is 08:47 PM.