LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] loopback partition tables ?

[ILUG] loopback partition tables ?

Ronan Cunniffe rcunniff at wilde.cs.tcd.ie
Wed Nov 21 20:55:28 GMT 2001


On Wed, 21 Nov 2001, John P. Looney wrote:

> On Wed, Nov 21, 2001 at 10:45:17AM +0000, Dave Neary mentioned:
> > I can't help you with the partition table magic (surely that's a quick
> > enough hack?) but if you can calculate the offset into the file then you
> > can create /dev/loopN devices with losetup, which has an offset
> > argument. It's not clear from the manpage whether it's possible to hang
> > multiple loopback devices off one disk image, though. Thank Tony here
> > for that answer :)
> 
>  OK, so I've a disk image called "disk.img" (fountain of inspiration, I
> am).
> 
>  I'm looking for the first partition in that image. So;
> 
>      losetup -o 512 /dev/loop3 /tmp/disk.img
>      mount -t ext2 /dev/loop3 /mnt/disk/
> 
>  Now this works. But there isn't anything there, even though I know there
> should be. And, I get an error;
> 
> Nov 21 10:49:14 bartender kernel: EXT2-fs error (device loop(7,3)):
> ext2_check_page: bad entry in directory #2: rec_len is smaller than
> minimal - offset=0, inode=41471, rec_len=11, name_len=0
> 
>  So, I'm doing something wrong. Originally, I thought I'd do an offset of
> 1024 bytes, to get past the bootblock & the partition table. But that
> moaned about no superblock, which didn't happen at a 512 byte offset.
> 
>  Any other ideas as to what I'm doing wrong ?
> 
> Kate
> 

Maybe...
Does anybody know how losetup behaves when the following sequence:
1) Create loopback image on device X with underlying blocksize Y.
2) Move loopback image to device A with underlying blocksize B, B!=Y.
3) Attempt to mount image on A.

I know that this kills loopback encrypted filesystems - you can't move one
from a 'block=512' hd to a 'block=2048' cd and mount it there.  Now, with
encryption, at least there's the excuse that losetup has to guess how big
a block to decrypt to get the superblock that will tell it everything else
it needs to know, but does it behave better when encryption isn't
involved?  And don't tell me to RTFM, 'cos I did, and they well deserve
their F.

Ronan C.





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell