LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-08-2009, 01:30 PM   #1
harish2312
LQ Newbie
 
Registered: Jun 2009
Posts: 1

Rep: Reputation: 0
recovering windows from pclinuxos


hello friends,
i am new to linux, infact i stumbled upon linux as i had corrupted my hard disk trying to make a live usb using gparted, so i installed pclinuxos of whose i was trying to make a live usb. i deleted all my partitions, made new partitions for linux ( /, home and swap) all this consumed my 25 gb of hard disk space, and i have 160 gb of hard disk. so i was thinking to make use of that space and install windows xp on the rest of my disk space. now when i put my bootable windows xp cd, i get an error that no hard disk is installed, but i know that there is a place alloted by me when i installed pclinuxos and that is 135 gb of an NTFS partition which is not visible from pclinuxos.
can anyone help me installing windows xp on the remaining hard drive?
i am scared to use gparted as i had already lost my operating system cos of my negligence in selecting the appropraite drive letter.
thanks in advance
 
Old 06-08-2009, 02:03 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
I believe that the first partition has got to be a Windows system partition. I'm not sure about that.

Also, it is not unusual for a disk that was partitioned under open source software to have compatibility problems with Windows.

The best course of action is to install Windows then install Linux.

You should be able to get Windows installer to recognize the disk if you zero out the MBR. For example if the disk is /dev/sda then you could open a terminal window under the root account and enter the following command.
Code:
dd if=/dev/zero of=/dev/sda bs=512 count=1
There are numerous discussions on this subject at this web site. Use the web site search feature to look for keywords such as "windows install".

Last edited by stress_junkie; 06-08-2009 at 02:07 PM.
 
Old 06-08-2009, 02:39 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by stress_junkie View Post
I believe that the first partition has got to be a Windows system partition. I'm not sure about that.

Also, it is not unusual for a disk that was partitioned under open source software to have compatibility problems with Windows.

The best course of action is to install Windows then install Linux.

You should be able to get Windows installer to recognize the disk if you zero out the MBR. For example if the disk is /dev/sda then you could open a terminal window under the root account and enter the following command.
Code:
dd if=/dev/zero of=/dev/sda bs=512 count=1
There are numerous discussions on this subject at this web site. Use the web site search feature to look for keywords such as "windows install".
When giving this kind of advice it always a good idea to warn about the consequences. This command will erase the whole MBR, including *also* the partition table, which means that no OS will be able to see your partitions until you recreate them. The data will be intact, but you will not be able to access it via your OS normally. Testdisk can fix this, amongst many other problems.

If you want to zero out everything *but* the partition table, use this instead:

Code:
dd if=/dev/zero of=/dev/sda bs=446 count=1
This will erase the bootloader, which means that you will not be able to boot unless you reinstall it. Installing windows will provide you with the windows bootloader, which will allow you to boot windows. Linux will still be installed but you won't be able to see or boot it. You would need to reinstall grub or lilo (whatever your distribution uses) before you are able to boot it.

Both can be configured easily to boot windows as well.

It's true that windows is a complete moron when it comes with dealing with other OSes. It's part of their policy that Windows is the only OS you will never need. So there's no need to make it interact in a friendly way with the rest.

That's why, in general, and if you don't want to bother, the easiest thing is to install windows, then linux. Most linux installers will add your existing windows partition to the bootloader for you.

Last edited by i92guboj; 06-08-2009 at 02:45 PM. Reason: some info added
 
Old 06-08-2009, 02:47 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Windows is OK on another partition---it just makes configuring GRUB slightly more complicated. I do think it needs to be on a PRIMARY partition.

I'm not sure what it is that Windows gets upset about, but---yes---wiping out the mbr should do it.

Options (best and easiest first):
  1. Don't use Windows
  2. Put Windows in a virtual machine using Virtual Box
  3. Put GRUB on a floppy so that you can get to Linux, then wipe the MBR and install Windows. First, use GParted to create empty space (or to create a Windows partition)
  4. Start over--install Windows first (on the first partition). Only use maybe 20GB, and leave the rest unpartitioned. Then install Linux.

Decide which option you prefer and then we can give more detailed help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Recovering Windows XP with Linux? Jykke Linux - General 6 01-04-2007 09:06 AM
Recovering a windows partition ravalox Linux - Software 5 08-15-2004 03:37 PM
Recovering Windows Admin needs help with Postfix bitessy Linux - Networking 1 09-27-2003 06:01 PM
Recovering Windows admin needs help with postfix bitessy Linux - Software 0 09-26-2003 03:21 AM
Recovering Windows user drw Linux - General 1 04-06-2002 07:40 PM


All times are GMT -5. The time now is 07:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration