X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Fminimal-filesystem.sh;h=e1766a9fd0dadc5e6df3cee4dd47e0dc92600737;hb=37176e5c341dcd03df5fd83b6ba219f2c4fb9905;hp=678d612b4ac1b56b8d7a73277c6f1722607ca5fc;hpb=9cf3beefb865ea3e1a4bbe570d632649540788cc;p=febootstrap.git diff --git a/examples/minimal-filesystem.sh b/examples/minimal-filesystem.sh index 678d612..e1766a9 100755 --- a/examples/minimal-filesystem.sh +++ b/examples/minimal-filesystem.sh @@ -24,30 +24,34 @@ if [ ! -e vmlinuz ]; then exit 1 fi -../febootstrap -i bash -i coreutils fedora-10 ./minimal $1 +febootstrap -i bash -i coreutils fedora-10 ./minimal $1 # ... but let's minimize it aggressively. echo -n "Before minimization: "; du -sh minimal -../febootstrap-minimize --all --pack-executables ./minimal +febootstrap-minimize --all --pack-executables ./minimal echo -n "After minimization: "; du -sh minimal # Create the /init which is just a simple script to give users an # interactive shell. -( cd minimal && cat > init <<'__EOF__' +create_init () +{ + cat > /init <<'__EOF__' #!/bin/sh echo; echo; echo echo "Welcome to the minimal filesystem example" echo; echo; echo /bin/bash -i __EOF__ -chmod +x init -) + chmod +x /init +} +export -f create_init +febootstrap-run ./minimal -- bash -c create_init # Convert the filesystem to an initrd image. -../febootstrap-to-initramfs ./minimal > minimal-initrd.img +febootstrap-to-initramfs ./minimal > minimal-initrd.img # This is needed because of crappiness with qemu.