X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Fminimal-filesystem.sh;h=678d612b4ac1b56b8d7a73277c6f1722607ca5fc;hb=d86b1dce34291e094a263ef1ec63486ba934fb24;hp=1ef692894d1e389b32eb3d5a77d74ff0800a4583;hpb=1b640fb0bd84f88d378b6c4a74088ac22c8f7d75;p=febootstrap.git diff --git a/examples/minimal-filesystem.sh b/examples/minimal-filesystem.sh index 1ef6928..678d612 100755 --- a/examples/minimal-filesystem.sh +++ b/examples/minimal-filesystem.sh @@ -12,12 +12,24 @@ # few command line utilities. One of the joys of Fedora is that even # this minimal install is still 200 MB ... +set -e + +if [ $(id -u) -eq 0 ]; then + echo "Don't run this script as root. Read instructions in script first." + exit 1 +fi + +if [ ! -e vmlinuz ]; then + echo "Read instructions in script first." + exit 1 +fi + ../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 ./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 @@ -45,6 +57,6 @@ dd if=/dev/zero of=zero bs=2048 count=1 # Now run qemu to boot this minimal system. qemu-system-$(arch) \ - -m 128 \ + -m 256 \ -kernel vmlinuz -initrd minimal-initrd.img \ -hda zero -boot c