A filesystem within a filesystem?

A filesystem within a filesystem?

Post by Nick Kralevi » Sat, 26 Nov 1994 21:43:21



Here's a challenge for you Linuxers!

I am trying to create a file system within a file system.

Specifically, let's say I have a minix file system image called /fsimage.
Now I want to mount that file system image.

I tried the following:
mount -t minix /fsimage /mnt

to mount the filesystem /fsimage at my mounting point /mnt.

Needless to say, this failed with an error message.
mount: /fsimage is not a block device

Any ideas on how I can do this?  I tried following the example of
creating a swap _file_, but it just didn't work.  The command "swapon"
accepts a file name as an argument, so why doesn't mount?

BTW, assume the file /fsimage is larger than any floppy I have, so I can't
copy it to a floppy and mount it from there.

Thanks for your help!

Take care,
-- Nick Kralevich

--

"A man sits with a pretty girl for an hour and it seems shorter than
a minute.  But tell that same man to sit on a hot stove for a minute,
it is longer than any hour.  That's relativity."  -- Einstein

 
 
 

A filesystem within a filesystem?

Post by Frank Pilhof » Sat, 26 Nov 1994 23:31:05



Quote:>Here's a challenge for you Linuxers!
>I am trying to create a file system within a file system.
>Specifically, let's say I have a minix file system image called /fsimage.
>Now I want to mount that file system image.
>I tried the following:
>mount -t minix /fsimage /mnt
>to mount the filesystem /fsimage at my mounting point /mnt.
>Needless to say, this failed with an error message.
>mount: /fsimage is not a block device

 Create a new partition on your hard disc and 'dd if=/fsimage of=/dev/sd??'
the image onto its own partition. You can then mount /dev/sd?? as a normal
minix partition.

        Frank

--

 | Darmstaedter Str. 22                                                      |
 | D-63225 Langen, Germany                    RAD Host (PAL/NTSC video,UNIX) |
 +---------------------------------------------------------------------------+

 
 
 

A filesystem within a filesystem?

Post by Nick Kralevi » Sun, 27 Nov 1994 05:30:42




> Create a new partition on your hard disc and 'dd if=/fsimage of=/dev/sd??'
>the image onto its own partition. You can then mount /dev/sd?? as a normal
>minix partition.

Easier said than done.  I have this 3 meg file that is a disk image.
I don't want to have to repartition my entire hard drive just to view
this file.  But since it's 3 megs, it doesn't fit on a floppy (at
least not on the standard 5 1/4 1.2 Meg or 3 1/2 1.44 Meg floppies).

Take care,
-- Nick Kralevich

--

"A man sits with a pretty girl for an hour and it seems shorter than
a minute.  But tell that same man to sit on a hot stove for a minute,
it is longer than any hour.  That's relativity."  -- Einstein

 
 
 

A filesystem within a filesystem?

Post by Matthias Ra » Sun, 27 Nov 1994 08:23:28






>> Create a new partition on your hard disc and 'dd if=/fsimage of=/dev/sd??'
>>the image onto its own partition. You can then mount /dev/sd?? as a normal
>>minix partition.

>Easier said than done.  I have this 3 meg file that is a disk image.
>I don't want to have to repartition my entire hard drive just to view
>this file.  But since it's 3 megs, it doesn't fit on a floppy (at
>least not on the standard 5 1/4 1.2 Meg or 3 1/2 1.44 Meg floppies).

You my edit an empty partition tabel entry to point to this file
(be careful!).

Matthias
--

Universit"at Bielefeld                        Privat: Avenwedder Str. 494
U5-133                                                D 33335 G"utersloh
Tel.: 49 (0)521-106-3871                              Tel.: 49 (0)5209-6673

 
 
 

A filesystem within a filesystem?

Post by Mike Cast » Sun, 27 Nov 1994 11:48:12




>Needless to say, this failed with an error message.
>mount: /fsimage is not a block device

