Getting BT4 working on my Aspire One with a persistant USB thumbdrive


Essentially this post covers getting BT4 installed on a thumb drive and enabling changes made to be persistent. There are 3 basic steps. First we need to format the thumb drive to have two partitions, second we need to get the BT4 .iso installed on one of those partitions, and finally we need to make a few modifications to allow changes to be written to the second partition of the thumb drive.
Format the USB drive

Regardless of the size thumb drive we use, we need to partition and format the drive as follows:
1.) The first partition needs to be a primary partition of at least 1 GB and formatted as FAT32.
2.) The second Partition can be the rest of the thumb drive. It needs to be formatted as ext2.

We need to start by creating the proper partitions:
# sudo cfdisk /dev/sdb
Here’s what you’ll need to do:
1. Delete any existing partitions.
2. Create a new, primary partition. Make the size 1024 MB or so.
3. Make the first partition bootable.
4. Change the type of the first partition to C0 (Windows FAT32).
5. Create a new, primary partition, covering the remaining MB you have left.
6. Change the type of the second partition to 85 (ext2).
7. Write the new partition table.
8. Quit the program.
After doing this, we need to format the new partitions. First check for bad blocks on the bootable partition that will hold the BT4 image, then format the two partitions:

# sudo badblocks /dev/sdb1
# sudo mkfs.vfat -F 32 -c /dev/sdb1
# sudo dosfslabel /dev/sdb1 BT4
# mkfs.ext2 -F /dev/sdb2

So now we have a usb thumbdrive with at least one 1 GB FAT32 partition on it.
The next step is to make it a bootable USB thumbdrive. There is a much easier way now. We are going to use the UNetbootin tool mentioned above. It is super easy to use. Just start UNetbootin, select the Backtrack 4 ISO, select the USB drive and click okay. You may get a warning that files exist on your USB drive. After making sure you picked the right one, tell it to go ahead and replace the files. It’ll chug along and before you know it you will have a bootable thumbdrive.
Persistent Changes

# cd /mnt/sdb2
# mkdir changes
Next we need to make some changes to how the system boots. Execute the following:
# cd /boot/syslinux
# chmod +Xx lilo
# chmod +Xx syslinux
Open syslinux.cfg with your favorite editor and make the following change. Note: I copied the boot definition I wanted to change and created a new entry so I would have a fall back option if something became broken. Again, I booted to KDE.
1. Find the line “LABEL BT4″.
2. Copy that line and next 3 and paste them right above the existing line.
3. Change the “LABEL BT4″ to something you want like “LABEL BT4-persist” and description to something like “MENU LABEL BT4 Beta – Console – Persistent”
4. Change the line that begins with APPEND in your copied section by adding “changes=/dev/sdb2″ immediately after “root=/dev/ram0 rw” where the x is the drive appropriate for your system. In my case it looks like this, “….root=/dev/ram0 rw changes=/dev/sdb2 rw”
5. Save your changes and exit the editor.
That should do it. Reboot and select the option you setup configured. To test it, create a file and reboot again. If your file is still there, everything is golden.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: