FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-06-2008, 09:03 PM
"pat"
 
Default mounting disk image

Hello,

I have a question about mounting disk image as the disk. I have disk image
which was created using:
dd if=/dev/sda of=./file.iso
and the sda contained two partitions sda1 and sda2. I know, that if I have
only image of the sda1 I can mount it using loop device like
#losetup /dev/loop0 file.iso
#mount -t ... /dev/loop0 /mnt/tmp

But, how to do it if the file structure is: sda -> sda1, sda2? I need to get
data from sda1 and sda2 :-|

Thanks a lot for help.

Pat
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-06-2008, 09:16 PM
Alan McKinnon
 
Default mounting disk image

On Sunday 06 April 2008, pat wrote:
> Hello,
>
> I have a question about mounting disk image as the disk. I have disk
> image which was created using:
> dd if=/dev/sda of=./file.iso
> and the sda contained two partitions sda1 and sda2. I know, that if I
> have only image of the sda1 I can mount it using loop device like
> #losetup /dev/loop0 file.iso
> #mount -t ... /dev/loop0 /mnt/tmp
>
> But, how to do it if the file structure is: sda -> sda1, sda2? I need
> to get data from sda1 and sda2 :-|


losetup -o <offset_value> /dev/loop<something>

see man losetup

--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-06-2008, 09:19 PM
"Andrey Falko"
 
Default mounting disk image

On Sun, Apr 6, 2008 at 5:03 PM, pat <pat@xvalheru.org> wrote:
> Hello,
>
> I have a question about mounting disk image as the disk. I have disk image
> which was created using:
> dd if=/dev/sda of=./file.iso
> and the sda contained two partitions sda1 and sda2. I know, that if I have
> only image of the sda1 I can mount it using loop device like
> #losetup /dev/loop0 file.iso
> #mount -t ... /dev/loop0 /mnt/tmp
>
> But, how to do it if the file structure is: sda -> sda1, sda2? I need to get
> data from sda1 and sda2 :-|
>
> Thanks a lot for help.
>
> Pat
> --
> gentoo-user@lists.gentoo.org mailing list
>
>

I don't have time to test, but try something like this:

(from: http://lwn.net/Articles/110426/)

losetup /dev/loop0 file.iso
blockdev --rereadpt /dev/loop0
mount /dev/loop0p2 /mnt/temp (for p2 replace with other partition,
check ls /sys/block/loop0/dev)
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 10:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org