LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-11-2005, 01:56 PM   #1
LOLobo
Member
 
Registered: Dec 2004
Location: Los Angeles
Distribution: Slackware 10.0 & 11.0
Posts: 31

Rep: Reputation: 16
Disk /dev/hdb doesn't contain a valid partition table


OK, wanted to start this thread before matters get worse...

My set-up is this...
(and it was working before I swaped out this hard disk with a FAT32 one, and now this problem happened when I tried to swap back)

Zenwalk Linux 1.2: Kernel 2.6.12.2
/dev/hda (at the end) and /dev/hdb (at the middle) on ide0, both on cable-select.

#fdisk -l outputs this
Code:
Disk /dev/hdb: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Disk /dev/hdb doesn't contain a valid partition table
and I can find nothing in dmesg

/etc/fstab is
Code:
/dev/hda2        swap             swap        defaults         0   0
/dev/hda3        /                ext2        defaults         1   1
#/dev/hdb1       /mnt/fat         vfat         defaults,umask=0222 0   0
/dev/cdrom       /mnt/cdrom       iso9660     noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
192.168.0.105:/mnt/lfs/share /mnt/smb nfs auto,user,rw,defaults,noatime 0 0
/dev/hdb1	 /mnt/shows	  ext2	      defaults         0   0
The partition I am trying to mount (and was mountable at one point) is /dev/hdb1 formatted as ext2. It had a single ~40G partition for the whole drive.

I want to recover the table to see the contents of the partition. I have looked into e2fsck & mke2fs, but don't know exactly how to use them.

I just want the data back, and for some reason am having trouble compiling gpart, testdisk, and fixdisktable on my Zenwalk box and on my Slack 10.0 box...

I'm looking for step-by-step support, using tools like cfdisk or fdisk to fix the partition table without losing the data. Thanks for the support!
 
Old 09-12-2005, 07:02 AM   #2
mgmax
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 16
your partition table seems to be nonexistent or corrupted.

Edit it with
Code:
cfdisk /dev/hdb
and create the partition table as you think it was before.

then write the table to disk and exit cfdisk.

mgmax
 
Old 09-12-2005, 06:48 PM   #3
LOLobo
Member
 
Registered: Dec 2004
Location: Los Angeles
Distribution: Slackware 10.0 & 11.0
Posts: 31

Original Poster
Rep: Reputation: 16
Followed your instructions, mgmax. Unfortunately I cannot access the data that was once there... Are there any suggestions to recover the data? I never formatted the drive, however, am wondering if creating & writing a new partition table made the drive data inaccessible or nonexistant.
 
Old 09-13-2005, 06:21 AM   #4
mgmax
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 16
No. It only overwrites the partition table, not the data.
I dont know but perhaps theres a tool to guess the partition table.

mgmax
 
Old 09-13-2005, 06:22 AM   #5
mgmax
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 16
gpart.
http://www.stud.uni-hannover.de/user/76201/gpart/
 
Old 09-13-2005, 12:40 PM   #6
LOLobo
Member
 
Registered: Dec 2004
Location: Los Angeles
Distribution: Slackware 10.0 & 11.0
Posts: 31

Original Poster
Rep: Reputation: 16
Thanks... nothing seemed to work. My impatience made me reformat the drive to FAT32.
 
Old 09-13-2005, 02:00 PM   #7
mgmax
Member
 
Registered: Jul 2005
Distribution: Debian
Posts: 82

Rep: Reputation: 16
Why Fat32? A corrupted Partition table and the filesystem have nothing to do with each other. If the partition table is gone, this can happen with *any* filesystem, even with Fat32.

If you reformat it, you give up your chance to restore the partition table.
But thats your problem.

mgmax
 
Old 09-13-2005, 04:26 PM   #8
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
As mgmax said, if the problem is just in the mbr (the partition table is bad) then it has nothing to do with the filesystem.

If you do what mgmax said (that is use cfdisk,fdisk,whatever) and make the partition again, then when you mount it you should
have the data again.

Did you try gpart? It can "see" the partitions even with a bad mbr.

Quote:
My set-up is this...
(and it was working before I swaped out this hard disk with a FAT32 one, and now this problem happened when I tried to swap back)
When, you swaped the hard disk with the fat32 one, did you put this disk on another computer or just left it away until you
put it back again ?
 
Old 09-13-2005, 05:40 PM   #9
LOLobo
Member
 
Registered: Dec 2004
Location: Los Angeles
Distribution: Slackware 10.0 & 11.0
Posts: 31

Original Poster
Rep: Reputation: 16
Quote:
Originally posted by mgmax
If you reformat it, you give up your chance to restore the partition table.
But thats your problem.

mgmax
Unfortunately, before I even started this thread... it seems that I unintentionally formatted the ext2 drive with mke2fs. So looks like I fudged up from the beginning...

Quote:
Originally posted by imitheos
When, you swaped the hard disk with the fat32 one, did you put this disk on another computer or just left it away until you
put it back again ?
No, I did not put it into another computer, I just disconnected it.
 
Old 09-20-2005, 09:17 AM   #10
orvaquim
LQ Newbie
 
Registered: Nov 2004
Posts: 17

Rep: Reputation: 0
Tanks! I have used gpart and it worked for me.
orvaquim
 
Old 11-06-2008, 01:40 AM   #11
another 1
Member
 
Registered: Nov 2008
Posts: 65

Rep: Reputation: 15
help me plz

hi. i have a problem that the windows cd doesn't boot.
 
Old 11-06-2008, 01:47 AM   #12
another 1
Member
 
Registered: Nov 2008
Posts: 65

Rep: Reputation: 15
help me plz

i have a problem that the windows cd doesn't boot. and the windows os has crashed. i tried to install a new windows but the cd doesn't boot. so i installed linux fedora 8. i don't know linux well and this is my first time using it. i tried to solve the problem and wrote the command fdisk -l and the result just as you have seen up. Disk /dev/hdb doesn't contain a valid partition table.
i want to repair the partition table and i want you to help me using a clear steps, since this is my first time using linux. and i want to rely on linux totally from now, coz the windows has many problems. and thanks
 
  


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
Disk /dev/hdb doesn't contain a valid partition table manudath Linux - Hardware 2 09-01-2006 02:23 PM
Invalid Partition Table on /dev/sda - Wrong Signature 0 ulasergin Fedora - Installation 1 06-30-2005 12:59 AM
how to use an IDE disk after put to sleep with hdparm -Y /dev/hdb qwijibow Linux - Hardware 0 08-24-2004 01:45 PM
Extract data from disk, without partition table... mandatory Linux - General 1 10-20-2003 06:35 AM
Warning: /dev/hdb is not on the first disk Valerie Linux - Newbie 9 07-03-2001 08:43 PM

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

All times are GMT -5. The time now is 08:40 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