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.
- Install minimal FC4 onto stick. (use ext2 NOT ext3)
- Pull the disk image into a file on another HD. (dd if=/dev/sda1 of=/a_disk_image.file)
- Expand the disk image by 400Meg
- Expand the ext2 filesystem
- Mount file filesystem image (mount -o loop /a_disk_image.file /mnt/temp)
- Changeroot into filesystem (chroot /mnt/temp)
- Update All your packages (yum update)
- install (yum install) the following packages
- glibc-devel
- cpp
- gcc
- kernel-devel
- Re-make the boot initrd with the following libs pre-loaded
- uhci-hcd
- usb-storage
- scsi_mod
- sd_mod
- ext3
- Modify Grub to use your new initrd.
- Clean up the Yum package directory to Free some space (yum clean all)
- Exit chroot (exit)
- Un Mount file filesystem (umount /mnt/temp)
- shrink ext2 Filesystem
- shrink disk file image
- 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.