diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-12-03 13:17:00 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-12-05 09:33:25 +0000 |
commit | 66a9d53e48f14d7fe1d9f4b801a1c5582d83efa6 (patch) | |
tree | 555e29f52452cd88a6deb086b86bb55ab85f5fff /examples/minimal-filesystem.sh | |
parent | 304ee3695e41904d8b2184922732f47aa6ccc0d4 (diff) | |
download | febootstrap-3.0.tar.gz febootstrap-3.0.tar.xz febootstrap-3.0.zip |
Rewrite febootstrap as a general supermin appliance building tool.3.0
This complete rewrite of the building tools turns febootstrap
into a general purpose, cross-distro, supermin appliance only
build tool.
There is now only one program 'febootstrap' which is used to
build a supermin appliance from a list of packages.
Normal appliances are not supported.
The tools are incompatible with febootstrap 2.x (use the
febootstrap-2.x branch from git to get the old package).
Diffstat (limited to 'examples/minimal-filesystem.sh')
-rwxr-xr-x | examples/minimal-filesystem.sh | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/examples/minimal-filesystem.sh b/examples/minimal-filesystem.sh deleted file mode 100755 index e1766a9..0000000 --- a/examples/minimal-filesystem.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh - - -# Before running, make sure 'vmlinuz' in this examples directory is a -# bootable Linux kernel or a symlink to one. You can just use any -# kernel out of the /boot directory for this. -# -# eg: -# cd examples -# ln -s /boot/vmlinuz-NNN vmlinuz - -# This creates a very minimal filesystem, just containing bash and a -# 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 --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. - -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 -} -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 - -# This is needed because of crappiness with qemu. - -rm -f zero -dd if=/dev/zero of=zero bs=2048 count=1 - -# Now run qemu to boot this minimal system. - -qemu-system-$(arch) \ - -m 256 \ - -kernel vmlinuz -initrd minimal-initrd.img \ - -hda zero -boot c |