LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Alan Kennington <akenning@topology.org>
  To  : LinuxSA <linuxsa@linuxsa.org.au>
  Date: Fri, 22 Jun 2001 14:55:37 +0930

Re: Toshiba slimline laptop CD-reader choice

On Fri, Jun 22, 2001 at 02:32:29PM +0930, Anthony Symons wrote:
> > 
> > On a related topic, do you happen to know how to _create_ a
> > minix file system as a file?
> > I can see how to use mkfs.minix to create a minix file
> > system in a disk partition and then copy it to a file with "dd".
> 
> [root@ant ant]# dd if=/dev/zero of=minix.img count=2048
> 2048+0 records in
> 2048+0 records out
> [root@ant ant]# mkfs.minix minix.img 
> 352 inodes
> 1024 blocks
> Firstdatazone=15 (15)
> Zonesize=1024
> Maxsize=268966912
> 
> [root@ant ant]# mkdir test
> [root@ant ant]# mount -o loop minix.img test
> [root@ant ant]# df
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/hda3              9187724   7582380   1144280  87% /
> /dev/hda5              8465968   8252112    213856  97% /mnt/data
> /dev/hda1              2096160   1983840    112320  95% /mnt/nt
> /home/ant/minix.img       1009         1      1008   0% /home/ant/test
>  
> Simple as that!

Well, I'm stunned.
I did try to run mkfs.minix on a plain file - but it had
zero bytes in it.
And the complaint from the program was:

-----------------------------------------
akenning@dog> mkfs.minix xyz 10000
mkfs.minix: unable to open %s
-----------------------------------------

which didn't suggest a file-length error to me.
But it all works well with the 2048-block file of zeros
as you have it.

When I tried it on another system, I got:

------------------------------------------
dog /root/tmp# mount -o loop minix.img test
mount: Could not find any loop device, and, according to /proc/devices,
       this kernel does not know about the loop device.
       (If so, then recompile or `insmod loop.o'.)       
------------------------------------------

So now I know what that option in the kernel config was.
Next time I'll remember to always say yes to the loopback
filesystem option.

Since I haven't seen this topic documented anywhere, I'll
summarise what you've said and stick it on a web page.

Cheers, and thanks again,
Alan Kennington.

-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page