LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-21-2012, 12:08 AM   #1
anjumanu321
Member
 
Registered: May 2011
Location: Hyderabad, India
Distribution: RedHat 6,Centos,Debian Squeeze
Posts: 49

Rep: Reputation: Disabled
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
 
Old 01-21-2012, 12:13 AM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
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.
 
Old 01-21-2012, 12:18 AM   #3
anjumanu321
Member
 
Registered: May 2011
Location: Hyderabad, India
Distribution: RedHat 6,Centos,Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: Disabled
And how about if Linux is on a different partition(say G on the same hard disk which has Windows os(say C:\).
 
Old 01-21-2012, 12:20 AM   #4
anjumanu321
Member
 
Registered: May 2011
Location: Hyderabad, India
Distribution: RedHat 6,Centos,Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by anjumanu321 View Post
And how about if Linux is on a different partition(say G on the same hard disk which has Windows os(say C:\).
also what care should I take while doing so.
is it advisable to do such thing?
 
Old 01-21-2012, 06:18 AM   #5
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
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
 
Old 01-21-2012, 07:38 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
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.
 
Old 01-21-2012, 10:17 AM   #7
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Quote:
Originally Posted by anjumanu321 View Post
And how about if Linux is on a different partition(say G on the same hard disk which has Windows os(say C:\).
If windows is on a different partition on the same drive with Windows, DO NOT format with windows. You WILL lose your Linux partition.

Take it from me.....I did it !!!

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]
For help:
Code:
sudo mkfs.ntfs --help
 
Old 01-21-2012, 10:30 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
You can just use gparted in Linux.

Kind regards
 
Old 01-21-2012, 11:19 AM   #9
anjumanu321
Member
 
Registered: May 2011
Location: Hyderabad, India
Distribution: RedHat 6,Centos,Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: Disabled
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?
 
Old 01-21-2012, 11:30 AM   #10
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
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)?
 
Old 01-21-2012, 11:36 AM   #11
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
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.
 
Old 01-21-2012, 11:37 AM   #12
anjumanu321
Member
 
Registered: May 2011
Location: Hyderabad, India
Distribution: RedHat 6,Centos,Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by otoomet View Post
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)?
re-installing windows
 
Old 01-21-2012, 11:41 AM   #13
anjumanu321
Member
 
Registered: May 2011
Location: Hyderabad, India
Distribution: RedHat 6,Centos,Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by towheedm View Post
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.
 
Old 01-21-2012, 12:26 PM   #14
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
If you proceed, have your Debian installation media handy, you will need to re-install the GRUB bootloader to the MBR of your HD.
 
Old 01-24-2012, 09:31 PM   #15
anjumanu321
Member
 
Registered: May 2011
Location: Hyderabad, India
Distribution: RedHat 6,Centos,Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply

Tags
dual boot



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing drive from linux affects dual boot? TuxLives Mandriva 6 01-04-2009 03:50 PM
Dual boot of windows (ext3 formatting) fwc Linux - Newbie 5 12-22-2008 07:23 AM
formatting just the Linux portion of Dual Boot system sri Linux - Desktop 4 08-27-2006 01:37 PM
Formatting linux on a dual boot kijju Fedora 3 06-12-2005 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration