Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I had FC5 running on an old Dell and decided to upgrade it to Fedora 8. I had a secondary hard disk installed (formatted as NTFS for reasons that are not important to the question ) and made sure I unplugged this during the F8 install. Now F8 is happy, I've plugged the second HDD in but fdisk -l now shows no partitions on this disk.
Code:
[root@localhost log]# fdisk -l
Disk /dev/sda: 7510 MB, 7510164480 bytes
255 heads, 63 sectors/track, 913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xea1aa9c7
Device Boot Start End Blocks Id System
/dev/sda1 * 1 864 6940048+ 83 Linux
/dev/sda2 865 913 393592+ 82 Linux swap / Solaris
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
I expected that this would 'just work' in F8 so am a bit baffled by this. I've done some Googling but came up blank.
Any idea what I need to do to read the partitions on this disk (without losing the data on it)?
I find it suspicious that your disk identifier is 0x00000000. You might want to poke around on this disk with dd and see if somehow the whole disk got set to zeroes. If you do this, be very careful that your read from the disk with dd rather than write to it! If you want to manually look at the MBR -- which contains the primary partition tables -- with a hex editor, you can copy it by:
Code:
dd if=/dev/sdb bs=512 count=1 > somefilename
If you find that the partition table is in fact gone, but the partition data still seems to be there, there is a tool called gpart (guess partitions) for trying to restore the partition table. You can probably download it or install it from your repositories, but it is also available on the KNOPPIX live CD. (At least it used to be.)
I should add that this is an IDE disk. I'm pretty sure the disks were HDx on the FC5 system but they are now SDx in F8. Also I didn't do an upgrade, I did a fresh install of F8.
I've tried running Testdisk and Gparted but neither can see the partition. Before I do anything drastic, I do have access to a Fedora 7 system I can try it in. Unless anyone has any better ideas.
I find it suspicious that your disk identifier is 0x00000000. You might want to poke around on this disk with dd and see if somehow the whole disk got set to zeroes. If you do this, be very careful that your read from the disk with dd rather than write to it! If you want to manually look at the MBR -- which contains the primary partition tables -- with a hex editor, you can copy it by:
Code:
dd if=/dev/sdb bs=512 count=1 > somefilename
If you find that the partition table is in fact gone, but the partition data still seems to be there, there is a tool called gpart (guess partitions) for trying to restore the partition table. You can probably download it or install it from your repositories, but it is also available on the KNOPPIX live CD. (At least it used to be.)
I was very careful to unplug the disk before installing Fedora and it was absolutely definitely there before I started!
I should add that this is an IDE disk. I'm pretty sure the disks were HDx on the FC5 system but they are now SDx in F8.
In newer software, it is now common for IDE drivers (which use to show up as hdx) to now show up as sdx. I think this has to do with the use of the libata module, but I've not gotten it all sorted out myself. But I see the same thing on one of my machines (which isn't experiencing any problems) where some distros identify a drive as hdc and other distros identify it as sda. I guess I am saying don't worry about it.
I realized I didn't know what a disk identifier was, so I just tried googling for it. I still don't know what it is, but I am thinking now it might be stored in the disks hardware rather than on the disk itself. So I am wondering if the fact that the disk identifier is 0x00000000 might indicate a hardware problem where you are not communicating to the disk properly. Just a thought.
This is getting weirder ...... I just tried to mount /dev/sdb and it mounted. I can now see all my files, despite the fact that all the tools I run tell me there are no partitions on the disk. Forgive me if I'm wrong, but I thought that even if a disk is configured as a single partition, it should still show as something like /dev/sdb1 on my system and that you can't mount a complete disk, like /dev/sdb ??
This is getting weirder ...... I just tried to mount /dev/sdb and it mounted. I can now see all my files, despite the fact that all the tools I run tell me there are no partitions on the disk.
Did you mount /dev/sdb or /dev/sdb1? On a hard drive it would normally be the latter. If it is the former, then it sounds like the drive is formatted the way floppies are generally formatted rather than the way hard drives are usually formatted.
If it is formatted like a floppy, then I don't think you would see any partitions. But it would be weird!!!
Did you mount /dev/sdb or /dev/sdb1? On a hard drive it would normally be the latter. If it is the former, then it sounds like the drive is formatted the way floppies are generally formatted rather than the way hard drives are usually formatted.
If it is formatted like a floppy, then I don't think you would see any partitions. But it would be weird!!!
I mounted /dev/sdb. I can't remember specifically how I created the partition but maybe I did format it like a floppy. But I'm certain it was /dev/hdc1 on the old system. Oh well, it's working now, that's the main thing. I have it mounted via NFS from my laptop and it all looks sweet
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.