[SOLVED] Dual boot: Formatting windows affects Linux?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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 ;-).
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
Rep:
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.
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.
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.
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.
Sorry for the confusion.Both the OS are on the same drive.
No, the installer does not give the option to install/not install the Windows bootloader.
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!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.