Minggu, 31 Oktober 2010

Backtrack 4 Final Persistent USB ***Easiest Way***

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:

- 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 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.
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:

Code:

#!/bin/bash
USB_PATH=none
RW_SIZE=none
clear
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 " "
sleep 3
echo "Enter the path to your mounted USB disk: (e.g. /media/disk-0):"
read USB_PATH
echo " "
echo "Enter the amount of space you want to allocate, in MB (e.g. 1024 = 1GB or 4096 = 4GB):"
read RW_SIZE
echo " "
echo "Stop all operations on target disk,"
echo "sleeping for 5 seconds before processing..."
sleep 5
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! :)"

5. In your target USB drive, open the file /syslinux.cfg in your favorite editor e.g. Kate and change the line

Code:

initrd=/boot/initrd.gz BOOT=casper boot=casper persistent rw quiet

to

Code:

initrd=/boot/initrd.gz BOOT=casper boot=casper persistent rw quiet vga=0x317

6. Reboot and enjoy persistence.

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.




from >>http://www.backtrack-linux.org/forums/backtrack-howtos/819-backtrack-4-final-persistent-usb-***easiest-way***.html

Tidak ada komentar:

Posting Komentar