LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-04-2005, 09:20 AM   #1
Remedy
LQ Newbie
 
Registered: Feb 2003
Location: Canada Eh?
Distribution: Fedora Core 2
Posts: 9

Rep: Reputation: 0
Bad Partition Table - Fedora Core 2


Hi all,

To get started I'll give you the scenario. My friend completly buggered his drive. He was using partition magic I believe just to resize a couple partitions and somehow he managled his partition table. I told him I could try using my box to check out the problem. I'm running Fedora Core 2, with kernel 2.6.10-1.771_FC2.

I used fdisk to take a look at the problem and this is what I saw:

Code:
[root@localhost gpart]# fdisk -l /dev/hdb
 
Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   ?       13578      119522   850995205   72  Unknown
Partition 1 does not end on cylinder boundary.
/dev/hdb2   ?       45382       79243   271987362   74  Unknown
Partition 2 does not end on cylinder boundary.
/dev/hdb3   ?       10499       10499           0   65  Novell Netware 386
Partition 3 does not end on cylinder boundary.
/dev/hdb4          167628      167631       25817+   0  Empty
Partition 4 does not end on cylinder boundary.
 
Partition table entries are not in disk order
Now right off the bat you can see the cylinders are overlapping. Also there is a missing partition, there should be five. But the reported physical geometry 24792 cylinders, 255 heads, 63 sectors/track is correct and it's reporting the proper size so the BIOS is reading it correctly I presume.

I then did a scan with gpart to see if it could guess as to what the partition table should look like. This is what I got:

Code:
[root@localhost gpart]# ./gpart /dev/hdb
 
Begin scan...
Possible extended partition at offset(7mb)
   Possible partition(Windows NT/W2K FS), size(153958mb), offset(7mb)
   Possible partition(Linux swap), size(502mb), offset(153966mb)
   Possible partition(Windows NT/W2K FS), size(40005mb), offset(154468mb)
End scan.
 
Checking partitions...
   Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): logical
   Partition(Linux swap or Solaris/x86): logical
   Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): logical
Ok.
 
Guessed primary partition table:
Primary partition(1)
   type: 015(0x0F)(Extended DOS, LBA)
   size: 194466mb #s(398267415) s(16065-398283479)
   chs:  (1/0/1)-(1023/254/63)d (1/0/1)-(24791/254/63)r
 
Primary partition(2)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
 
Primary partition(3)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
 
Primary partition(4)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
I've never really used gpart other than to look at the partition table, and I'm a little wary of writing the table without being sure of what I'm doing.

Now I must say that wiping the drive isn't really an option. My friend has years of tax information on the drive which he hasn't backed up , so if possible I'd like to be able to restore this drive to its old self, or atleast so I can mount the partitions on my box and get the data off.

Thanks for reading this and if there's any info I've left out let me know and I'll get it up on here.
 
Old 05-04-2005, 10:25 AM   #2
k1ll3r_x
Member
 
Registered: Sep 2004
Location: Laredo, TX
Distribution: Debian 11
Posts: 164

Rep: Reputation: 30
have u tried creating a new directory called /<what ever name u want> and mounting partitions hdb1 through hdb4 to the new created folder?
Code:
mount /dev/hdb* /<what ever name u want>

*partition number
if that doesnt help, then maybe a little research on backing up windows or damaged partitions with linux
 
Old 05-04-2005, 10:31 AM   #3
Remedy
LQ Newbie
 
Registered: Feb 2003
Location: Canada Eh?
Distribution: Fedora Core 2
Posts: 9

Original Poster
Rep: Reputation: 0
I've tried mounting the partitions but I get errors like:

Code:
mount: /dev/hdb1 is not a valid block device
I forgot to mention that when I shutdown I get a massive amount of errors concerning /dev/hdb complaining about bad sectors, but no doubt that has to do with the part table being all out of whack. I have been doing some reading on it but at this point in time I can only find very vague descriptions without much detail. I'll keep searching though.
 
  


Reply



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
Fedora Core 2 HDD Geometry Partition Table problem. morrolan Fedora 1 10-01-2004 09:27 AM
Bad Partition Table? tommcfarlin4 Linux - Software 2 08-21-2004 11:03 AM
Fixing a bad partition table pen^2 Linux - General 2 07-21-2004 06:25 AM
Partition Table and Fedora Core Two dalert0140 Linux - Newbie 3 06-13-2004 08:55 PM
bad partition table thetruevoice Linux - Software 2 08-23-2001 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:14 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
Open Source Consulting | Domain Registration