LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-12-2007, 12:02 PM   #1
JohnyDRipper
LQ Newbie
 
Registered: Nov 2004
Location: EU
Distribution: Gentoo - tarball 1 install :-)
Posts: 14

Rep: Reputation: 0
gparted says no partitions


I messed around a bit too much with the win xp recovery console (fixboot, fixmbr) and corrupted my partition table. I reinstalled grub and now I can boot, but gparted refuses to see my partitions, but with fdisk I can still see them all though...
I really need to repartition... I have no way to backup the whole hard drive, so a clean setup is no option...

How can I fix my mbr or my partition table, or whatever is the cause of this?

Last edited by JohnyDRipper; 02-12-2007 at 12:04 PM.
 
Old 02-12-2007, 12:12 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Warning: If your partition table was/is corrupted you may not be able to recover the partitioning. With that said, as a suggestion look at something like the SystemRescueCD and parted to possibly recover your partition table;

http://www.sysresccd.org/Main_Page

parted might be able to recover the partitioning if you know roughly the size and starting locations of the partitions. Hint start at the front (sector 0) and move forward one partition at a time.
 
Old 02-12-2007, 12:35 PM   #3
JohnyDRipper
LQ Newbie
 
Registered: Nov 2004
Location: EU
Distribution: Gentoo - tarball 1 install :-)
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Lenard
Warning: If your partition table was/is corrupted you may not be able to recover the partitioning. With that said, as a suggestion look at something like the SystemRescueCD and parted to possibly recover your partition table;

http://www.sysresccd.org/Main_Page

parted might be able to recover the partitioning if you know roughly the size and starting locations of the partitions. Hint start at the front (sector 0) and move forward one partition at a time.
I actually don't know what is wrong... fdisk shows the partition table exactly as it was, but gparted seems unable to read it :? I guess it can't be the MBR, because the only thing that should reside in there is grub, right? So what is wrong with gparted? :?

I'm going to print the output of fdisk and use the tool you suggested to 'repair' the partition table... hope it helps...

anyway, thanks a lot in advance to help me out
 
Old 02-12-2007, 12:46 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Get a 2nd opinion and run cfdisk.

fdisk is the last line of defence as it can read corrupted partition tables while other partitioning tools have all given up.

Post the output of "fdisk-l" and all will be revealed. A record of it posted here may save your skin later on because your partition table can suffer damage or loss of information during the rescue attempts.

In general fdisk and cfdisk should be enough for rescuing the partitions.

A complete destruction of the partition table, which is just 64 bytes in the MBR, will not affect the partitions internal data. You can rebuild it and suffer no loss of data. I have done loads of them often to the maximum 63 partitions in a hard disk. The trick is always to keep a record of the partition table.
 
Old 02-12-2007, 04:42 PM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
You can even create a copy of the partition table to save someplace;

# dd if=XYZ of=backup.bin bs=512 count=1

Replace XYZ with actual device name such as /dev/sda or /dev/hda.

Now to restore partition table to disk, all you need to do is use dd command:

# dd if=backup.bin of=XYZ bs=1 count=64 skip=446 seek=446
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GParted magnEsium Fedora 3 01-28-2007 07:22 PM
LXer: Modify Your Partitions With GParted Without Losing Data LXer Syndicated Linux News 0 01-24-2007 03:03 AM
Shrinking NTFS and other partitions with GParted okok Linux - General 2 07-28-2006 03:54 AM
trouble mounting multiple partitions in Gparted shadowsnipes Linux - General 2 07-01-2006 01:37 AM
I lost my Partitions using GParted! MorPhiend Linux - Newbie 1 11-23-2005 02:11 PM


All times are GMT -5. The time now is 10:42 PM.

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