Sunday, October 26, 2008

Install Ubuntu Persistent on Flashdisk

After trying for a while time, download and installing many version of ubuntu, so working persistent on flash disk. I realize that the easiest way is to searching at google ^o^, since i asked many times in ubuntu's forum and i didn't get correct answer before. The main reason, I installing ubuntu on flash disk is i dont want to corrupt my hard disk, and i think flash disk is properly big enough to handle OS space enough.

Before to install Ubuntu on Flash disk, you need to check
  1. You need a Linux environment like Ubuntu installation on Hard Disk first, you can use vmware to do this, but dont try using Virtual PC, since it dont support USB yet.
  2. Established internet connection on installed Linux.
  3. Flash Disk with 1 GB Space or larger (more larger is more better since you can install more software later )

Here it is, how to install ubuntu on flash disk,
  1. Open a terminal and type sudo su
  2. As one line, type wget releases.ubuntu.com/releases/8.04/ubuntu-8.04.1-desktop-i386.iso
  3. Type mount -o loop -tiso9660 ubuntu*.iso /cdrom
  4. Type fdisk -l to list available drives/partitions (note which device is your flash drive I.E. /dev/sdb). Throughout this tutorial, replace all instances of x with your flash drive letter. For example, if your flash drive is sdb, replace x with b.
  5. Type umount /dev/sdx1
  6. Type fdisk /dev/sdx
    • type p to show the existing partition and d to delete it
    • type p again to show any remaining partitions (if partitions exist, repeat the previous step)
    • type n to make a new partition
    • type p for primary partition
      • type 1 to make this the first partition
      • hit enter to use the default 1st cylinder
      • type +750M to set the partition size
      • type a to make this partition active
      • type 1 to select partition 1
      • type t to change the partition filesystem
      • type 6 to select the fat16 file system
    • type n to make another new partition
    • type p for primary partition
      • type 2 to make this the second partition
      • hit enter to use the default cylinder
      • hit enter again to use the default last cylinder
      • type w to write the new partition table
  7. Type umount /dev/sdx1 to unmount the partition
  8. Type mkfs.vfat -F 16 -n ubuntu8 /dev/sdx1 to format the first partition
  9. Type umount /dev/sdx2 to ensure the partition is unmounted
  10. Type mkfs.ext2 -b 4096 -L casper-rw /dev/sdx2 to format the second partition
  11. Remove and re-insert your flash drive (if prompted that a new medium has been detected, select to open in a new window and click ok)
  12. Back at the terminal, type sudo apt-get install syslinux mtools
  13. Type syslinux -sf /dev/sdx1
  14. Type cd /cdrom
  15. Type cp -rfv casper dists install pics pool preseed .disk isolinux/* md5sum.txt README.diskdefines install/mt86plus /media/ubuntu8
  16. Type cd /media/ubuntu8
  17. Type wget pendrivelinux.com/downloads/u8/syslinux.cfg
  18. Type cd casper
  19. Type rm initrd.gz
  20. Type wget pendrivelinux.com/downloads/u8/initrd.gz
  21. Reboot your computer and set your system BIOS boot priority to boot from the USB stick.

You should be able to boot Ubuntu 8.04.1 from the memory stick and by default it should save your changes, restoring them on subsequent boots.

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)

And dont try to using with other version ubuntu or other's distro, it wont work properly.


Source : http://www. pendrivelinux.com/2008/05/15/usb-ubuntu-804-persistent-install-from-linux/

Related Posts by Categories



1 comments:

Eiger Yap said...

hmmm, i c i c...
it's very difficult, i never try it anyway, but maybe soetime i will test it,,,

btw do u have ubuntu 8.10?