LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-05-2007, 05:34 AM   #1
windowlicker
LQ Newbie
 
Registered: Sep 2005
Location: Ireland
Distribution: debian sarge, ubuntu
Posts: 17

Rep: Reputation: 0
mounting usb drive image questions


i have made an image of a friends usb pen drive(their collage thesis is on it). it currently gives a message about a bad superblock when trying to mount the image or the pendrive. i used "dd if=/dev/sda of=usbdrive" to make the image.

as i understand, the superblock means the filesystem (pen drive is fat32). is it possible to overwrite these superblocks and mount the image i made? or is there any way to recover the files on it?
 
Old 07-05-2007, 05:41 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Fist try
Code:
mount -o loop /path/to/usbdrive /mount/point/of/your/choice
and see if the files are under /mount/point/of/your/choice after that ("usbdrive" is now the image file, not the stick itself).

I think "superblock" means the beginning of the partition where the filesystem information is stored (partition table etc.) and that FAT32 actually should have two places where partition table is written, so that if the other one gets corrupted, the other one can be used instead. Don't know about that, but it sounds bad if the stick doesn't mount. Usually they either work or are completely trashed (I had one of my usb sticks, 512MB, simply cause an error while normally software-ejecting it, and now it shows 8MB, there's nothing and you can't actually write on it..)
 
Old 07-05-2007, 05:47 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote the exact error message please. Include the command used to mount.

Note, I would have expected

dd if=/dev/sda5 of=usbdisk
... to copy, and

mount -t vfat usbdisk /mnt/usbdisk -o loop
... to mount.

But why not just copy the files out? (Do you mean that the usb stick dosn't mount or that the image doesn't?)

Last edited by Simon Bridge; 07-05-2007 at 05:48 AM.
 
Old 07-05-2007, 05:50 AM   #4
windowlicker
LQ Newbie
 
Registered: Sep 2005
Location: Ireland
Distribution: debian sarge, ubuntu
Posts: 17

Original Poster
Rep: Reputation: 0
thank you, ive tried to mount as you have said, but i just get that bad superblock error. i dont really care about the drive itself, id say its broken, im more interested in the data on it. i just thought if it was the partition tables that are corrupt i might be able to overwrite my image with some generic partition table to be able to mount it.
 
Old 07-05-2007, 05:53 AM   #5
windowlicker
LQ Newbie
 
Registered: Sep 2005
Location: Ireland
Distribution: debian sarge, ubuntu
Posts: 17

Original Poster
Rep: Reputation: 0
neither the drive or the image will mount. im in work at the moment so not by my pc but the error is something like "wrong fs type, bad option, bad superblock on /dev/sda"
 
Old 07-05-2007, 09:39 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Yeah, that sounds like the partition table (at least).
Note: your image is a faithful copy of the damaged partitions.
Best bet... try the dd command on the explicit partition (/dev/sda5) with the data on it. (USB sticks usually are preformatted with a single logical partition occupying the entire drive.)

Since what you really want is to recover the thesis, right, you can always grep through the dev for the thesis text the old fashioned way. Or use recovery software... you have a backup, so how about fsck run on the drive. Or use one of the many Linux Forensics software collections.
 
  


Reply

Tags
image, mount, superblock, usb



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
mounting a mac drive image in linux slinky2004 Linux - General 2 08-06-2008 04:38 PM
Mounting USB external drive with multiple partitions, USB bluetooth mouse xmeson Slackware 7 12-17-2006 09:00 AM
Mounting split raid drive as normal drive via USB William_Syd Linux - Newbie 2 11-01-2006 07:07 PM
Creating/restoring drive image on USB drive OneSeventeen Linux - Newbie 9 07-06-2005 05:08 AM
Mounting a SCSI drive to image it. jhill Linux - Hardware 1 07-27-2004 06:30 AM

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

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