LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-19-2017, 03:09 PM   #1
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 381

Rep: Reputation: 30
Mounting raw disk


I accidentally did a quick format of the wrong disk when installing recently so have a disk that contains a lot of files I want but which is missing its partition table. Unfortunately testdisk hasn't been able to find it so I'm looking at carving out files using photorec. There was only one partition on it, an EXT4 but none of he mount commands I'm trying are working.

sudo mount -o loop, offset34, ro, /dev/sdc /media/Dodgy

What am I doing wrong here?
 
Old 06-19-2017, 03:19 PM   #2
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
If you accidentally formatted the wrong disk, you're probably SOL unless you have some special recovery software and only then it's only at best 50/50 if you get it back.
 
Old 06-19-2017, 06:30 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Foremost just needs the device file. I think it will recover files from an unmounted drive. But it only recovers certain types of files unless you tell it otherwise.

And, even if you reformatted the drive, it should still mount.

Last edited by AwesomeMachine; 06-19-2017 at 06:32 PM.
 
Old 06-19-2017, 07:13 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,713

Rep: Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549
Quote:
Originally Posted by Mark_667 View Post
What am I doing wrong here?
If you formatted the device (you mention no partition table) why are you attempting to use offset ?. As above, the device itself should mount, but would be empty. mkfs.ext adds backup superblocks throughout the filesystem - these will be written (seemingly ramdomly) throughout your data. Even if you can scrape your files, how will you determine their veracity. Not trying to dissuade you, just answering your query.

If it were me, I'd take an image then create a single partition to cover the entire disk and run "mkfs.ext4 -S ..."
Note that is a capital S. Read the warnings in the manpage - all of them.
I have used this to recover an ext4 f/s I deliberate reformatted as NTFS. This was a small test filesystem I had constructed specifically for this test - only a few files and no fragmentation. The recovery worked fine.
caveat emptor.
 
Old 06-19-2017, 07:15 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,848

Rep: Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383Reputation: 3383
Try testdisk on it and see what it might recover.
 
Old 06-19-2017, 07:23 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,713

Rep: Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549
???? - see first post.
 
  


Reply

Tags
data recovery, mount


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 raw SD images via loop louigi600 Slackware - ARM 3 12-18-2015 04:10 PM
[SOLVED] Disk Partitioning 1MB offset on raw disk munna529 Linux - Newbie 3 07-30-2014 12:59 AM
Mounting partitions contained within a raw disk image TJNII Linux - General 2 08-22-2011 10:53 AM
Mounting a raw dump (using dd) of a removable media spamwax Linux - Software 6 05-28-2008 02:53 PM
Mounting Raw Devices rightsidedown Linux - Newbie 1 03-06-2008 10:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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