I've been watching Hak5 since it hit Revision3 last year, and I've generally enjoyed the show. Recently, host Darren Kitchen talked about creating a persistent Backtrack boot-able flash device. Since I'd be using this with my EeePC (or another laptop), I decided that the idea of running an OS off a thumb drive for any period of time was scary, so I decided to go the SD Card route.
Unfortunately, Revision 3 doesn't provide good show notes for how this was done, Hak5.org is down, and Backtrack's own page on a persistent USB drive is completely empty. The provided content is taken almost verbatim from Darren's presentation on the linked video above, and I'll embed the video after the instructions. I just felt that a write-up would be convenient.
- Download the Backtrack4 ISO
- Set up bootable media with Backtrack, either burn a CD, or a thumb drive using unetbootin
- Boot BT4, put your SD Card in your computer and find out what device it mounted as. Enter
dmesg | grep hd.\|sd.at the command prompt, the bottom entries will likely be the correct ones. On my system, it was /dev/sdc so that's what I use.
parted /dev/sdc(I vary from Darren on this)
- Create the first filesystem with
mkpartfs primary fat32 0 2.5GBThis will create a two and a half gigabyte, fat32 partition as your main data store.
- Make Partition 1 bootable with
set 1 boot on
- Create Partition 2 with
mkpart primary ext3 2.5GB 100%. This will fill the rest of the device with a empty partition. I used an 8GB drive, but the 100% will fill the rest of the drive.
- Exit parted with
mkfs.ext3 -b 4096 -L casper-rw /dev/sdcto create the persistent area on the storage.
mount /dev/sdc1 /mnt/sdc1to mount the first partition you created.
rsync -r /media/cdrom0/ /mnt/sdc1to copy all the files from the boot media to the boot partition. This will take some time.
grub-install --no-floppy --root-directory=/dev/sdc1 /dev/sdcto install grub on your sd card.
- Edit /mnt/sdc1/boot/grub/menu.lst in your favorite editor
- Change the line 'default 0' to 'default 4' to load in persistent mode by default.
- To the end of the kernel line for the Persistent Live CD option, add 'vga=0x317'
- Shutdown and reboot.
- My EeePC is an original 8G, meaning that it's running a Celeron M, not an Atom, and it has the smaller (6") screen.
- To select your boot device from the Eee PC Menu, hit the ESC key when the system starts to boot (these things boot fast, so hit it quick) and choose the 'USB2.0CardReader' option to boot from SD. If you're booting from a thumbdrive and your thumbdrive has a U3 partition, odds are you'll want the first one on the list. If it refuses to boot it, reboot and try the other.
- The system is currently booting into a text console for me, not the GUI. If I want the GUI, I can just type 'startx' and it comes right up. I'm trying to solve this issue, and when I do, I'll update this post.