Fedora Core 4 - 1Gig USB Stick How-To

By: Eric Schultz

Purpose

Set up an fully updated Fedora Core 4 system on a 1 Gig USB Stick.

Back Story

Well, I built up a computer with a RocketRaid 2XXX something SATA 8-port RAID card. But, I wanted to allow it to sleep if it could. So, I also bought a 1Gig USB stick. In hindsight, buy a 2Gig, it's much easier. I figured that 1Gig would be plenty since all I wanted was a nice lightweight NFS server for my office, using a RAID array so I never had to worry about the files disappearing. But, being stuck with what I bought, I endevored to set it up.

For the advanced

Ok, Here is the rundown, real quick for the guru.
  1. Install minimal FC4 onto stick. (use ext2 NOT ext3)
  2. Pull the disk image into a file on another HD. (dd if=/dev/sda1 of=/a_disk_image.file)
  3. Expand the disk image by 400Meg
  4. Expand the ext2 filesystem
  5. Mount file filesystem image (mount -o loop /a_disk_image.file /mnt/temp)
  6. Changeroot into filesystem (chroot /mnt/temp)
  7. Update All your packages (yum update)
  8. install (yum install) the following packages
  9. Re-make the boot initrd with the following libs pre-loaded
  10. Modify Grub to use your new initrd.
  11. Clean up the Yum package directory to Free some space (yum clean all)
  12. Exit chroot (exit)
  13. Un Mount file filesystem (umount /mnt/temp)
  14. shrink ext2 Filesystem
  15. shrink disk file image
  16. copy file filesystem back to usb stick
Ok, so it's not all that quick. But that's what you do.

For the Not So Advanced

I will get to writing this... but if you don't know what mount,grub,dd,and mkinitrd do, you most likly shouldn't be doing this. The tricky parts are expanding and contracting the filesystem imo... it allways makes me nervous.