This is my first post on the new backtrack forums. I'm feeling kinda nervous. Well, this is a small shell script I have written to make just any USB flash drive to a fully working persistent install of phenomenal BT. Well, the obvious question that may arise in your mind that why again another tutorial for the same persistent "thing". Well, I too don't favor re-inventing the old wheel. But IMHO this method has some advantages like:
Now if any of the above points interests you, you can continue reading this thread. For this method you need to 1 bootable BT4 media (may be a DVD or bootable USB) and another with USB disk.
- As easy as 1-2-3
- No need to format, partition the USB drive.
- No need to install grub. We can use the easy UnetBootin as we did earlier
- Interestingly we can share our pre-created BT4 "persistence" with our friends, even from Windows.
- Restore your persistence, incase of accidental or emergency USB disk format.
Now follow these steps:
1. Use UnetBootin tool to copy the BT4 ISO to your target USB drive.
2. Reboot your PC, with the second BT4 bootable media (e.g. DVD)
3. Connect your USB disk and mount it in Konqueror, in other words simply double click it.
4. Run the following script:
5. In your target USB drive, open the file /syslinux.cfg in your favorite editor e.g. Kate and change the line
echo "WARNING: Before running this script, confirm that the target USB"
echo "drive has WRITE permission and it has been mounted. If you are"
echo "unsure press Ctrl+C and check before running this script again."
echo " "
echo "Enter the path to your mounted USB disk: (e.g. /media/disk-0):"
echo " "
echo "Enter the amount of space you want to allocate, in MB (e.g. 1024 = 1GB or 4096 = 4GB):"
echo " "
echo "Stop all operations on target disk,"
echo "sleeping for 5 seconds before processing..."
echo " "
echo "Task starting, this may take several minutes..."
dd if=/dev/zero of/$USB_PATH/casper-rw bs=1M count=$RW_SIZE
mkfs.ext3 -F /$USB_PATH/casper-rw
echo "Task completed successfully. Reboot PC in persistent mode! :)"
initrd=/boot/initrd.gz BOOT=casper boot=casper persistent rw quiet
6. Reboot and enjoy persistence.
initrd=/boot/initrd.gz BOOT=casper boot=casper persistent rw quiet vga=0x317
Now if you want to share your persistence with others or just want to keep a back-up so that you need to restore it later, for any reasons then plug in the USB disk and copy the casper-rw file to a safe location of your hard-disk. You can distribute this file with all your changes saved there in.
Thats all for now. Please be kind, if I made any mistakes.