Subscribe to RSS Subscribe to Comments

My Little Ubuntu Guide

Ubuntu on USB Drive

Here’s a great how to I found www.pendrivelinux.com for installing linux to your USB

1. Download the Ubuntu 7.04 ISO and burn it to a CD
2. Reboot your computer into Ubuntu 7.04 from the Live CD
3. Insert a 1GB or larger USB flash drive
4. Open a terminal window and type the following:
Code:
sudo su
5. Type the following to list the available drives/partitions. Note which device is your flash drive (e.g. /dev/sdb). From now on replace x with your flash drive letter. So if your flash drive is sdb, replace x with b
Code:
fdisk -l
6. Now type each of the following in order:
umount /dev/sdx1
fdisk /dev/sdx
p
to show the existing partition and d to delete it
p again to show any remaining partitions (if partitions exist, d to delete them)
n to make a new partition
p for primary partition
1 to make this the first partition
hit enter to use the default 1st cylinder
+700M to set the partition size
a to make this partition active
1 to select partition 1
t to change the partition filesystem
6 to select the fat16 file system
n to make another new partition
p for primary partition
2 to make this the second partition
hit enter to use the default cylinder
hit enter again to use the default last cylinder
w to write the new partition table
7. Unmount the 1st partition:
Code:
umount /dev/sdx1
8. Format the first partition
Code:
mkfs.vfat -F 16 -n usb /dev/sdx1
9. Unmount the 2nd partition
Code:
umount /dev/sdx2
10. Format the second partition
Code:
mkfs.ext2 -b 4096 -L casper-rw /dev/sdx2
11. Remove and Re-insert your flash drive
12. Back at the terminal, type:
Code:
sudo apt-get install syslinux mtools
13. Now type:
Code:
syslinux -sf /dev/sdx1
14. Download this custom usyslinux.tar file using the archive manager and extract the syslinux.cfg file to your “USB” stick
15. Type:
Code:
cd /cdrom
16. Type:
Code:
cp -rf casper disctree dists install pics pool preseed .disk isolinux/* md5sum.txt README.diskdefines ubuntu.ico casper/vmlinuz casper/initrd.gz install/mt86plus /media/usb/
17. Reboot your computer and set your system BIOS to boot from USB-HDD or USB-ZIP. Also set the boot priority if necessary.

If everything has gone as it should, you should now be able to boot Ubuntu from the USB flash device and it should save your changes, restoring them on boot.

Notes: If your having trouble getting Ubuntu to boot, your memory stick may have a corrupted mbr. To repair the mbr of your USB device, at the terminal type sudo apt-get install lilo then type lilo -M /dev/sdx (replacing x with the letter of your flash device)

No comments yet. Be the first.

Leave a reply

You must be logged in to post a comment.

Based on FluidityTheme Redesigned by Kaushal Sheth Sponsored by Send Flowers