I have a corrupted CF drive which will no longer mount
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 have a corrupted CF drive which will no longer mount
I am wanting to try and repair this drive if possible
I would also like to be able to take a complete image of this disk with an equivalent or better program like alcohol 120% as the program is protected by the supplier but when this drive crashed the only option for the client was to buy a new replacement unit with all the software which they had already paid for
I have installed Ubuntu 12.10 onto my laptop to try and fix the drive
When I try to mount the drive I get the following message
Error mounting /dev/sdb2 at /media/brent/_: Command-line `mount -t "ext3" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb2" "/media/brent/_"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb2,missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
The drive appears to have 2 partitions
Partition 1 SYSDEF EXT2(version 1.0)
Partition 2 / EXT3(version 1.0)
I have tried the following from one of the posts
brent@ubuntu:~$ sudo mke2fs -n /dev/sdb2
[sudo] password for brent:
mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
118080 inodes, 471909 blocks
23595 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=486539264
15 block groups
32768 blocks per group, 32768 fragments per group
7872 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
sudo e2fsck -y -b 32768 /dev/sdb2
I have no idea what variant of Linux this drive is running
There may even be a disk utility in Linux, of which I am a dummy, which can scan and repair the drive
(-r 3 is three retries, /dev/sdb is the path to the block device for the CF card, recovery.dd is the image file to be created and recovery.log is the log file)
The image file will be the same size as the CF card. This creates a log file, if the CF card goes offline it can be disconnected, reconnected and the above command can be run to relaunch the recovery at the next block.
If everything is successful you can mount the the image's partitions as loop devices or use dd to write the image to another CF card.
I/O errors generally mean the CF card needs to be replaced.
Thanks for all your help
Drive was completetly dead
I have been able to get a loan of another drive and was wondering what the command line is for ddrescue to recreate a drive from the image created or even just to do a complete copy of CF A to CF B
So to dd the image back to the new CF card you can just use something like
Code:
# dd if=<path to image file> of=<path to cf card block device>
This will write the image back to the cf card. DDrescue is great for retrieving data from a failing device but unnecessary when writing it back from a good source.
I have to ask this: You do want to make a copy of a copyrighted work and distribute it to your customer?
Please clarify that, since that would be against the LQ Rules and, depending on your country and the license of the product, may even be illegal in your jurisdiction, so it can get you into serious problems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.