Posted by: richlyn | January 7, 2009

Persistent pendrive ubuntu installation

The following tutorial covers the process of installing Ubuntu 8.10 to a USB flash drive, thumb drive or portable external hard drive using the now included and built in USB Installer “USB Startup Disk”. Installing with this method allows the use of the persistence feature (via a persistence loop file, FINALLY) to save and restore your changes on subsequent boots.
USB Ubuntu 8.10 installation essentials
• Working CD Drive and an Ubuntu 8.10 CD
• USB flash drive or external USB hard drive
Install Ubuntu to USB via the USB Startup Disk:
1. Download the Ubuntu 8.10 ISO and burn it to a CD
2. Restart your computer, booting from the Live CD
3. Insert a 1GB or larger USB flash drive
4. Navigate to System > Administration > Create a USB startup disk:clip_image001

5. Next, (1) Select the USB disk to use, (2) Select the option Stored in reserved extra space and adjust the sider to set capacity to use, (3) Click the Make Startup Disk button:

clip_image002

 

 

 

 

 

 

 

 

 

 

 

 

  
6. A progress bar will indicate the progress of your USB Ubuntu installation:

clip_image003

 

 

 

 

7. Once the installation is complete, simply remove the CD, restart your computer and set your boot menu or BIOS to boot from the USB device
If all goes well, you should now be booting from Ubuntu 8.10 on your USB flash drive, automatically saving changes you make to the casper-rw loop file as you go.


Responses

  1. ==== How to create a Live USB with personal files easily usable by Ubuntu, Windows XP, … ====

    I’ll do it with this example:

    32-bit computer (desktop -or laptop-, not netbook)
    USB flash drive of 4 GB
    Persistence option desired (casper-rw file will exist for that)
    Personal files will take up more than half of the memory or space

    1. Download the required ISO file: http://www.ubuntu.com/desktop/get-ubuntu/download (and choose and click) or ftp://swtsrv.informatik.uni-mannheim…sktop-i386.iso (or from other country ….)
    2. Plug the USB flash drive
    3. Copy the files you want to keep to another drive
    4. Hold Alt key and press F2 . Type gnome-terminal and press Enter
    5. Type sudo bash and press Enter. Enter your password
    6. Type ls /dev/disk/by-id/*usb* -l and press Enter . At the end of the first line there should be something like sdb or sdc or sdd … In my case sdb
    7. Type fdisk -l and press Enter . After /dev/sdb I see /dev/sdb1 (there is only 1 partition; no divisions in my USB flash drive)
    8. Type umount /dev/sdb1 and press Enter
    9. Type fdisk /dev/sdb and press Enter
    10. Type m and press Enter to see the options
    11. Type p and press Enter to see the partitions (in my case /dev/sdb1 )
    12. Type d and press Enter (fdisk selects the only partition I have)
    13. Type p and press Enter (now there is no partition so no /dev/sdb1 is shown)
    14. Type n and press Enter then p and Enter then 1 (number of partition) and Enter then Enter (to use the default beginning: 1) then 600 (something more than the half) and Enter
    15. Type p and press Enter. I see /dev/sdb1 with Id of 83 (Linux file system)
    16. We want change it to FAT32: Type l and press Enter . We see that c is our option (W95 FAT32 (LBA) file system)
    17. We change it: Type t and press Enter (it selects the only partition up to now). Type c and press Enter
    18. Type p and press Enter . We see Id of c (W95 FAT32 (LBA) file system)
    19. Type n and press Enter then p and Enter then 2 and Enter then Enter (to use the default: just after first partition) then Enter (to use the default: all the free space, to the end)
    20. Type p and press Enter . We see also /dev/sdb2 . With Id of 83
    21. Type t and press Enter then 2 and Enter then c and Enter
    22. Type p and press Enter . We see Id of c bor both
    23. Type w and press Enter. Changes are written on disk
    24. Type fdisk -l and press Enter . Now we see the 2 partitions.
    25. Now we format the first one: type mkfs.vfat /dev/sdb1 and press Enter
    26. Now we format the second one: type mkfs.vfat /dev/sdb2 and press Enter
    27. Close the terminal or console
    28. Hold Alt key and press F2 . Type gnome-control-center and press Enter
    29. Click on USB Startup Disk Creator (under Hardware)
    30. Click on the button named Other.. (up-right) and choose and open the downloaded ISO file
    31. Under Disk to use click on /dev/sdb2
    32. Down, select Stored in reserved extra space
    33. Move the How much button almost to the limit. In my case the limit is 876.0 MB but I put it in 851.0 (just in case I need to modify some file of booting, …)
    34. Click on the button Make Startup Disk
    35. When it finishes click on Exit

    FINISHED !!!

    Now if we open the terminal and we use fdisk -l we see that there is a * for Boot in /dev/sdb2 . So the second partition is bootable (where Ubuntu GNU/Linux, the operating system, is located)

    To see this working reboot the computer and press the key stated by the BIOS to go to the boot menu (F12, F11, …, then use the arrows to select the USB flash drive and then press Enter). If no boot menu, go to the BIOS main menu (with F2 or Del …), then to boot options ….

    The first time in the middle of the boot we have to choose the language and click on Try Ubuntu v 10.04.1 LTS

    If we click on Places menu and then on 2.4 GB Filesystem the first partition is mounted and the Nautilus File Browser opens there. We can copy, create, delete, edit, open … our personal files: songs, photos, videos, documents …

    If the USB flash drive is inserted in a PC running old and limited operating systems like Windows XP we still can use our personal files !!

    ENJOY !!!

    NB: If you only have 1 FAT32 (usual in USB flash drives) partition in your Live USB and make casper-rw not to take up all the free space of the Ubuntu files you can also use the remaining space for your personal files, both from the Ubuntu of the Live USB, from an installed (in a hard drive) Ubuntu, Windows XP, … But they are mixed with the OS files (there is risk to delete them) and if you boot from the Live USB the personal files have to be in a not-easy-to-reach place of the file system and you have to be root to manage them …. (if I remember well)

    NB2: The proposed method separates the files of the operating system from the personal data. This way they are better organized and safer: for example Windows XP can only access to the personal files’ partition.

  2. To make it easy and have always the option to choose the boot mode (including fresh), in Live USBs created with the USB Startup Disk Creator of Ubuntu:

    Inside the Live USB’s syslinux folder the file syslinux.cfg has to be edited:

    Delete all the content and put this code:

    Code:

    prompt 1
    timeout 50
    default 1
    say –
    say Enter the number of the desired option
    say ————————————–
    say –
    label 1
    say 1 Try Ubuntu without installing
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash —
    label 2
    say 2 Try Ubuntu without installing and fresh
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash —
    label 3
    say 3 Install Ubuntu
    kernel /casper/vmlinuz
    append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash —
    label 4
    say 4 Check disc for defects
    kernel /casper/vmlinuz
    append noprompt boot=casper integrity-check initrd=/casper/initrd.lz quiet splash —
    label 5
    say 5 Test memory
    kernel /install/mt86plus
    label 6
    say 6 Boot from first hard disk
    localboot 0x80

    Enjoy!

    NB: I think that fresh boot is faster. It’s logical, because no personal configurations, etc. have no be loaded (they are in the casper-rw file).


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

Categories

%d bloggers like this: