LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 05:09 AM   #1
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
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 05:34 AM.
 
Old 05-13-2011, 05:17 AM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
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, 05:23 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

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

Original Poster
Rep: Reputation: 111Reputation: 111
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, 05:45 AM   #5
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Original Poster
Rep: Reputation: 111Reputation: 111
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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