Could the userfs be used for something like this?  I've not yet
looked at it, but I would think this is the type of application
it would excel at.
--
Mike Castle .-=NEXUS=-.  Life is like a clock:  You can work constantly


    We are all of us living in the shadow of Manhattan.  -- Watchmen
 
 
 

A filesystem within a filesystem?

Post by Ken Edwar » Mon, 28 Nov 1994 04:15:58


: Here's a challenge for you Linuxers!

: I am trying to create a file system within a file system.

: Specifically, let's say I have a minix file system image called /fsimage.
: Now I want to mount that file system image.

: I tried the following:
: mount -t minix /fsimage /mnt

There was an extension back in the .96 days that used to do exactly this.

It was called the loopback file system and it used the devices /dev/loop*.

I don't know if it has been updated but maybe some one can point you to it.

--

 
 
 

A filesystem within a filesystem?

Post by Ric » Mon, 28 Nov 1994 09:39:00



>I am trying to create a file system within a file system.

Look for Inheriting File System, tsx:~linux/ALPHA/ifs/ifs.5.1.tar.gz
or sunsite:~linux/system/Filesystems/ifs/ifs.5.tar.gz.

Rick.
--
 _-_|\  | Rick Lyons : C/C++/X/Unix/DOS/86/DSP | "My ethicator machine must've

\_.-._/ | Work: +61.7.837.4008 (2300-0700 GMT) | compromise spectral release
     v  | Home: +61.7.349.2764 (0800-1300 GMT) | phantasmatron! I'm a genius!"

 
 
 

A filesystem within a filesystem?

Post by Nick Kralevi » Mon, 28 Nov 1994 12:00:25




>It was called the loopback file system and it used the devices /dev/loop*.

>I don't know if it has been updated but maybe some one can point you to it.

There is a kernel patch for 1.1.3?.  It's very easy to patch by hand
for kernels later than that.  There are only a few lines of code.
I tried it out, and it was exactly what I was looking for.  In fact,
I wonder why it hasn't been made part of the standard kernel yet.
Linux-util-1.10 includes the appropriate mount command to access
the loop device.  The slackware instillation has the /dev/loop0
devices preinstalled.  But it isn't part of the standard kernel.
Why not?  Even the swap command allows swap files, not just swap
partitions.

Thank you to everyone to replied to my plea for help.  The loopback
patches can be picked up at:
 ftp://tsx-11.mit.edu/pub/linux/BETA/loop/lo.3.5b.tar.gz
This was exactly what I was looking for.  Again, thanks to everyone who
responded.

The loopback device is implimented as a loadable kernel module.  
Only a few lines of code need to be added to the kernel, and the rest
is loaded at runtime.

Take care,
-- Nick Kralevich

--

"A man sits with a pretty girl for an hour and it seems shorter than
a minute.  But tell that same man to sit on a hot stove for a minute,
it is longer than any hour.  That's relativity."  -- Einstein

 
 
 

A filesystem within a filesystem?

Post by Chris Bitme » Sat, 03 Dec 1994 01:15:08



>Path: picasso.cssc-syd.tansu.com.au!news.tansu.com.au!wabbit.cc.uow.edu.au!metro!news.cs.su.oz.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!vixen.cso.uiuc.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!hptemp1.cc.umr.edu!nexus

>Newsgroups: comp.os.linux.misc
>Date: 26 Nov 1994 02:48:12 GMT
>Organization: University of Missouri - Rolla
>Lines: 13

>NNTP-Posting-Host: umrolla2-slip14.cc.umr.edu



>>Needless to say, this failed with an error message.
>>mount: /fsimage is not a block device

>Could the userfs be used for something like this?  I've not yet
>looked at it, but I would think this is the type of application
>it would excel at.

Certainly this is a good application for userfs, but I don't know how much
work it would be to get ext2fs working in this manner. (Not a great deal I
suspect).