LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-13-2006, 04:51 PM   #1
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Rep: Reputation: 15
Red face windows killed my partitions! no linux partitions found on this computer.


I was all set to install windows on another partition of my hard drive, I popped the Windows XP Pro cd in to my drive, and booted it. When I got past the eula, it stated that I had no partitions, and would I like to format the empty space

I thought, Oh yeah, Windows, like so many things, can't recognise LVM partitions. I exited the windows cd, and booted up my INSERT livecd to create a fat32 partition for windows. When I typed lvscan into a terminal, it said no logical volumes. Oh shit, I restarted with the fedora core rescue cd, which also claims that there are "no linux partitions."

now I remember why I deleted the windows partition in the first place.
Is there any way to get my partitions back?
 
Old 08-13-2006, 05:39 PM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
If you remember where your partitions were EXACTLY and their sizes, and windows did write to the disk at all except to remove the partitions themselves, simply using fdisk to add the original partitions will restore your disk. Removing a partition doesn't remove the data on that partition, only the entry in the partition table.

If you don't remember where your partitions were, there's some GPL software I ran into recently that seems like it might help: http://www.cgsecurity.org/wiki/TestDisk

It's supposed to recover lost partitions, but I've never used it and thus cannot tell you whether or not it works.

Good luck.
 
Old 08-13-2006, 05:39 PM   #3
verdeboy2k
Member
 
Registered: Jan 2004
Location: /dev/random
Distribution: Gentoo amd64, CrunchBang amd64
Posts: 350

Rep: Reputation: 32
Rule 1: You cannot install windows AFTER Linux.
Rule 2: Windows will nuke your partition table.

Fix: If you can remember your exact partiton layout, you can use fdisk et al to restore it. (Or whatever you use for logical volumes, I've never used them.)
 
Old 08-13-2006, 07:16 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,240

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
I don't do LVM either, but what does a "fdisk -l" show ??? (from the rescue disk).

Testdisk BTW is excellent at it's job.
 
Old 08-13-2006, 08:06 PM   #5
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Original Poster
Rep: Reputation: 15
I remember what the partitions were, but not where, or their sizes. I will try that disk.

@Rule1: That's what I thought, until I asked: http://www.linuxquestions.org/questi...d.php?t=462785
@Rule2: Why? f*king windows...

Quote:
sh-3.00# fdisk -l

Disk /dev/hdb: 203.9GB 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 825280 bytes

Disk /dev/hdb doesn't contain a valid partition table

Last edited by The MJ; 08-14-2006 at 02:01 PM.
 
Old 08-14-2006, 01:47 PM   #6
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Original Poster
Rep: Reputation: 15
I tried testdisk, which managed to find all my partitions and write them to disk.

EDIT: The partitions are, it seems, set up correctly. When I boot the fedora core rescue cd, it is able to find and mount my linux partition! After issuing "grub-install /dev/hdb", it boots correctly.

Now, how would I go about installing windows?

Last edited by The MJ; 08-14-2006 at 02:00 PM.
 
Old 08-14-2006, 01:57 PM   #7
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Although it is possible to install Windows after Linux, doing so basically equates to penalizing yourself with a lot of extra work. As you've found, Windows will overwrite your existing partition table but as already noted there are methods that may allow you to recover it. Overall, it's simpler to install Windows and then Linux if you are dual booting
 
Old 08-14-2006, 02:43 PM   #8
swagner7
Member
 
Registered: May 2006
Location: Kalispell, Montana
Distribution: Kubuntu, Mepis
Posts: 36

Rep: Reputation: 15
windows must be first (the Microsoft way)

Windows has to be the first OS on your root hard drive. Yes the rule of thumb is to install Windows 1st and then Linux. I'm sure this is part of Microsoft's plan for world domination. They are so arrogant that they think they are the only operating system that should be allowed to exist. Perhaps Vista will fix this, but don't hold your breath.

It seems to me that you may be able to install windows after if you only allow it to use a partition that you have already created in an NTFS or FAT32 format. I think I have done that on a re-install once.
 
Old 08-14-2006, 03:38 PM   #9
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Original Poster
Rep: Reputation: 15
I actually had a windows partition, which I deleted out of frustration, becouse it couldn't see my ethernet card (fancy that, linux hardware detection working better than windows)

I am trying to make a new fat32 partition, but this LVM business is making the whole process exceedingly difficult. I have posted for help on that particular problem here: http://www.linuxquestions.org/questi...d.php?t=473840
 
Old 09-05-2006, 10:34 PM   #10
ascompltd
LQ Newbie
 
Registered: May 2003
Location: uk
Distribution: Gentoo
Posts: 2

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by The MJ
I actually had a windows partition, which I deleted out of frustration, becouse it couldn't see my ethernet card (fancy that, linux hardware detection working better than windows)

I am trying to make a new fat32 partition, but this LVM business is making the whole process exceedingly difficult. I have posted for help on that particular problem here:
Hi MJ I know this is probably an old issue for you now but from your description it sounds as though you have two hard drives if this is in fact the case providing your Windows partion is the first partion on your second drive you can install /re-install windows without effecting your linux install at all.

ie DISK1 linux partitioned however you like
DISK2 First partion for "NTFS/DOS" for your windoze install remainder of disk however you like

If you then unplug your disk one (LINUX boot disk) during the install process of windoze and just allow windows to install itself on that first partion after install completes replug disk one and use grub or lilo on disk one partion to handle the dual booting.

I have this format on my machine and can and have installed or reinstalled windows with inpunity.

Hope this helps
 
Old 01-05-2007, 08:31 AM   #11
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
As to restoring partitions: sfdisk -d outputs all, not just MBR, part. info. in a format that can be saved & used as input to sfdisk to restore the partitions. I know this 20-20 hindsight, but it might help save someone else from a similar problem. To do this you would have to systematically dump the info on each hd you own & store it in a safe place or places you will remember w/ file names you will still understand in 6 mo. or a year when you will need it.
 
  


Reply

Tags
lvm, partition, windows xp


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
Windows killed my partitions DeadlyMuffin Slackware 3 08-25-2004 07:14 PM
Linux installed, linux partitions lost, computer scragged, need serious help. B4UTRUST Linux - Newbie 4 01-23-2004 10:21 AM
having both linux and windows partitions ccflashback Linux - Newbie 14 01-22-2004 07:10 PM
Emergency: No linux Partitions Found Gerardoj Linux - Software 6 06-01-2003 01:44 PM
Seeing linux partitions in windows lhiggins Linux - Newbie 3 04-16-2003 09:26 AM


All times are GMT -5. The time now is 07:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration