Dual boot: Formatting windows affects Linux?
Hello All,
I have a dual boot system(windows + debian). I want to format my Windows C partition for some reasons. My question is will this affect the Linux partition which is on another drive? ps:First I have installed Windows and later Debian Squeeze thanks in advance, Anji |
No, if it's on another physical drive it would not. However, if it's on another partition on the same drive with Debian it definitely would.
If you want to be absolutely sure nothing happens to the drive with Debian you can physically disconnect it first, or simply disable it from the BIOS. You can then re-connect/enable it afterwards. |
And how about if Linux is on a different partition(say G:) on the same hard disk which has Windows os(say C:\).
|
Quote:
is it advisable to do such thing? |
Hi,
(warning: I haven't tested the following) if win C: is a partition, separate of linux, it shouldn't hurt at all. It is a _separate_ partition which linux simply disregards, whatever happening there. You may also format it under linux (look for 'mkntfs'). This gives you a little more security -- as your linux partitions are mounted while running linux, these cannot be easily overwritten (but you can overwrite the windows system instead). Obviously, everything may go wrong. If you end up reinstalling your win, linux will not boot any more (you have to re-install linux bootloader). The main safety measure -- make a backup (you are doing it anyway, right ;-). LQ Blogs |
Or
there is one another option, if at present your both OSs are on same disk and the bootloader is through Debian then first you can install the windows bootloader by booting your system with Windows CD. Then by pressing R from there you can come in repair mode and then selecting C:\ drive there, type fixmbr and press enter. This will install windows bootloader, then reboot your system. Now you will be able to access only windows and then you can format your C:\ drive and prepare new C:\ with windows OS. Then you can again install Debian bootloader with the help of Debian DVD or whatever media you have, to access Debian and Windows both. |
Quote:
Take it from me.....I did it !!! :mad: If it's on the same drive as Windows, boot into Debian and format the Windows partition with: Code:
sudo mkfs.ntfs [options] device [number-of-sectors] Code:
sudo mkfs.ntfs --help |
You can just use gparted in Linux.
Kind regards |
ok, I am going to perform the following steps.
1. Boot into debian(this is on another partition, say G drive). 2. Format windows using sudo mkfs.ntfs [options] device [number-of-sectors] 3. Reboot the pc with the XP cd in the cd drive and install the xp in C drive. Another method to try is: 1. Boot using a system rescue cd 2. Format the windows partition(C drive) using gparted. 3. Reboot the pc with the XP cd in the cd drive and install the xp in C drive. Will this be ok? |
anjumanu321,
what exactly are we talking about? * formatting a windows partition (out of several windows partitions) * re-installing windows (and formatting at least windows system partition)? |
Hold on !!! You are going to re-install XP on the same drive with Debian. Your first post said Debian was on another drive.
Although you will be formatting the Windows partition from Debian using whichever method you choose, when you re-install XP it will overwrite the MBR. This means while your Debian partition will still be intack, you will not have access to it. It's been a while since I've installed XP, does the installer give you the option to install/not install the Windows bootloader? If not, have you Debian installation media handy, you will most likely have to re-write the MBR for GRUB. |
Quote:
|
Quote:
No, the installer does not give the option to install/not install the Windows bootloader. |
If you proceed, have your Debian installation media handy, you will need to re-install the GRUB bootloader to the MBR of your HD.
|
Thanks for all your suggestions.I have successfully reinstalled XP and after a few hiccups got my Debian back :)
To sum up what I have done: First I reinstalled XP, this made the MBR to be overwritten.Result, I was not able to access my debian partition! Moreover I did not have my debian installation media to repair the grub. So I used a rescue cd(Rescatux available at http://www.supergrubdisk.org/) and followed the instructions at http://www.supergrubdisk.org/wiki/SuperGRUB2Disk. Boot with the cd and select the option 'Super GRUB2 Disk'.This will take you to next page where you have to select 'Detect any GRUB2 installation(even if MBR is overwritten). This option will search all partitions for grub2 installations (specifically for grub2 core.img files) and create a menu to choose among those that it finds. Select the debian rescue-mode option. Enter the root password and just give the commands: grub-install /dev/sda(or whatever your hard disk is) and then update-grub. Reboot the system.Thats it!! -- Anji |
All times are GMT -5. The time now is 12:33 PM. |