LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 05-13-2011, 06:09 AM   #1
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
partitions within raw image; how to access those?


I was not smart, I admit.

To make a very low level backup of my laptop prior to upgrading it, I decided to create an iso of the harddisk; while it is doing this, but a bit too far to just cancel and start anew, so I cannot test it out right now I decided to post here.

What I did:
Code:
dd if=/dev/sda of=/media/external-hdd/laptop-backup.iso bs=4M
(don't ask why I did 4M as blocksize, call it lack of coffee)

of course, there are partitions on /dev/sda (there's a swap for example)

I may (am pretty damn sure I will) want to access the files within the iso, and that's where I wonder how to tackle that;

I'm thinking along the lines of setting up a loopback device (losetup) but I don't think that that will be enough to recognize the partitions. Any thoughts? (or just re-create an image of /dev/sda1 ?)

Last edited by Ramurd; 05-13-2011 at 06:34 AM.
 
Old 05-13-2011, 06:17 AM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,226

Rep: Reputation: 187Reputation: 187
Not 100% sure this would work, but have your tried fuseiso to mount your iso?
 
1 members found this post helpful.
Old 05-13-2011, 06:23 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Mount the iso, then loop mount the partition(s) with offset should work.
 
1 members found this post helpful.
Old 05-13-2011, 06:29 AM   #4
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Original Poster
Rep: Reputation: 75
I have not, thanks for the idea; might explore that one, but have my doubts.

Truth be told: this is not a true iso image, as iso does not facilitate partitions; this is a raw image instead.

I thought up that I can make this into a virtual machine with kvm/qemu; But that's also an extra step I was not hoping to go. Some googling learned that there is something called lomount, which has a -partition parameter; I'll try mount -oloop,offset=32256 example I found somewhere else. What I am rtying to figure out is if there is a "standard" way, without installing new software that will "always" work (e.g.: when booted from cd)

One of the things I was thinking of, was tricking the system into accessing /dev/loop? as a real harddisk (/dev/sdc or so)
 
Old 05-13-2011, 06:45 AM   #5
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Original Poster
Rep: Reputation: 75
Going to mark this thread as solved; the write has completed and test confirms that I can access the raw image file with:
Code:
losetup /dev/loop0 /path/to/image
mount -o offset=32256 /dev/loop0 /mnt/hd
That suffices, the files are accessible in such a way that I can recover whatever I will have to recover. Thanks for thinking along ;-)
 
  


Reply


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
Complicated, can not see or access partitions obnascar Linux - General 8 11-22-2006 12:29 AM
Regarding Creation of Bootable ISO of hard disk image having multiple partitions.. nagamohan_p Linux - Newbie 1 08-26-2006 11:52 PM
Regarding Creation of Bootable ISO of hard disk image having multiple partitions.. nagamohan_p Programming 1 08-25-2006 10:11 AM
mount a .iso or extract a .iso behind user witout access to root easytarget Linux - Newbie 3 09-29-2002 06:01 AM


All times are GMT -5. The time now is 01:22 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration