# Unmount and compress the filesystem
echo "Compressing filesystem"
sync;sync
umount
-r tempfs 2> /dev/null
umount -l tempfs 2> /dev/null
dd if=fs bs=1k | gzip -q -9 > filesys

At this point, the 4MB file system is complete. I unmount it, then use dd to pipe it through the "gzip" compression program. The name of the compressed output file is "filesys". Why? Well, because this file is going to go on a FAT floppy, the 8-dot-3 naming rules apply. The word "filesystem" is too long. But why not name it with a "gz" extension? First, I don't need to, but second (and more importantly) during boot, a message will be displayed showing the word "Loading" followed by the compressed file name. If it said "Loading fs.gz", it might tell you the name of the file, but not what it was! So I want to pick a name that is as descriptive as possible. The message "Loading filesys" looks better to me.