How to boot Ubuntu Hardy Heron from a USB drive and have it save your changes!

Discussion in 'Linux' started by simonrichards150, May 8, 2008.

  1. simonrichards150

    simonrichards150 New Member

    Joined:
    Oct 29, 2007
    Messages:
    2,058
    Likes Received:
    94
    Device:
    iPod touch
    [How-To] Boot Ubuntu Hardy Heron from a USB drive and have it save your changes!

    This tutorial is for booting Ubuntu from a USB drive.

    Disclaimer:
    I am not responsible for any damage you may do to anything in any way.


    Ingredients:

    1. USB Flash drive (min 1GB)
    2. Ubuntu 8.04 Live CD
    3. Computer capable of booting from USB

    Also, while you should be able to just follow this guide from beginning to end, its better if you have some experience with command line, linux device listing etc before attempting this.

    I am using a Sandisk Cruzer Micro 2GB & Ubuntu 8.04

    Please Register or Log in to view images



    Step 1.1:

    Obtain the Ubuntu Live CD image from ubuntu.com

    http://www.ubuntu.com/getubuntu/download

    Step 1.2:

    Burn the CD and boot from it.

    If you already have an ubuntu installation, just boot into that. You will still need the Live CD.

    Step 2:

    BACKUP ALL THE DATA FROM YOUR USB DRIVE

    Boot into Ubuntu (if you haven't already).

    In Ubuntu, enter the 'Applications' menu, and open 'Accessories', and select 'Terminal'.

    Type "sudo -i"

    Type "fdisk -l"

    Identify which device is your flash drive and make a note of it. It will be something like /dev/sdb1.

    Here, mine is identified as /dev/sdb1 & /dev/sdb2

    Please Register or Log in to view images



    You will need to replace the sdb part with whatever yours shows up as, it will be sdx from now on, replace the x with the letter you are shown.

    Step 3:

    Type "fdisk /dev/sdx"

    Type "p" to show the partition on the disk, and type "d" to delete it.
    Repeat if you have any other partitions on the disk.

    Type "n" to make a new partition.

    Type "p" for primary partition.

    Type "1" to make it the first partition.

    Press Enter to use the default start cylinder.

    Type "+755M" to set the partition size.

    Type "a" to make the partition active.

    Type "1" to select partition 1.

    Type "t" to change the partition filesystem.

    Type "6" to select the Fat16 filesystem.

    Type "n" to make another new partition.

    Type "p" for primary partition.

    Type "2" to make it the second partition.

    Press Enter to use the default start cylinder.

    Press Enter again to use the default last cylinder.

    Type "w" to write the changes to the disk.

    Step 4:

    Type "umount /dev/sdx1", then "umount /dev/sdx2".

    Type "mkfs.vfat -F 16 -n Ubuntu /dev/sdx1". This formats the first partition.

    Type "mkfs.ext2 -b 4096 -L casper-rw /dev/sdx2", to format the second partition.

    Exit Terminal, then unplug your USB drive.

    Step 5:

    Insert the USB drive again.

    Open Terminal.

    Type "sudo -i"

    Type "apt-get update"

    Type "apt-get install mtools syslinux"

    Type "syslinux -sf /dev/sdx1"

    Type "cd /cdrom"

    Type "cp -rf casper disctree dists install pics pool preseed .disk isolinux/* md5sum.txt README.diskdefines ubuntu.ico casper/vmlinuz casper/initrd.gz /media/Ubuntu/".

    Go to the first partition of the USB drive and delete isolinux.cfg.

    Place this file in the first partition:

    http://[PIRACY.rs].com/files/113739245/syslinux.cfg.html
    (download)

    Replace "initrd.gz" in the first partition with this one:

    http://www.[PIRACY.mu].com/?d=ZVC28QL7
    http://[PIRACY.rs].com/files/113566398/initrd.gz.html
    (download and replace)

    You're done!

    Now boot from your USB drive and enjoy!

    Select "Start Ubuntu in persistent mode" so that it saves your changes!

    Couple of screenshots:

    Please Register or Log in to view images


    Please Register or Log in to view images



    I got my theme from here:
    http://kims-area.com/?q=node/25

    And my wallpaper from here:
    https://wiki.ubuntu.com/Artwork/Incoming/Hardy/Alternate/Dark_Herdy_Wallpaper

    If you have any problems just post here and ill help!
  2. YouTouch

    YouTouch New Member

    Joined:
    Mar 18, 2008
    Messages:
    263
    Likes Received:
    25
    Device:
    iPod touch
    Will this wreak or destroy memory on your flash drive?
  3. simonrichards150

    simonrichards150 New Member

    Joined:
    Oct 29, 2007
    Messages:
    2,058
    Likes Received:
    94
    Device:
    iPod touch
    Absolutely not. You can just format the flash drive back to the way it was!

    Please Register or Log in to view images

  4. YouTouch

    YouTouch New Member

    Joined:
    Mar 18, 2008
    Messages:
    263
    Likes Received:
    25
    Device:
    iPod touch
    and how would this be done?
  5. simonrichards150

    simonrichards150 New Member

    Joined:
    Oct 29, 2007
    Messages:
    2,058
    Likes Received:
    94
    Device:
    iPod touch
    Well, assuming you had only one partition, using up all the space on the drive, then you would do this:

    open terminal

    type sudo -i

    type fdisk -l to find out what letter to use in the place of x

    type fdisk /dev/sdx (replacing x with whatever letter you need to)

    type p to list the partitions

    type d then 1 to delete the first partition

    that might delete both, find out by typing p again. if it has no partitions then go to the next instruction but if the other partition is still listed type d again to delete it.

    type n to create a new partition

    type p

    type 1

    hit enter twice

    type t

    type 6

    type w to write the changes to disk

    type umount /dev/sdx1

    type mkfs.vfat -F 16 -n Disk /dev/sdx1 (where Disk is the label)

    And thats it!
  6. Teslanaut

    Teslanaut Well-Known Member

    Joined:
    Sep 16, 2007
    Messages:
    15,588
    Likes Received:
    177
    Device:
    4G iPod touch
    Why not just use Fedora 9? It installs much easier

    Please Register or Log in to view images

  7. simonrichards150

    simonrichards150 New Member

    Joined:
    Oct 29, 2007
    Messages:
    2,058
    Likes Received:
    94
    Device:
    iPod touch
    People like ubuntu

    Please Register or Log in to view images



    And the damn fedora usb maker thing didnt work for me (in windows). So meh.

    Please Register or Log in to view images

  8. Abcmsaj

    Abcmsaj Retired Moderator

    Joined:
    Jan 26, 2008
    Messages:
    5,501
    Likes Received:
    122
    Device:
    iPhone 6 Plus
    Can't balls up my computer if I boot from CD can it?
    I've always wanted to try Linux..
  9. simonrichards150

    simonrichards150 New Member

    Joined:
    Oct 29, 2007
    Messages:
    2,058
    Likes Received:
    94
    Device:
    iPod touch
    If it's a live CD then it doesnt do any harm whatsoever

    Please Register or Log in to view images

  10. Abcmsaj

    Abcmsaj Retired Moderator

    Joined:
    Jan 26, 2008
    Messages:
    5,501
    Likes Received:
    122
    Device:
    iPhone 6 Plus
    Wahooo.
    Which version?
    Desktop or System?

Share This Page