LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-30-2010, 04:13 PM   #1
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Access to multi-partition disk image


Hi all.

I have a 2GB file which is a dd image of a block device. The block device (a USB-connected flash memory) contains multiple partitions, and therein lies the problem. I want/need to access the various partitions in the image file, but need to do this without actually using a physical flash memory device. If the image was that of a single partition, I could simply mount it on a loop device, and access the filesystem as necessary. However, I can find no kind of virtual block device upon which to write/mount the image.
I've searched the net exhaustively for anything that would seem to allow me to do what I need, but without even a sniff of success. Sadly, I have seen bits of information that suggest "you can't get there from here". Even the outstanding dd tutorial by AwesomeMachine on LQ didn't help. Anyone know of a kind of virtual block device on which a multi-partition image can be written and mounted? Or any other way I can access individual partitions (with various filesystem types on each) and then re-assemble them back to a single image?

--- rod.
 
Old 01-30-2010, 04:33 PM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
kpartx

should be available in your OS's repos
comes standard in 9.10 I think

heres the how to
http://panoskrt.wordpress.com/2009/0...in-image-file/

hope that helps
 
Old 01-30-2010, 05:30 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Seems to do the job. Awesome.
Thanks.
--- rod.
 
  


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
Multi-Disk Partition penguinHugger Linux - General 1 08-24-2008 06:33 AM
Create a mountable disk image of Windows partition tnine9 Linux - Desktop 3 08-10-2008 07:13 PM
restore hard disk from several splitted files by Partition Image powah Linux - Software 4 03-11-2008 10:03 PM
partition image to multi cd's? babag Mandriva 2 10-09-2005 06:16 PM
using a floppy disk image as a partition antken Linux - General 6 02-16-2003 10:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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