[plug] ext2 filesystem on a file?

Luke Dudney dex at wn.com.au
Sat May 17 01:39:12 WST 2003


Bernard Blackham wrote, On 17/05/03 00:58:

>On Sat, May 17, 2003 at 12:45:43AM +0800, Luke Dudney wrote:
>  
>
>>I have a 30gb vfat filesystem some of which I'd like to reclaim for use 
>>with linux. I need features of ext2 such as modes and links. I am sure I 
>>can create a zero'ed file with dd, and then being able to make an ext2 
>>filesystem within that file, and mount it as normal. Google's not 
>>helping much, can someone remember the commands required?
>>    
>>
>
>Well assuming you don't want to use the umsdos filesystem, which was
>designed for that reason more or less, it goes something along the
>lines of:
>
>1) dd if=/dev/zero of=/path/to/file bs=1M count=1024
>   (maybe a modprobe loop needed)
>2) losetup /dev/loop0 /path/to/file
>3) mke2fs /dev/loop0
>4) losetup -d /dev/loop0
>5) mount -o loop -t ext2 /path/to/file /mnt
>6) *cross fingers*
>
>I'm not entirely certain about the differences in speed between
>this method, and using umsdos. The alternative is to use fips and
>make a native ext2/3 partition, which I'm nearly certain will be
>faster :)
>
>HTH,
>
>Bernard.
>  
>

Thanks Bernard.
Worked a treat, but I've hit a 2gb limit on file size. I think it's a 
limitation of the vfat driver. Luckily what I need it for is compiling 
XFree86 4.3 from srpm, which requires --  2GB of space :)
I'll have a look into UMSDOS.

Cheers
Luke




More information about the plug mailing list