From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262316AbVF1Xxh (ORCPT ); Tue, 28 Jun 2005 19:53:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262298AbVF1XpC (ORCPT ); Tue, 28 Jun 2005 19:45:02 -0400 Received: from free.hands.com ([83.142.228.128]:57759 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S261259AbVF1XYo (ORCPT ); Tue, 28 Jun 2005 19:24:44 -0400 Date: Wed, 29 Jun 2005 00:33:35 +0100 From: Luke Kenneth Casson Leighton To: linux-kernel@vger.kernel.org Subject: accessing loopback filesystem+partitions on a file Message-ID: <20050628233335.GB9087@lkcl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org [if you are happy to reply at all, please reply cc'd thank you.] hi, i'm really sorry to be bothering people on this list but i genuinely don't what phrases to google for what i am looking for without getting swamped by useless pages, which you will understand why when you see the question, below. background: i'm sort-of helping test a xen install project where a block device is presented as the DRIVE - not, i repeat not, the partitions on the drive which is the quotes normal quotes way of doing xen installes (yes there are good reasons for doing this). the thing is that the install is failing, and we'd duh like to analyse what's going on (access the log files - no, sshd hasn't been installed yet) after terminating the xen session [because afaik in xen guest sessions there's no way i know of to access virtual consoles 2-6] the question is, therefore: * how the hell do you loopback mount (or lvm mount or _anything_! something!) partitions that have been created in a loopback'd file!!!! [aside from booting up a second pre-installed xen guest domain and making the filesystem-in-a-file available as /dev/hdb of course.] answers of the form "work out where the partitions are, then use hexedit to remove the first few blocks" will win no prizes here. l. -- -- http://lkcl.net -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262250AbVF2AmB (ORCPT ); Tue, 28 Jun 2005 20:42:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262317AbVF2AlT (ORCPT ); Tue, 28 Jun 2005 20:41:19 -0400 Received: from alpha.polcom.net ([217.79.151.115]:1505 "EHLO alpha.polcom.net") by vger.kernel.org with ESMTP id S262250AbVF2Afb (ORCPT ); Tue, 28 Jun 2005 20:35:31 -0400 Date: Wed, 29 Jun 2005 02:35:25 +0200 (CEST) From: Grzegorz Kulewski To: Luke Kenneth Casson Leighton Cc: linux-kernel@vger.kernel.org Subject: Re: accessing loopback filesystem+partitions on a file In-Reply-To: <20050628233335.GB9087@lkcl.net> Message-ID: References: <20050628233335.GB9087@lkcl.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Jun 2005, Luke Kenneth Casson Leighton wrote: > [if you are happy to reply at all, please reply cc'd thank you.] > > hi, > > i'm really sorry to be bothering people on this list but i genuinely > don't what phrases to google for what i am looking for without getting > swamped by useless pages, which you will understand why when you see > the question, below. > > the question is, therefore: > > * how the hell do you loopback mount (or lvm mount > or _anything_! something!) partitions that have > been created in a loopback'd file!!!! > > [aside from booting up a second pre-installed xen > guest domain and making the filesystem-in-a-file > available as /dev/hdb of course.] > > answers of the form "work out where the partitions are, then use > hexedit to remove the first few blocks" will win no prizes here. The bad news: it was impossible (or at least very hard to do). The good news: it is possible now. The anwser is: - figure where the partitions are (possibly using some simple script), - use device-mapper to create block devices covering partitions, - mount them. I do not know if this anwser will win your price but it is IMHO far better than hexedit... :-) And probably this is the only anwser. (IIRC if you have one partition you can skip partition table with offset option to losetup. But this will only work in this special case...) Grzegorz Kulewski From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262414AbVF2BAR (ORCPT ); Tue, 28 Jun 2005 21:00:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262409AbVF2BAB (ORCPT ); Tue, 28 Jun 2005 21:00:01 -0400 Received: from main.gmane.org ([80.91.229.2]:53434 "EHLO ciao.gmane.org") by vger.kernel.org with ESMTP id S262348AbVF2Aig (ORCPT ); Tue, 28 Jun 2005 20:38:36 -0400 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Jason Lunz Subject: Re: accessing loopback filesystem+partitions on a file Date: Wed, 29 Jun 2005 00:30:32 +0000 (UTC) Organization: PBR Streetgang Message-ID: References: <20050628233335.GB9087@lkcl.net> X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dsl027-161-081.atl1.dsl.speakeasy.net User-Agent: slrn/0.9.8.1 (Debian) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org lkcl@lkcl.net said: > * how the hell do you loopback mount (or lvm mount > or _anything_! something!) partitions that have > been created in a loopback'd file!!!! use the offset option when mounting. Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262323AbVF2Bdi (ORCPT ); Tue, 28 Jun 2005 21:33:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262234AbVF2B3y (ORCPT ); Tue, 28 Jun 2005 21:29:54 -0400 Received: from free.hands.com ([83.142.228.128]:1185 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S261191AbVF2B2h (ORCPT ); Tue, 28 Jun 2005 21:28:37 -0400 Date: Wed, 29 Jun 2005 02:37:31 +0100 From: Luke Kenneth Casson Leighton To: Grzegorz Kulewski Cc: linux-kernel@vger.kernel.org Subject: Re: accessing loopback filesystem+partitions on a file Message-ID: <20050629013731.GF9566@lkcl.net> References: <20050628233335.GB9087@lkcl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org oh, bugger :) xen guest OSes manage it fine - the xen layer provides a means to present any block device as a "disk". that loopback filesystems cannot be presented as block devices by the linux kernel (with no involvement of xen) seems to be a curious omission. ... loopbackblock.ko, anyone? btw the [as yet formally-unannounced] project is at http://hands.com/d-i. try the xen0 install and then follow the instructions for creating a guest domain [by booting debian installer in a guest domain, as opposed to running debootstrap, the "normal" xen recommended method]. fortunately, phil has fixed the xen-guest-install, such that it completes successfully. that _still_ leaves a hard-disk-with-its-partitions in an actual LVM partition which is totally inaccessible. okay - i _say_ inaccessible: there is always the possibility of finding a spare hard drive, and then doing "dd if=/dev/vg/xen0hda of=/dev/hdd". this being 2005 last time i checked, it does seem to me to be a rather large waste of a) an entire hard drive b) time spent copying. *sigh*. sadly, answers on back of envelope ideally need to involve a tool or procedure of some sort that can be run by dummies such as myself on a regular basis without fear of major-cock-up, rather than something [ending oh say in .pl] that stands a good chance of being exorcised [or exercised] as voodoo witchcraft. unmitigated steaming "perl" advocates need not respond. please. l. On Wed, Jun 29, 2005 at 02:35:25AM +0200, Grzegorz Kulewski wrote: > On Wed, 29 Jun 2005, Luke Kenneth Casson Leighton wrote: > > >[if you are happy to reply at all, please reply cc'd thank you.] > > > >hi, > > > >i'm really sorry to be bothering people on this list but i genuinely > >don't what phrases to google for what i am looking for without getting > >swamped by useless pages, which you will understand why when you see > >the question, below. > > > >the question is, therefore: > > > > * how the hell do you loopback mount (or lvm mount > > or _anything_! something!) partitions that have > > been created in a loopback'd file!!!! > > > > [aside from booting up a second pre-installed xen > > guest domain and making the filesystem-in-a-file > > available as /dev/hdb of course.] > > > >answers of the form "work out where the partitions are, then use > >hexedit to remove the first few blocks" will win no prizes here. > > The bad news: it was impossible (or at least very hard to do). > > The good news: it is possible now. The anwser is: > - figure where the partitions are (possibly using some simple script), > - use device-mapper to create block devices covering partitions, > - mount them. > > I do not know if this anwser will win your price but it is IMHO far better > than hexedit... :-) And probably this is the only anwser. > > (IIRC if you have one partition you can skip partition table with offset > option to losetup. But this will only work in this special case...) > > > Grzegorz Kulewski > -- -- http://lkcl.net -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262262AbVF2BnF (ORCPT ); Tue, 28 Jun 2005 21:43:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262161AbVF2BnA (ORCPT ); Tue, 28 Jun 2005 21:43:00 -0400 Received: from free.hands.com ([83.142.228.128]:9377 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S262317AbVF2Blm (ORCPT ); Tue, 28 Jun 2005 21:41:42 -0400 Date: Wed, 29 Jun 2005 02:50:30 +0100 From: Luke Kenneth Casson Leighton To: Grzegorz Kulewski Cc: linux-kernel@vger.kernel.org Subject: Re: accessing loopback filesystem+partitions on a file Message-ID: <20050629015030.GG9566@lkcl.net> References: <20050628233335.GB9087@lkcl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org okay - i should be clearer. the thing that is missing, that only xen provides, is the presentation of another block device as a hard drive. e.g. /dev/volumegroup/volumename --> /dev/loopblocka or /dev/loop0 -> /dev/loopblocka such that it is possible to then subsequently do this: fdisk /dev/loopblocka and mkfs.ext2 /dev/loopblocka1 mount /dev/loopblocka1 -t ext2 /mnt/somewhere you get the gist. basically, the thing that is missing (or i can't find it) from linux is a driver with the ability to present [any] block devices with their major+minor numbers as a [fsck-]recogniseable block device with its own major number, with the implicit ability to create minor numbers within it. lvm is in its own way a sort of mad-cap over-extended version of the above, if you think about it carefully and can understand the sentence. l. On Wed, Jun 29, 2005 at 02:35:25AM +0200, Grzegorz Kulewski wrote: > On Wed, 29 Jun 2005, Luke Kenneth Casson Leighton wrote: > > >[if you are happy to reply at all, please reply cc'd thank you.] > > > >hi, > > > >i'm really sorry to be bothering people on this list but i genuinely > >don't what phrases to google for what i am looking for without getting > >swamped by useless pages, which you will understand why when you see > >the question, below. > > > >the question is, therefore: > > > > * how the hell do you loopback mount (or lvm mount > > or _anything_! something!) partitions that have > > been created in a loopback'd file!!!! > > > > [aside from booting up a second pre-installed xen > > guest domain and making the filesystem-in-a-file > > available as /dev/hdb of course.] > > > >answers of the form "work out where the partitions are, then use > >hexedit to remove the first few blocks" will win no prizes here. > > The bad news: it was impossible (or at least very hard to do). > > The good news: it is possible now. The anwser is: > - figure where the partitions are (possibly using some simple script), > - use device-mapper to create block devices covering partitions, > - mount them. > > I do not know if this anwser will win your price but it is IMHO far better > than hexedit... :-) And probably this is the only anwser. > > (IIRC if you have one partition you can skip partition table with offset > option to losetup. But this will only work in this special case...) > > > Grzegorz Kulewski > -- -- http://lkcl.net -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262161AbVF2Bx4 (ORCPT ); Tue, 28 Jun 2005 21:53:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262234AbVF2BvK (ORCPT ); Tue, 28 Jun 2005 21:51:10 -0400 Received: from mail04.syd.optusnet.com.au ([211.29.132.185]:33413 "EHLO mail04.syd.optusnet.com.au") by vger.kernel.org with ESMTP id S262324AbVF2BtQ (ORCPT ); Tue, 28 Jun 2005 21:49:16 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17089.65016.112262.278719@wombat.chubb.wattle.id.au> Date: Wed, 29 Jun 2005 11:48:40 +1000 From: Peter Chubb To: Luke Kenneth Casson Leighton Cc: Grzegorz Kulewski , linux-kernel@vger.kernel.org Subject: Re: accessing loopback filesystem+partitions on a file In-Reply-To: <20050629013731.GF9566@lkcl.net> References: <20050628233335.GB9087@lkcl.net> <20050629013731.GF9566@lkcl.net> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid Comments: Hyperbole mail buttons accepted, v04.18. X-Face: GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P@e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h# !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[,(&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9% \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j! Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Luke" == Luke Kenneth Casson Leighton writes: Luke> xen guest OSes manage it fine - the xen layer provides a means Luke> to present any block device as a "disk". You can do this witht he loop device, but you need to get the partition info out first. Use parted or fdisk to get the partition info. Then use losetup with the appropriate offset. Luke> that loopback filesystems cannot be presented as block devices Luke> by the linux kernel (with no involvement of xen) seems to be a Luke> curious omission. But they can! But a loopback device can't be partitioned. So do it one partition at a time. You'll probably only have a few real filesystems on the disk image anyway. -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au The technical we do immediately, the political takes *forever* From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262453AbVF2HOl (ORCPT ); Wed, 29 Jun 2005 03:14:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262461AbVF2HOa (ORCPT ); Wed, 29 Jun 2005 03:14:30 -0400 Received: from mta2.cl.cam.ac.uk ([128.232.0.14]:10904 "EHLO mta2.cl.cam.ac.uk") by vger.kernel.org with ESMTP id S262453AbVF2HMu convert rfc822-to-8bit (ORCPT ); Wed, 29 Jun 2005 03:12:50 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: accessing loopback filesystem+partitions on a file x-mimeole: Produced By Microsoft Exchange V6.5.7226.0 Date: Wed, 29 Jun 2005 08:12:44 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: accessing loopback filesystem+partitions on a file Thread-Index: AcV8TXg1851pRgL1RRW2XKJMpP2tewAK1UVA From: "Ian Pratt" To: "Luke Kenneth Casson Leighton" , "Grzegorz Kulewski" Cc: , Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > basically, the thing that is missing (or i can't find it) > from linux is a driver with the ability to present [any] > block devices with their major+minor numbers as a > [fsck-]recogniseable block device with its own major number, > with the implicit ability to create minor numbers within it. The easiest thing to use is the 'lomount' utility that comes with qemu. http://www.dad-answers.com/qemu/utilities/QEMU-HD-Mounter/lomount/lomoun t.c There's also kpartx which is part of device mapper, but its rather trickier to build. I think we should pull lomount into our tree until kpartx becomes ubiquitous. Ian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262318AbVF2Jvj (ORCPT ); Wed, 29 Jun 2005 05:51:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262489AbVF2Jvj (ORCPT ); Wed, 29 Jun 2005 05:51:39 -0400 Received: from free.hands.com ([83.142.228.128]:22950 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S262318AbVF2Jvc (ORCPT ); Wed, 29 Jun 2005 05:51:32 -0400 Date: Wed, 29 Jun 2005 11:00:26 +0100 From: Luke Kenneth Casson Leighton To: Peter Chubb Cc: Grzegorz Kulewski , linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com Subject: Re: accessing loopback filesystem+partitions on a file Message-ID: <20050629100026.GG10219@lkcl.net> References: <20050628233335.GB9087@lkcl.net> <20050629013731.GF9566@lkcl.net> <17089.65016.112262.278719@wombat.chubb.wattle.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17089.65016.112262.278719@wombat.chubb.wattle.id.au> User-Agent: Mutt/1.5.5.1+cvs20040105i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 29, 2005 at 11:48:40AM +1000, Peter Chubb wrote: > Luke> that loopback filesystems cannot be presented as block devices > Luke> by the linux kernel (with no involvement of xen) seems to be a > Luke> curious omission. > > But they can! But a loopback device can't be partitioned. So do it > one partition at a time. ian and mark kindly responded pointing out some programs which make that possible. i liked the LVM one best. > You'll probably only have a few real filesystems on the disk image > anyway. hi peter, thank you for responding. see http://hands.com/d-i, searching for "xen0". the key is to be able to test-run debian installations in a xen guest domain (with absolute minimal changes to the packages or the debian boot installs). and of course a debian install expects to see a hard drive, which it expects to be able to partition - so it is given one. l. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262527AbVF2Kw5 (ORCPT ); Wed, 29 Jun 2005 06:52:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262524AbVF2Kw4 (ORCPT ); Wed, 29 Jun 2005 06:52:56 -0400 Received: from gate.corvil.net ([213.94.219.177]:39175 "EHLO corvil.com") by vger.kernel.org with ESMTP id S262527AbVF2Kw2 (ORCPT ); Wed, 29 Jun 2005 06:52:28 -0400 Message-ID: <42C27D62.1040201@draigBrady.com> Date: Wed, 29 Jun 2005 11:52:18 +0100 From: P@draigBrady.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Luke Kenneth Casson Leighton CC: linux-kernel@vger.kernel.org Subject: Re: accessing loopback filesystem+partitions on a file References: <20050628233335.GB9087@lkcl.net> In-Reply-To: <20050628233335.GB9087@lkcl.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Luke Kenneth Casson Leighton wrote: > > * how the hell do you loopback mount (or lvm mount > or _anything_! something!) partitions that have > been created in a loopback'd file!!!! Have a look at http://www.pixelbeat.org/scripts/lomount.sh Pádraig. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262569AbVF2N2C (ORCPT ); Wed, 29 Jun 2005 09:28:02 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262572AbVF2N2C (ORCPT ); Wed, 29 Jun 2005 09:28:02 -0400 Received: from mail.tnnet.fi ([217.112.240.26]:63653 "EHLO mail.tnnet.fi") by vger.kernel.org with ESMTP id S262569AbVF2N16 (ORCPT ); Wed, 29 Jun 2005 09:27:58 -0400 Message-ID: <42C2A1D5.D586E874@users.sourceforge.net> Date: Wed, 29 Jun 2005 16:27:49 +0300 From: Jari Ruusu X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.22aa1r10 i686) X-Accept-Language: en MIME-Version: 1.0 To: Luke Kenneth Casson Leighton Cc: linux-kernel@vger.kernel.org Subject: Re: accessing loopback filesystem+partitions on a file References: <20050628233335.GB9087@lkcl.net> <20050629015030.GG9566@lkcl.net> Content-Type: multipart/mixed; boundary="------------BA9C1B5A3D98E3110D115655" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------BA9C1B5A3D98E3110D115655 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Luke Kenneth Casson Leighton wrote: > such that it is possible to then subsequently do this: > > fdisk /dev/loopblocka and > mkfs.ext2 /dev/loopblocka1 > mount /dev/loopblocka1 -t ext2 /mnt/somewhere Using attached image-mount script that is possible. Like this: ln -s image-mount image-losetup fdisk filename (remember to set correct cyl/head/sect before creating partitions) ./image-losetup /dev/loop7 filename 2 mkfs.ext2 /dev/loop7 mount /dev/loop7 -t ext2 /mnt/somewhere umount /mnt/somewhere losetup -d /dev/loop7 or ./image-mount filename 2 /mnt/somewhere umount /mnt/somewhere Good news is that image-mount and image-losetup scripts get both size and offset of the partition right, so mkfs creates correct size file system. Bad news is that it only works with losetup and mount programs from loop-AES package. Google for "loop-AES" if you can't find it. -- Jari Ruusu 1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9 DB 1D EB E3 24 0E A9 DD --------------BA9C1B5A3D98E3110D115655 Content-Type: application/octet-stream; name="image-mount.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="image-mount.bz2" QlpoOTFBWSZTWfEzhWEAAI5fgEAQfJf/OsyVWop/7//+QAIbaxu4Aamp6kA2UxNBoNA0DQaA 0B6jR6glEaTCJtJiampvVP1TTRoAGgyaPUA0GISp5T0ZIZAeoHqBo0aG1NAYjR6glSnqeoME BpgQDQGhoGmmgAGJMpZwhV9eMDbd0LMWbZwq2ia4UMsG5lEyCCG0QSMiJhCiN9U91paOc72d zM6HJUZSfKcO4Y7HXU+2xc/l2OR4Fg0G6VQEq4ETAbEwQR4+k4biBeALatseR1gFpuIz4Fkq 0aW+HPf55FvefESk92rBi/xLxNRRc3bdeexwyTGDlcM+8hYSiR23rQ8IGdWSOYSh0kZBD8iH FaCRMX/N9c0700DnEoEgUM43QxklDDYZq6anINOu/WE3QOLlDdlyZrqr2FA6tAY8GpiRjFoq SE4OAQQS+Fhp9H2qPRCk1KYZQWV14kAGTlOE1CWZIYif4iRaBv5gUQMBSWIhvg/YQJaHwiSK SyEFymI5B+QJURwqg4RXIFZBVKBgI6jTDTfAvtElZgdRzQRY12F3ngzOdfD+unjYMQIg/gOt aEsJEgZcQlo86IwID1VImaBI6OYkayEfNj/K8OALdcqpZUsDRR6X7miNqZDeip3xgEjA3l9T bcHTLATrno92JQezyYlqWGlw9H8a60XMcJdYmRFJQjAkDgxVsQoHytPH5ScczJ5klg8weOuv UfsesEKIHUabC645eQbRzo2VmSj/xdyRThQkPEzhWEA= --------------BA9C1B5A3D98E3110D115655-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262759AbVF3AeM (ORCPT ); Wed, 29 Jun 2005 20:34:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262761AbVF3AeL (ORCPT ); Wed, 29 Jun 2005 20:34:11 -0400 Received: from free.hands.com ([83.142.228.128]:22453 "EHLO free.hands.com") by vger.kernel.org with ESMTP id S262759AbVF3Adn (ORCPT ); Wed, 29 Jun 2005 20:33:43 -0400 Date: Thu, 30 Jun 2005 01:38:48 +0100 From: Luke Kenneth Casson Leighton To: Jari Ruusu Cc: linux-kernel@vger.kernel.org Subject: Re: accessing loopback filesystem+partitions on a file Message-ID: <20050630003848.GC8415@lkcl.net> References: <20050628233335.GB9087@lkcl.net> <20050629015030.GG9566@lkcl.net> <42C2A1D5.D586E874@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42C2A1D5.D586E874@users.sourceforge.net> User-Agent: Mutt/1.5.5.1+cvs20040105i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org jari, thank you. there are _loads_ of people with mad and bad solutions - why are none of them easily accessible via oh say debian packages??? l. On Wed, Jun 29, 2005 at 04:27:49PM +0300, Jari Ruusu wrote: > Luke Kenneth Casson Leighton wrote: > > such that it is possible to then subsequently do this: > > > > fdisk /dev/loopblocka and > > mkfs.ext2 /dev/loopblocka1 > > mount /dev/loopblocka1 -t ext2 /mnt/somewhere > > Using attached image-mount script that is possible. Like this: > > ln -s image-mount image-losetup > fdisk filename > (remember to set correct cyl/head/sect before creating partitions) > ./image-losetup /dev/loop7 filename 2 > mkfs.ext2 /dev/loop7 > mount /dev/loop7 -t ext2 /mnt/somewhere > umount /mnt/somewhere > losetup -d /dev/loop7 > > or > > ./image-mount filename 2 /mnt/somewhere > umount /mnt/somewhere > > Good news is that image-mount and image-losetup scripts get both size and > offset of the partition right, so mkfs creates correct size file system. Bad > news is that it only works with losetup and mount programs from loop-AES > package. Google for "loop-AES" if you can't find it. > > -- > Jari Ruusu 1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9 DB 1D EB E3 24 0E A9 DD -- -- http://lkcl.net --