A loopback device allows a normal disk file to be mounted as a filesystem. Depending on how much physical memory you have, using a loopback device may be preferable to using /dev/ram0 for building a root filesystem with Yard.
To use a loopback device you'll need to do the following:
Thanks to Roderich Schupp for some of this information.
mountmanpage to see if it supports loopback devices. If it doesn't, you'll need modified versions of mount and losetup. These are available from:
ftp://ftp.win.tue.nl:/pub/linux/util/in the file
mount-2.5X.tar.gz
, where X is the latest
version letter.
mke2fs
; if there is no ``-F'' option listed, you'll need a
newer version. mke2fs is included in the e2fsprogs package
available in:
sunsite.unc.edu:/pub/Linux/system/Filesystems/ext2/
To use the loopback device/file with Yard, simply:
create_loopback_file
or do it yourself with:
dd if=/dev/zero of=$device bs=1k count=$fs_size
and substitute your values for $device and
$fs_size.
insmod
loop
) into your kernel.
Yard may then be run with no further alterations.
Warning: When using a loopback device, occasionally the ext2
filesystem seems to get corrupted for no apparent reason. If you start
getting errors in the middle of make_root_fs
from sys()
complaining that a directory doesn't exist, this may be what is happening.
I don't know why this happens and I can't reproduce it consistently;
however, unmounting, deleting and re-creating the file seems to get rid of
the problem.