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.
Long story short. I lost power to a SATA drive connected via a USB cable while I was moving files from my PC to the drive. Ever since I have been having a hard time getting the data off of it. I ended up getting a new PC that has SATA connectors on the MB so I connected the drive directly to the MB instead of its USB enclosure. It took me a while to finally get it to mount but I can't find any files on it.
Slackware 10.2 kernel 2.6.13
At one point when I was trying to mount it I was getting the "bad super block" error and it wouldn't mount.
When I do a df -h it shows there should be 5gb of data on it
Vendor: ATA Model: ST3500841AS Rev: 3.AA
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
SCSI device sda: drive cache: write back
sda: sda1
Attached scsi disk sda at scsi2, channel 0, id 1, lun 0
There were pages of errors when I tried to mount it. I can post all that if anyone wants. Didn't want to clutter up the thread with several pages of that.
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761
Rep:
I don't know if there's a way to repair the filesystem information so you can mount and read the drive contents natively. I found a data recovery software that reads ext2 and ext3 formated disks. Of course it will only read what it can find, and the data string might not be complete. There's a demo version that will only read the drive so it will give you an idea of your recovery chances, the paid version will recovery the readable data.
I found this command from someone who had a similar problem except his problem was with a 512mb usb thumb drive.
dd if=/dev/sda of=/tmp/r1 bs=512
my question is, for the "bs=512" that means it's forcing the byte size to be 512.. Now my sata drive is 500GB but only has 5GB of data on it. what would I need to set my "bs=" to?
Also, would running "fsck -t vfat /dev/sda" hurt to try?
fsck'ing the files system on the drive should work for a bad superblock. you may also want to consider trying testdisk, which I have used to recover deleted partition tables before. personally I would start with fsck for a bad superblock and move on to testdisk if fsck doesn't work.
No sorry.. I gave up on it and just found the time today to mess with it again. This is what I am getting now
dmesg
usb 5-5: new high speed USB device using ehci_hcd and address 3
usb 5-5: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi2 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 02
sd 2:0:0:0: Attached scsi disk sdb
sd 2:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete
nothing shows up in fdisk -l
fdisk /dev/sdb
Unable to read /dev/sdb
Im pretty sure the drive had vfat FS.
so this is what I get
fsck.vfat /dev/sdb
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Got 0 bytes instead of 512 at 0
any ideas on how to fix this??
mkdosfs -I /dev/sdb
mkdosfs 2.11 (12 Mar 2005)
mkdosfs: Attempting to create a too large file system
[root@70chip ~]# mkfs.ext3 /dev/sdb
mke2fs 1.39 (29-May-2006)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
mkfs.ext3: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.
Last edited by ncsuapex; 05-18-2008 at 09:00 AM.
Reason: .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.