Re: ext2 creator

Nate Riffe <[email protected]>
Newsgroups gmane.linux.bbc.devel
Message-ID <[email protected]>
Just now Niall O Broin made 15 LEDs in my apartment flash with this:
> Am I missing something here ? Surely this is trivial as 
>
> #!/bin/sh
> FILE=$1
> SOURCE=$2
> MOUNT=/tmp/root.bin.$$
> SIZE=$(du -s $SOURCE|awk '{print $1}')
> #
> # make a big enough empty file, put a filesystem on it, and copy files to it
> #
> dd if=/dev/zero of=$FILE bs=1k count=$SIZE
> ls -l $FILE
> mke2fs -m 0 -F $FILE
> mkdir $MOUNT
> mount -o loop $FILE $MOUNT
> cd $SOURCE
> cp -a . $MOUNT
> umount $MOUNT
> rmdir $MOUNT

You are missing something trivial.  It must not require superuser
privileges.

-- 
--< ((\))< >----< [email protected] >----< http://www.movealong.org/ >--
pub  1024D/05A058E0 2002-03-07 Nate Riffe (06-Mar-2002) <[email protected]>
     Key fingerprint = 0DAC F5CB D182 3165 D757  C466 CD42 12A8 05A0 58E0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.