Announcement

Collapse
No announcement yet.

Build a LIVE Kubuntu Flash Drive, How-To

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Build a LIVE Kubuntu Flash Drive, How-To

    Building a Live Kubuntu Flash Drive, with Persistence

    *** The topics of this thread have been reorganized 8 February 2009 ***
    *** The following TOC applies now ***
    *** It includes the major how-to posts originally posted by me in this thread ***

    TABLE of CONTENTS

    First post--this post

    Kubuntu 8.10 Intrepid Ibex KDE 4 ** Major Edit on 12-26-08 **
    Live Flash Drive with Persistence - - - Complete & Simplified
    (using GRUB as the bootloader; no Syslinux)

    includes:
    -- Using iso files to get Kubuntu and GRUB (without burning a live CD)
    -- Working in GUI or CLI
    -- Cloning your finished flash drive


    Reply #1: usb-creator program (8.04 & 8.10)
    This package automatically creates a Live persistent Kubuntu flash drive.
    Starts with your Kubuntu iso downloaded file.
    > Thanks to toad for bringing this to our attention.


    Reply #3: History – Sequence of past how-to's

    ----- Building a Live Kubuntu Flash Drive for Gutsy 7.10
    It is not persistent. It uses GRUB to chainload Syslinux.
    Though dated, some of you may find it useful or interesting:
    It shows how to boot (by chainloading) Syslinux, and has some good command-line techniques.

    ----- Live Kubuntu 7.10 + Live Ubuntu 7.10 on a 2GB flash drive
    It is not persistent.. It uses GRUB to chainload Syslinux.

    ----- Live Kubuntu 7.10 flash drive WITH PERSISTENCE
    using GRUB all the way (i.e., no chainload to Syslinux)

    ----- Kubuntu HH 8.04 on Live Persistent Flash Drive
    using GRUB (no Syslinux)
    Bug fix: It addresses a well-known bug at the time
    “[hardy] livecd: keyword "persistent" results in busybox and (initramfs)”

    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

    Kubuntu 8.10 Intrepid Ibex KDE 4 ** Major Edit on 12-26-08 **
    Live Flash Drive with Persistence - - - Complete & Simplified
    (using GRUB as the bootloader)

    includes:
    -- Using iso files to get Kubuntu and GRUB (without burning a live CD)
    -- Working in GUI or CLI
    -- Cloning your finished flash drive

    -- Persistence means that your (personal) user configuration settings and data are saved to the flash drive and thus are available next time you run your LIVE Kubuntu from the flash drive. Nothing is written to any other drives in your system (unless you do so intentionally).
    -- BIOS: Your BIOS must support "Boot from USB.”
    -- Flash Drive: 2 GB (or larger)
    You may be able to do this--tightly perhaps--with a 1 GB flash drive.
    -- CAUTION Device naming!!!
    The example here uses a flash drive that is seen as /dev/sdc in Kubuntu and as hd2 in GRUB.
    >>> Yours may be different! See Step 1.


    Choices: Working with live CDs and Working at GUI or CLI.

    > You need Live Kubuntu CD files. Two choices:
    Get them from a burned Live Kubuntu CD.
    Get them from the downloaded iso file (without burning a CD).
    > You need GRUB files to put on the flash drive. Three choices:
    Get them from your regular Kubuntu operating system /boot/grub directory.
    Get them from a Live CD that has them (like Super Grub Disk).
    Get them from a downloaded iso file (without burning a CD).
    > You can do this work in GUI or CLI (at Konsole) or combinations thereof.
    We'll assume you are working in your regular Kubuntu operating system.
    (Actually, you could also do this work from any Live Linux CD.)

    GUI: Working with root privileges (working “as root”)
    Open Konqueror (Dolphin) as root:
    kdesudo konqueror
    kdesudo dolphin

    Syslinux, tech note: If you use Syslinux, not GRUB, then you'll be able to get those files from the Kubuntu Live CD or iso. GRUB files you have to fetch from elsewhere.

    First, preparation:
    -- Get what you need ready -- Read the list of Choices above, decide how you wish to do it, and get what you need ready to go.
    -- Now, boot into your regular Kubuntu operating system, where you will do this work.



    STEP 1 Flash drive Prepare the flash drive: partition, format, boot flag, two labels

    Very Important:
    Mounting the flash drive: /dev/sdc1 mounted as /media/kubuntu810
    If you have trouble mounting the flash drive in GUI, see the first Troubleshooting note at the end.
    => We will assume that partition 1 of the flash drive is /dev/sdc1 mounted as /media/kubuntu810. Thus, the directory kubuntu810 exists (or has been created) in the /media directory.

    Find out what your flash drive is named. Plug in your flash drive to a USB port on your PC.
    Open K > Applications > System > Terminal (Konsole)
    Type these commands:
    sudo fdisk -lu
    sudo grub
    grub> geometry (hd<Press the Tab key now>
    Then you can do:
    grub>geometry (hd0)
    grub>geometry (hd1)
    grub>geometry (hd2), etc.
    Study this output. Example: In my system, the flash drive is sdc = hd2.

    Partition and format the flash drive. The end result should be this:
    Partition 1, for Kubuntu: sdc1, ext3, 850 MB, set boot flag, set label: kubuntu810
    Partition 2, for the “persistence partition,” sdc2, ext3, 1 GB, set label: casper-rw

    >>> Wear-out? If you are concerned about flash drive wear-out, you may format the partitions ext2 rather than ext3. I have no hard empirical evidence on wear-out, either way. => google it.

    To be done, as follows:
    Two choices: Use GParted Live CD; or do the work in Kubuntu 8.10: install gparted using K > Applications > System > Package Manager (Adept)).
    In GParted:
    Highlight a partition, Partition (tab at top), Flags > Boot, and Label > [type the label].

    Casper-rw: The casper-rw partition is important. It's the label you need so your Live Kubuntu flash drive recognizes the persistent partition as the one to use to save your data/settings/configurations.

    Labels from GParted Live CD
    Use a newer version: gparted-livecd-0.39-13.iso, 11/28/08 or later
    Labels at Konsole--Another way to set Labels:
    sudo e2label /dev/sdc1 kubuntu810
    sudo e2label /dev/sdc2 casper-rw


    STEP 2 GRUB work -- do this any way you want:
    (1) Install GRUB files to kubuntu810 in a directory called /boot/grub;
    (2) Install GRUB to the MBR of the flash drive;
    (3) Build the boot menu /boot/grub/menu.lst (in kubuntu810).

    (1) Install GRUB files to kubuntu810 in a directory called /boot/grub.
    Three choices:
    Get GRUB files from your regular Kubuntu operating system /boot/grub directory; or from a Live CD that has them (like Super Grub Disk); or from a downloaded iso file (without burning a CD). For each choice, you may do the work in GUI (Konqueror/Dolphin) or CLI (Konsole).

    > Get GRUB files from your regular Kubuntu operating system /boot/grub directory.

    GUI:
    First, create /boot in kubuntu810: In your regular Kubuntu OS, open your file manager as root, open the partition kubuntu810, create a new folder called boot (right-click in an open area, Create New Folder, and give it the name boot).
    In your file manager (still open as root), navigate to your regular Kubuntu OS /boot directory, open boot, right-click on the folder called grub, Copy [to] (CAUTION: Use Copy; do NOT use Move!!!). Then browse to and select the partition kubuntu810 of the flash drive, then to the directory /boot (that you just created), and select the boot directory (Here). So now you have set up /boot/grub on partition 1 (= kubuntu810) of the flash drive. (You may keep your file manager open.)
    Next: proceed to (2) Install (setup) GRUB to the MBR of the flash drive.

    CLI:
    sudo mkdir /media/kubuntu810/boot
    sudo cp -r /boot/grub /media/kubuntu810/boot
    That will build /media/kubuntu810/boot/grub (and containing all the files in grub).
    Next: proceed to (2) Install (setup) GRUB to the MBR of the flash drive.

    > Get GRUB files from a Live CD that has them (like Super Grub Disk--SGD).
    Let's assume you use a SGD live CD. Put the SGD CD in the CD tray, wait for Kubuntu to recognize it, then Open it. The GRUB files are at /boot/grub on the CD. Assume the CD is mounted as /media/cdrom0.
    GUI:
    Open Konqueror/Dolphin as root, create /boot/grub on partition 1 (= kubuntu810) of the flash drive, copy the grub directory & files from /media/cdrom0/boot/grub into /media/kubuntu810/boot/.
    Next: proceed to (2) Install (setup) GRUB to the MBR of the flash drive.
    CLI:
    sudo mkdir /media/kubuntu810/boot
    sudo cp -r /media/cdrom0/boot/grub /media/kubuntu810/boot
    Next: proceed to (2) Install (setup) GRUB to the MBR of the flash drive.

    > Get GRUB files from a downloaded iso file (without burning a CD).
    We will use a quick download (4.4 MB) of Super Grub Disk -- The CD ROM 0.9774 from here:
    http://forjamari.linex.org/frs/?group_id=61
    We download super_grub_disk_0.9774.iso to the Desktop folder, then mount it as follows:
    sudo mkdir /media/SGDfiles
    sudo mount -t iso9660 -o loop /home/mike/Desktop/super_grub_disk_0.9774.iso /media/SGDfiles
    cd /media/SGDfiles
    ls
    and you will see a boot directory;
    cd boot
    and you will see a grub directory
    cd grub
    and you will see the grub files.

    Copy the GRUB files from SGD iso file /boot/grub into the flash drive partition /media/kubuntu810/boot/grub.
    Two choices:
    GUI:
    Open Konqueror/Dolphin as root, create /boot/grub on partition 1 (= /media/kubuntu810) of the flash drive, copy the grub files from /media/SGDfiles/boot/grub into /media/kubuntu810/boot/grub.
    Next: proceed to (2) Install (setup) GRUB to the MBR of the flash drive.
    CLI:
    sudo mkdir /media/kubuntu810/boot
    sudo cp -r /media/SGDfiles/boot/grub /media/kubuntu810/boot
    That will build /media/kubuntu810/boot/grub.
    Next: proceed to (2) Install (setup) GRUB to the MBR of the flash drive.

    (2) Install (setup) GRUB to the MBR of the flash drive.

    Open Konsole, type sudo grub, at the GRUB prompt type these commands:
    grub> root (hd2,0) # CAUTION: Use YOUR device name instead of hd2!!!
    grub> setup (hd2) # CAUTION: Use YOUR device name instead of hd2!!!
    grub> quit
    $exit

    This sets up GRUB in the MBR of the flash drive using the GRUB files in partition 1 of the flash drive.

    (3) Build the boot menu, /boot/grub/menu.lst.

    With your file manager open as root, in the flash drive partition 1 (/media/kubuntu810) open /boot/grub/menu.lst.
    Delete everything in menu.lst; type or copy exactly the following into your menu.lst.

    # Kubuntu 8.10 Live Flash Drive GRUB boot menu.
    # Includes Persistent option, and other Live options, including Install.
    #
    timeout = 5 # you can make it any number of seconds
    default = 0 # Makes the Persistent option the default OS to boot

    title Kubuntu 8.10 LIVE Persistent
    root (hd0,0)
    kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw quiet splash persistent
    initrd /casper/initrd.gz

    title Kubuntu 8.10 LIVE -- Start or Install
    root (hd0,0)
    kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw quiet splash
    initrd /casper/initrd.gz


    title Safe Graphics mode -- xforcevesa
    root (hd0,0)
    kernel /casper/vmlinuz boot=casper xforcevesa ramdisk_size=1048576 root=/dev/ram rw
    initrd /casper/initrd.gz

    title Install with driver update CD -- driver updates
    root (hd0,0)
    kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw debian-installer/driver-update=true quiet splash --
    initrd /casper/initrd.gz

    title OEM install (for manufacturers)
    root (hd0,0)
    kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw oem-config/enable=true quiet splash --
    initrd /casper/initrd.gz

    title Check CD for defects
    root (hd0,0)
    kernel /casper/vmlinuz boot=casper integrity-check quiet splash --
    initrd /casper/initrd.gz

    title Memtest
    root (hd0,0)
    kernel /install/mt86plus

    title Re-boot the PC
    reboot

    # End of menu.lst

    Finish with File > Save, File > Quit.
    You may keep your file manager open.


    >>>LIVE Kubuntu 8.10 As you can see from the menu.lst, when using this flash drive, you have the option of running it without the persistent capability; that is, you can run it as a straight Live Kubuntu 8.10 OS and it will not save anything to casper-rw. You can use it that way to install Kubuntu 8.10 to an internal/external hard drive or to another USB flash drive, or ....
    Cloning your flash drive: Another option is simply to clone your flash drive--see the brief how-to at the end of this post.


    STEP 3 Copy the Live Kubuntu files into the first partition (kubuntu810) of the flash drive.
    Two choices:
    Two choices: Get Live Kubuntu files from your Live Kubuntu CD; or from the downloaded iso file (without burning a CD).

    > Get Live Kubuntu files from your Live Kubuntu CD
    GUI:
    Insert your Kubuntu Live CD into the PC, wait for it to be recognized.
    With your file manager open as root, navigate to the CD, open it to see the folders and files on the CD, click View > Show hidden files, Edit > Select All, Edit > Copy [to], browse and navigate to the flash drive partition /media/kubuntu810, highlight the partition kubuntu810, and accept that choice (Here/OK).
    Next: proceed to Step 4: You are done, test it.
    CLI:
    Assume the CD is mounted as /media/cdrom0.
    sudo cp -RT /media/cdrom0/ /media/kubuntu810
    That copies the CD files to the first partition of the flash drive. See Technical Note.
    (It copies the contents of the CD, NOT the folder called cdrom0.
    The -RT option ensures that the copy is recursive and all HIDDEN files AND folders are copied, including hidden files and folders.)
    Next: proceed to Step 4: You are done, test it.

    Technical Note
    Another way at CLI is:
    shopt -s dotglob
    sudo cp -r /media/cdrom0/* /media/kubuntu810
    => This ensures that the * includes all HIDDEN folders and files.
    Or, simply include the line
    shopt -s dotglob
    in your file ~/.bashrc.

    > Get Live Kubuntu files from the downloaded iso file (without burning a CD)

    Suppose you downloaded the Live Kubuntu CD files and the iso file name is: kubuntu-8.10-desktop-i386.iso and suppose it's in the Desktop folder: /home/mike/Desktop/ kubuntu-8.10-desktop-i386.iso. Mount this iso as follows:

    mkdir /media/CDfiles
    sudo mount -t iso9660 -o loop /home/mike/Desktop/kubuntu-8.10-desktop-i386.iso /media/CDfiles

    You can change directories (cd /media/CDfiles) and list (ls -a) the files to see what's there.
    Now, you have two choices:

    GUI:
    Open Konqueror/Dolphin as root, navigate to the /media/CDfiles, View > Show hidden files, and copy all the Kubuntu files from /media/CDfiles into /media/kubuntu810
    Next: proceed to Step 4: You are done, test it.
    CLI:
    sudo cp -RT /media/CDfiles/ /media/kubuntu810
    That copies the CD files to the first partition of the flash drive. See Technical Note.
    (It copies the contents of the CD, NOT the folder called CDfiles.
    The -RT option ensures that the copy is recursive and all HIDDEN files AND folders are copied, including hidden files and folders.)

    Next: proceed to Step 4: You are done, test it.

    Technical Note
    Another way at CLI is:
    shopt -s dotglob
    sudo cp -r /media/CDfiles/* /media/kubuntu810
    => This ensures that the * includes all HIDDEN folders and files.
    Or, simply include the line
    shopt -s dotglob
    in your file ~/.bashrc.

    STEP 4 You are done!
    Remove CDs (right-click > eject) and unmount (command: “umount”) the flash drive:
    sudo umount /dev/sdc1 /media/kubuntu810
    (Just in case casper-rw is mounted, too, do: sudo umount /dev/sdc2)
    Re-boot your PC to test it.
    Upon re-booting, you may have to enter BIOS to ensure it is set to boot from the USB flash drive.


    TESTING PERSISTENCE
    In your live persistent session, save things and configure things and re-boot to see if they are saved/configured. Examples: Create a widget; create test files saved to /home and Desktop; browse with Konqueror and add a bookmark; set up Konsole on the Panel (right-click on Konsole to do so); install something in your flash drive (e.g., gparted, or Firefox, or Thunderbird); and so on. Then, later,
    back in your regular Kubuntu, connect your flash drive, open the casper-rw partition, and have a look at it. You'll see all the many files that are saved there.


    = = = = = = = = = =

    WHAT TO EXPECT

    My experience has been very good thus far. As the expression goes YMMV--Your Mileage May Vary! Some things may work perfectly, some may not work at all (e.g., the clock setting on mine is not persistent). Be patient!

    BACK-UPs Remember, if you wish, while in a Live Kubuntu session, you may backup any of your work to a second data flash drive connected to your PC; or mount an internal/external hard drive and save data to a folder there.


    = = = = = = = = = =

    Troubleshooting Tips

    ----- If you get a Busybox prompt, it may be because you did not copy HIDDEN folders from the Live Kubuntu CD or the downloaded iso file; specifically, /.disk .
    ----- Mounting the flash drive partition sdc1 (= kubuntu810) using Konsole at CLI.
    To mount the first flash drive partition kubuntu810 at CLI:
    Make a mount point, then mount the flash drive partition on it:
    sudo mkdir /media/kubuntu810
    sudo mount /dev/sdc1 /media/kubuntu810

    ----- See the first post of this thread for notes and tips on the following:
    Technical note about USB drive shifting; GUI Logistics & tips; Buggy-ness in BIOS & Kubuntu.

    ----- Slow to start up:
    Flashing cursor “-” upper left after re-booting using the Live flash drive: be patient, it may take from 30 seconds to 2 minutes before you see the message “Starting up...” On mine, after the Kubuntu progress bar finished, I saw the KDE 4.1 screen briefly, then the screen went blank for quite some time (1-2 minutes). Then, everything was OK--the Desktop came up. On the second and third re-boots, though, things went faster, smoother, and generally better (I'm not sure why that would be true unless casper-rw config/settings help us out there).

    ----- Black screen after the Kubuntu progress bar completes but you expect to see the Desktop loaded: It could be an X/kde/kdm display manager thing. Try simply pressing the space bar or moving the
    mouse, and wait a few seconds.

    ----- Your menu.lst doesn't seem to work when you select an entry from the boot menu you see on your screen after re-booting, or you get GRUB Error 15 or some such. Go into your regular Kubuntu, access the flash drive, open menu.lst as root, and try re-typing by hand the boot entry (i.e., do not copy it).

    ----- Is the Live CD good? For example, download the Kubuntu Live CD: kubuntu-8.10-desktop-i386.iso. Make sure it is good: Burn the Live CD using K3b. Check the md5sum; run the CD, select “Check CD for defects,” then test run the Live CD.

    ----- When all else fails, you can always re-boot (even by a manual re-boot by pressing the Reset button on your PC).

    ----- WHEN ALL ELSE REALLY FAILS Hey, it's part of the game: Do it again! If you are having strange, insurmountable problems, you may reformat the casper-rw partition and start over, and/or re-do the entire project. When you get into this work, you'll find it doesn't really take very long from start to finish, perhaps just 10-20 minutes.

    ----- Wearout: Flash drive wearout.
    If you are concerned about that, you may format the flash drive (both partitions) as ext2 rather than ext3. To learn more about it, see my notes elsewhere on this forum (search for wearout) and google search it.

    = = = = = = = = = =

    Cloning your bootable flash drive

    Cloning a (bootable) Kubuntu 8.10 Live persistent USB flash drive.
    Caution: Use YOUR own device names; sdc & sdd are used for example only.

    Source:
    sdc 2 GB flash drive, ext3, (GRUB-bootable) Live Persistent Kubuntu 8.10
    Two ext3 partitions: sdc1 = kubuntu810, sdc2 = casper-rw (the persistent partition)

    Target:
    sdd 2 GB flash drive, FAT32, empty

    Here it is:
    dd if=/dev/sdc of=/dev/sdd bs=4096 conv=notrunc,noerror
    492671+1 records in
    492671+1 records out
    2017984000 bytes (2.0 GB) copied, 425.104 seconds, 4.7 MB/s

    The dd copies everything--including GRUB bootloader, MBR, the two source partitions, and the ext3 formatted filesystems. Your clone is ready to boot.

    (See the Reference below: dd Command)

    = = = = = = = = = =

    THANKS to the following for their tips, suggestions, corrections:
    JohanLingen
    Kubicle

    References

    -- How To Make GRUB Thumb Drive (and the posts under that thread)
    http://kubuntuforums.net/forums/inde...opic=3081748.0
    -- How To GRUB Methods - Toolkit
    http://kubuntuforums.net/forums/inde...opic=3081671.0
    --dd Command (see Reply #1 for cloning & other applications)
    http://kubuntuforums.net/forums/inde...opic=3090824.0
    -- GParted: http://gparted.sourceforge.net/
    -- GParted how-to: http://www.howtoforge.com/partitioning_with_gparted
    -- Tuxfiles: http://www.tuxfiles.org/
    (permissions, ownership, commands, file and folders, Linux file system, mounting, and more)
    Commands at Konsole: Beginners
    http://kubuntuforums.net/forums/inde...opic=3091607.0
    (permissions/ownership for flash drives: see Reply #1)




    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    #2
    Re: Build a LIVE Kubuntu Flash Drive, How-To

    usb-creator program

    usb-creator program (8.04 & 8.10)
    This package automatically creates a Live persistent Kubuntu flash drive.
    Starts with your Kubuntu iso downloaded file.


    This package works to create a Live, persistent or non-persistent Ubuntu (and variants) USB flash drive.

    The package is available in the 8.10 repos.
    EDIT added*********
    usb-creator now available for 8.04, too. https://launchpad.net/~evand/+archive

    However, the disk preparation is absolutely critical. See Troubleshooting below.

    => THANKS to toad for bringing this to my and to our attention at the forum here, and for his help on some edits.


    USB-creator program: Getting it and running it

    Install it using Adept Package Manager.
    Then, open it at
    K > Applications > System > Create a USB Startup Disk

    Running usb-creator

    Source disk image: Specify an iso file.
    Click Other and navigate to an iso file of your Kubuntu; for example, kubuntu-8.10-desktop-i386.iso.
    Highlight the iso file you wish to use, and click the Open button at lower right.

    USB disk to use:
    Plug a flash drive into your PC and see if it is detected by usb-creator.
    If not, leave the flash drive plugged in, Quit usb-creator, open usb-creator, and see if the flash drive is detected (it should be this time).

    If there is not enough space on the flash drive, you will be informed.
    If the flash disk needs to be formatted, you will be given that option.

    Persistence:
    When starting up from this disk, documents and settings will be
    Stored
    or
    Discarded

    If you want persistence, click the Stored circle.
    Then specify
    How much space by using the slider (in MB).
    (Example: On my 2 GB flash drive, I gave it 750 MB. You might study how the program works and be able to increase that size to as much as (approximately) 1.25 GB (= 2 GB minus 750 MB for Kubuntu OS).)

    Finally, click “Make Startup Disk” button at lower right.

    It will take awhile, perhaps 10 minutes on a 2 GB flash drive, and you will be informed of its progress, down to “Creating persistence file,” and “Making persistence filesystem.”
    Finally, you will be given a message “Installation is Complete. You may re-boot your PC to boot using the USB thumb drive.”


    Result and testing persistence
    You will see a message about the Syslinux booting.
    You will see a Kubuntu progress screen, and a KDE panel of icons loading.
    Then the screen MAY go blank for a long time (perhaps 2 minutes, plus or minus).
    Then Kubuntu Desktop shows up.

    => I am noticing that upon a second and a third re-booting, the booting speeds up and goes more smoothly, as if your setting are already made/stored persistent. In particluar, the blank screen does not last very long upon the 2nd and 3rd re-booting.

    - - - - - - - - - - - - - - - - - - -

    Troubleshooting – Caution about preparing the flash drive

    Your flash drive must not have a bootloader installed to the MBR!
    Best way to prepare you for problems is to recount my experience.
    First, here's the summary you need to know:

    SUMMARY : Zero-out any bootloader you may have in the MBR.

    Syslinux will boot from the first sector of the first * partition * of the flash drive (= the boot sector of partition 1 = the first 512 bytes of partition 1).
    Your flash drive must not have another bootloader in its MBR (= sector 1 = the first 512 bytes of the flash drive preceding the first partition).
    If it does have a bootloader in the MBR, then zero-out the MBR, and try usb-creator again.
    If you zero-out the entire flash drive, the disk will be full, so first format it using GParted as FAT32, then run usb-creator.

    Here's the problem:
    If there is a bootloader already in the MBR, simply re-formatting the flash drive will not get rid of it. Re-formatting only formats the partition (say, sdc1), not the MBR of the drive.

    - - - - -
    My experience, which will also show you a few techniques using dd:

    I had an existing installation of Kubuntu Live persistent on a 2 GB flash drive, with GRUB installed to the MBR (using the method of Reply #54 above).
    Although the usb-creator program gave me the option to reformat the drive and I chose to do so, the MBR was not overwritten by usb-creator. Upon re-booting, I got the dreaded
    GRUB_
    with the blinking _

    I printed the contents of the MBR using this dd command:
    dd if=/dev/sdc count=1 | hexdump -C
    and saw that GRUB was still in the MBR.

    Now, there is a way using Super Grub Disk to make GRUB boot using just the MBR and not using the next 15 sectors for its Stage_1.5, but ...I didn't want to go there. Also, one might try to rig up some sort of Syslinux boot, by writing something to the MBR. I did try this:
    sudo syslinux -sf /dev/sdc1
    but, of course, that skips the MBR.

    I tried reformatting the flash drive using GParted, but I still got the GRUB_ boot error (GParted did not touch the MBR where my old GRUB was still installed, GParted only formats the first partition sdc1).

    To get rid of GRUB in the MBR, I wrote zeros to the entire drive (you only need to zero-out the MBR = the first 512 bytes, but I figured I go squeaky clean with a fresh flash drive).

    Like so:
    sudo dd if=/dev/zero of=/dev/sdc
    dd: writing to `/dev/sdc': No space left on device
    4030465+0 records in
    4030464+0 records out
    2063597568 bytes (2.1 GB) copied, 621.441 s, 3.3 MB/s
    (=> it took 621.441 seconds)
    Now, your flash drive is FULL! -- It is full of zeros.
    Thus, you need to format it with GParted, Fat32, starting at Sector 1.
    In other words, zero-out the entire flash drive and then using GParted create a new partition and format it (using the entire flash drive space).
    Now, run usb-creator and it will work.

    Or, you could do this:
    =>>>Zero-out ONLY the MBR:
    sudo dd if=/dev/zero of=/dev/sdc bs=512 count=1
    and then run usb-creator, and it will work.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: Build a LIVE Kubuntu Flash Drive, How-To

      This a masterful piece of work Mike -- thank you!

      Comment


        #4
        Re: Build a LIVE Kubuntu Flash Drive, How-To

        Reply #3: History – Sequence of past how-to's

        ----- Building a Live Kubuntu Flash Drive for Gutsy 7.10

        It is not persistent. It uses GRUB to chainload Syslinux.
        Though dated, some of you may find it useful or interesting:
        It shows how to boot (by chainloading) Syslinux, and has some good command-line techniques.

        ----- Live Kubuntu 7.10 + Live Ubuntu 7.10 on a 2GB flash drive,
        It is not persistent.. It uses GRUB to chainload Syslinux.

        ----- Live Kubuntu 7.10 flash drive WITH PERSISTENCE
        using GRUB all the way (i.e., no chainload to Syslinux)

        ----- Kubuntu HH 8.04 on Live Persistent Flash Drive
        using GRUB (no Syslinux)
        Bug fix: It addresses a well-known bug at the time
        “[hardy] livecd: keyword "persistent" results in busybox and (initramfs)”


        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

        Live Kubuntu GG 7.10 flash drive without persistence.
        Using GRUB to chainload Syslinux.


        Comment
        This was the original (first) post of this thread/Topic, my first effort at the how-to.
        It was written for Kubuntu Gutsy 7.10 and does NOT include persistence.
        Though dated, some of you may find it useful or interesting:
        It shows how to boot (by chainloading) Syslinux (in the boot sector of GG 7.10) using GRUB installed to the MBR of the flash drive.
        It also illustrates some good command-line methods.
        - - - - - - - - - - - - - - - - - - - -
        - - - - - - - - - - - - - - - - - - - -

        Building a Live Kubuntu Flash Drive for Gutsy 7.10
        (it is not persistent. It uses GRUB to chainload Syslinux.)


        A Live Kubuntu flash drive is like your Live Kubuntu CD except it is installed to a bootable flash drive. That is, the Kubuntu will run in your PC's main memory (RAM, in ramdisk) and never changes anything on your hard drives. I've been playing around with such this week, using the following excellent tutorial:
        The tutorial by IntuitiveNipple (I-N):
        http://ubuntuforums.org/showthread.php?t=476302

        So, I thought I'd write up my experiment here, noting three things:

        --- GRUB: I use GRUB to make the flash drive bootable. I set it up using a small, dedicated GRUB partition on the flash drive. (The I-N tutorial uses LILO in the MBR.)
        --- GUI: I goofed around with GUI methods, whereas the I-N tutorial is 100% command line interface (CLI). For example, I use GParted Live CD to partition, format, and set the boot flag on the flash drive.
        --- For beginners, I tried to include a few extra explanations and details.

        --------------------
        THE PLAN

        I hope you will try this and report your experiences back here.

        YOUR WAY: In particular, if you see another way or a better way to do something, post your ideas here. I'm not the expert. But if you encounter questions or problems, post back here and we'll all see if we can get you fixed and going.

        BEGINNERS: This is a good project to use for learning some K/Ubuntu/Linux methods, especially if you are new to Kubuntu or new to some of the methods used here. If you get stuck on some technicality (like a command not working), post here and someone will probably be able to help.

        CREDIT: I'll go through the I-N tutorial, using my way & explanations on some of the steps. My How-To here is basically a repackaging of I-N's tutorial. The numbering of the steps is mine. I'll refer to the linked tutorial as "I-N". In some cases, I directly quote his work and I say so. >>> Major credit goes to I-N for his idea on how to do this, and figuring it out, down to the details. I'm just goofing around to see some other ways to do some of the steps. For example, I find GUI methods to be fast and easy. Using them, and GParted, I can rip through Steps 5, 6, and 8 before many people can open Konsole (not quite, but you get my gist). And, as I said, I modified it to use GRUB and demonstrate the use of a separate, dedicated GRUB partition.
        --------------------

        FLASH DRIVE
        You need a 1 GB flash drive (USB Flash Drive, or UFD)
        *** Your BIOS must support "Boot from USB" ***
        To start, boot into your regular Kubuntu installation, where you will do this work.
        Read the entire How-To before you start Step 1.

        *** Caution! As an example here, I am using the notation for my flash drive in my system:
        My flash drive is seen as sdc in Kubuntu and as hd2 in GRUB. Yours may be different! See Step 4.

        ----- Step 1 Download the Kubuntu live CD version.
        Download the Live Kubuntu Desktop CD version 7.10-i386.iso, and make sure it is good:
        Check the md5sum; run the CD to select Check CD for defects; then test run the Live CD.

        ----- Step 2 Get some software. At Konsole, type:
        sudo apt-get install mtools nasm libc6-dev netpbm
        (This is from I-N, except I've omitted lilo since we will use GRUB.)

        ----- Step 3 Get SYSYLINUX
        You may already have it installed (Search in your K > System > Adept Manager to see), and if so, it may very well be adequate here (it worked for me). You may want to get the latest version. If so, the following commands are taken straight from I-N to download and install version 3.51, as an example, (and I also tested this).
        wget http://www.kernel.org/pub/linux/util...ux-3.51.tar.gz
        $ tar xzvf syslinux-3.51.tar.gz
        $ cd syslinux-3.51
        $ make
        $ sudo make install
        $ cd .. # note the two periods: cd, then a space, then two periods

        ----- Step 4 Easy but Very Important! Find out what your flash drive is named.
        Connect your flash drive. In Kubuntu, to see your drives and partitions, open K > System > Konsole, and type
        sudo fdisk -lu
        Your flash drive will be named something like sda, sdb, sdc, sdd, etc. You should get an icon on your Desktop for the flash drive (if you have two partitions on it, as we will soon see, you will get two icons). Right-click > Properties will tell you how it is named and mounted.

        How does GRUB see the flash drive? At Konsole, type
        sudo grub
        and then, at the GRUB prompt, grub>, type
        geometry (hd<Press the TAB key now>
        and that will return your drives as BIOS & GRUB see them: hd0, hd1, hd2, ...
        Now explore them and figure out what your flash drive is named: grub> geometry (hd0), then do geometry (hd1), etc.

        Example: In my system, I have two internal hard drives, hd0 = sda and hd1 = sdb. If that's all I have connected (i.e., no other drives), when I plug in my single flash drive, it is called sdc = hd2.

        ----- Step 5 Prepare the flash drive: Partition and format and set a boot flag.
        I am using my notation sdc for my flash drive as an example. Yours may be different!
        Use GParted Live CD to partition and format the flash drive as follows:
        Partition1, for dedicated GRUB partition: sdc1, FAT32, 32 MB
        Partition2, for Kubuntu Live, sdc2, FAT32, 800 MB
        Also, set a boot flag on partition 2 (highlight it, Partition > Manage Flags > boot).

        Note: GRUB only needs about 200 KB, but the minimum size for a FAT32 is 32 MB.


        ----- Step 6 Install GRUB, set up the MBR, and edit the boot menu

        This will put the GRUB files in the first partition, and it will install GRUB to the Master Boot Record (MBR) of the flash drive, ensuring you have a good partition table. This is done the same way we always do it. I am using my notation sdc for my flash drive as an example. Yours may be different!
        My flash drive is sdc, the two partitions are sdc1 and sdc2; in GRUB notation, it is hd2, with partitions (hd2,0) and (hd2,1); the MBR of the flash drive is named (hd2) (note the parentheses).

        (1) On partition 1, build /boot/grub. This is your dedicated GRUB partition.

        Open Konqueror, type /boot, then drag the /grub folder off to your Desktop as a "Copy" (NOT "Move"!). Now open the flash drive icon corresponding to the first flash drive partition. Right-click in the open, blank window, and create a new folder called "boot" (without the quote marks). Now click on /boot to open it. Now from your Desktop, drag the /grub folder into the open /boot window. So now you set up /boot/grub on partition 1 of the flash drive.
        Note: We only need /grub, so you can get it from anywhere (/grub contains the stage_1, stage_1.5, and stage_2 files we need here). I took a copy from our regular-installed Kubuntu. You can also copy the /grub folder from the Live Kubuntu CD you just burned.

        (2) Set up GRUB in the MBR of the flash drive.

        Open Konsole, type sudo grub, at the GRUB prompt type these commands:
        grub> root (hd2,0)
        grub> setup (hd2)
        grub> quit
        $exit

        This sets up GRUB in the MBR of the flash drive, (hd2), from the GRUB files in partition 1, (hd2,0).
        *** CAUTION! Your notation may be different! Be CAREFUL here so you don't mess up any of your other drives!
        *** That's why Step 4 is so important!

        (3) Make a valid boot menu that will work to boot SYSLINUX which will boot your Live Kubuntu.
        Open /boot/grub/menu.lst as root as follows: Click on the partition 1 icon; click on boot; click on grub; right-click on menu.lst, Actions > Edit as root, give your password, wait for menu.lst to appear in a text editor (e.g., KWrite).
        Now, do a major edit on this menu.lst so it looks like this:

        # Kubuntu Live Flash Drive GRUB boot menu. Far out.
        # Then say whatever you wish to say to yourself. Somebody Stop me!
        timeout = 3 # you can make it any number of seconds
        default = 0

        title Kubuntu 7.10 -- Live Gutsy Flash Drive
        rootnoverify (hd0,1)
        makeactive # this is really not necessary, but I tested it this way
        chainloader +1

        This is the boot menu you will see when you boot your PC from the flash drive. It works by using GRUB to chainload the bootloader SYSLINUX in partition 2 (which we are going to set up in Step 7).
        Note: This step differs from I-N. He uses LILO and sets it up to build a valid MBR and partition table. He uses LILO as the Initial Program Loader (IPL) in the MBR; I'm using GRUB.

        *** See Technical Note below about USB drive shifting to understand the various (hdx,y)'s used here.


        ----- Step 7 Install SYSLINUX in the Kubuntu partition (partition 2).
        At Konsole:
        sudo syslinux -sf /dev/sdc2

        Note: SYSLINUX is a bootloader; we are installing it to the Kubuntu partition (partition 2, which for me is sdc2). The PC will boot to GRUB in the MBR of the flash drive, which will pass control to the GRUB partition (partition 1), and GRUB will pass control (by chainloading) to SYSLINUX (in partition 2) which will then boot the Live Kubuntu.
        CAUTION: Once again, YOUR device reference for the flash drive may be different; mine is sdc2.


        ----- Step 8 Copy the Live Kubuntu files from the CD to the second partition of the flash drive.

        Place the CD in the tray and close the tray; let it come up in Kubuntu and open it in a file manager window (e.g., Konqueror). Do this any way you wish, at the command line interface (CLI) in Konsole or using the graphical user interface (GUI) Konqueror.

        *** IMPORTANT: If you use GUI, make sure you see and copy the HIDDEN FILES! (There was only one on mine, ./disk) View > Show Hidden Files. ***

        I used GUI for the heck of it and because it is quick and easy. Experts will want to use CLI. See tips at the end for GUI logistics. I-N uses CLI. He also shows you how to get it from just the .iso without burning a Live CD (see his tutorial for the commands; also see my How-To below on extracting files from an .iso).

        GUI, example: To do this, open the CD in Konqueror, then View > Show Hidden Files, then Edit > Select > Select All, then Edit > Copy Files, you'll get a "copy to" dialogue, click the small browse icon on the right of the window, click on Storage Media, click on the icon for your Partition 2 of your flash drive, OK, OK, then sit back and watch it go.

        CLI, using I-N: On my machine, the commands given by I-N turn out to be as follows. You will have to adjust these to your system! My CD is mounted as /media/cdrom0. My flash drive, the second partition, sdc2, shows up as an icon on the Desktop and is mounted as /media/disk (Right-click > Properties to see yours). Yours may be different! (E.g., /media/usbdisk, or /media/usbdisk-1, etc.)

        The two commands you need are, copied and adjusted directly from I-N:
        sudo cp -r /media/cdrom0/.[a-zA-Z0-9_]* /media/disk
        sudo cp -r /media/cdrom0/[a-zA-Z0-9_]* /media/disk

        Note: See the period preceding [ in the first command--it means hidden files.
        Note: You may get 3 error messages "cp: cannot create symbolic link `/media/disk/dists/stable': Operation not permitted," and just ignore them. (I-N explains that the FAT filesystem doesn't support symbolic links.)


        ----- Step 9 "Rename the boot image directory and files so that SYSLINUX will find them when it boots" (quote I-N)
        Look at the folders in partition 2 of your flash drive, and you will see Isolinux. Since we installed SYSLINUX, we want to re-name the former as the latter (they are, basically, the same bootloader).
        Again, Note: My sdc2, the second partition holding Kubuntu on the flash drive, is mounted as /media/disk -- Yours may be different!

        Directly from I-N's tutorial:
        sudo mv /media/disk/isolinux /media/disk/syslinux
        sudo rename 's/isolinux/syslinux/' /media/disk/syslinux/isolinux.*

        then "update references in the configuration file to syslinux" as follows:
        cd /media/disk/syslinux
        sudo sh -c "sed 's/isolinux/syslinux/' <syslinux.cfg >syslinux.cfg2"
        sudo rm syslinux.cfg
        sudo mv syslinux.cfg2 syslinux.cfg

        You'll note that I-N creates a new configuration file, syslinux.cfg2 which is syslinux.cfg with every occurrence of the string isolinux replaced by syslinux, and then deletes (removes with "rm") the old one syslinux.cfg. You must then, as he shows, rename the temporary syslinux.cfg2 as syslinux.cfg, otherwise the syslinux bootloader will not be able to find it (and therefore can't find the kernel and initrd files). If that were to happen, you'd get the Syslinux screen with, "Could not find kernel image: linux" and dropped to a boot prompt
        boot:

        (where you could type something like the following to make it work:
        boot: /casper/vmlinuz/ file=/cdrom/preseed/kubuntu.seed boot=casper initrd=/casper/initrd.gz,
        but who in their right mind wants to do that!)


        ----- Step 10: You are done! Re-boot to test it.
        Note: It may take awhile as Kubuntu loads the kernel and initrd files from the flash drive. Your USB 2.0 connection is not as fast as your CD or your internal drives. On my machine, it took, perhaps, 3-5 minutes. A good chance to get a cup of tea., but the first time around, you should stay with it and see how it all works.

        = = = = = = = = = =
        --- Technical note about USB drive shifting.
        If you are in your regular Kubuntu, your flash drive may be seen, to use my example, as sdc, and GRUB sees it as hd2. Then, the first and second partitions on the flash drive are seen as sdc1=(hd2,0) and sdc2=(hd2,1). Now, switch your view for a moment. Suppose your PC *boots from the flash drive*. Then, the picture is different *as viewed by BIOS and by the GRUB on the flash drive*. BIOS and the GRUB on the flash drive (and therefore the menu.lst of the flash drive) sees the flash drive as hd0, and the partitions as (hd0,0) and (hd0,1). In fact, this is true *at boot time* for ANY drive (internal, external, or USB device) that the PC boots from. I used this fact in Step 6 to set up GRUB and the menu.lst on the flash drive. See the Reference (GRUB on Thumb Drive) for more on this.

        --- GUI Logistics -- some tips. It's easy, but sometimes just a bit goofy.

        If you work in GUI, quite often you must do so as root, otherwise you won't be able to move, rename, or save/paste anything.
        Permission on your flash drive.
        If you have problems with permissions on your flash drive, simply use K > System Settings > Advanced tab > Disk & Filesystems, Click Administrator Mode (at bottom right), highlight the device/partition you want to modify, right-click > Modify, and there you may change permissions, enable writing (click the Advanced button), and do other things. Remember, you can always copy files, without permissions, and then rename them for your own use. But if you want to edit a file and save it back, or if you want to create a new folder within and existing folder, you need permission to "write" (within a folder or "above" the folder). See Tuxfiles (References) for changing ownership and permission at the command line.

        Open Konqueror as root: There are many ways.
        At Konsole, type kdesu konqueror; or sudo su, then konqueror; or sudo -i to get a root terminal, then type konqueror. If you have problems, it usually helps to restart X (Control-Alt-Backspace), or even re-start the PC.

        Editing files as root:
        For example, you can open Konqueror, type /boot, click on the grub folder, right-click on menu.lst, select Actions > Edit as root, and a text editor (e.g., KWriter) will open menu.lst for you as root. When done editing, remember to File > Save and File > Quit.

        --- Bugginess
        -- Sometimes, BIOS won't boot from your flash drive even though it supports "boot from USB" and even though you set it up correctly to do so. In that case, simply re-boot. Or, re-boot and enter BIOS setup again, and check or re-set the settings. It'll work. Just be patient.
        -- Sometimes your regular Kubuntu may act up on you while you are trying to do this work. Sometimes it helps to simply save your work, close everything, and re-start! Or, save & 77close everything and re-start X (Control-Alt-Backspace). It'll work. Just be patient.

        = = = = = = = = = =
        References

        PERSISTENCE: for persistence and a simpler method using GRUB all the way (i.e., no chainload to Syslinux), see Reply #7 below.

        The tutorial by IntuitiveNipple:
        http://ubuntuforums.org/showthread.php?t=476302

        How To Make GRUB Thumb Drive
        http://kubuntuforums.net/forums/inde...opic=3081748.0
        This post and the posts under it explain everything you ever wanted to know about using your USB flash drive for such things as we have done here. In particular, see the replies about USB drive shifting and Simplifying your menu.lst.

        How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...opic=3081671.0
        This How-to and the posts under it explain how to use GRUB, edit your menu.lst, build a separate, dedicated GRUB partition, etc. See the first and second posts for the topics covered.

        GParted: http://gparted.sourceforge.net/
        GParted how-to: http://www.howtoforge.com/partitioning_with_gparted

        Tuxfiles: http://www.tuxfiles.org/
        Excellent for using commands, files & folders, filesystems, permissions, mounting, and much more.

        Man pages: Use the manual pages at Konsole to learn more about commands. For example, (see Step 9), you might run
        man sh
        and
        man sed

        = = = = =
        Extra:
        How-To: Extract files from an .iso.
        ISO -- iso files, accessing Access your iso files without burning the CD
        Actual example, let's say the file name is knoppix_5.1.1_plus_sgd_0.9625_demo.isopwd on my Desktop:
        /home/mike/Desktop/knoppix_5.1.1_plus_sgd_0.9625_demo.isopwd
        Download the iso file to the Desktop. (If it's a tar.gz file or similar, you get the iso by right-click, Extract Here, or by using ARK under K-Menu > Utilities > ARK.)
        mike@mike-desktop:~$ mkdir /mnt/test # Make a directory /mnt/test for your mount point
        mike@mike-desktop:~$ sudo mount -t iso9660 -o loop /home/mike/Desktop/knoppix_5.1.1_plus_sgd_0.9625_demo.isopwd /mnt/test # Mount the iso
        # You can also change directories (cd) to /mnt/test, and list (ls) the files to see what's there (under /test).
        # Next, copy the GRUB files /boot/grub to a folder that will be created and called new_grub, say under /tmp
        mike@mike-desktop:~$ cp -R /mnt/test/boot/grub/ /tmp/new_grub
        # Now change the ownership so mike can have these files and then unmount it:
        mike@mike-desktop:~$ chown -R mike:mike /tmp/new_grub
        mike@mike-desktop:~$ sudo umount /mnt/test # Unmount /test
        # If you have to invoke root, use sudo (as I have above, when it was necessary).
        # Open Konqueror and go to /tmp/new_grub, you will access the files in /boot, starting with /grub.
        # You can continue work at Konsole, if you wish, or using Konqueror GUI.


        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

        Live Kubuntu 7.10 + Live Ubuntu 7.10 on a 2GB flash drive, booting by GRUB

        Comment
        This was originally Reply #1.
        Live Kubuntu Kubuntu 7.10 and Ubuntu 7.10 on the flash drive,
        No persistence.
        Using GRUB (with no Syslinux).
        - - - - - - - - - - - - - - - - - - - -
        - - - - - - - - - - - - - - - - - - - -


        Live Kubuntu 7.10 + Live Ubuntu 7.10 on a 2GB flash drive, booting by GRUB

        I did this again, this time putting Live Kubuntu 7.10 and Live Ubuntu 7.10 on a 2 GB flash drive.
        Used GRUB again -- in a separate GRUB partition, to chainload SYSLINUX installed to each of the two operating system partitions.

        ----- Layout:
        Used GParted Live CD to partition and set the boot flag:

        sdc1 32 MB dedicated GRUB partition containing /boot/grub (but not the kernel or initrd files--only the GRUB files); set the boot flag on this partition (Partition > Manage flags > boot)
        sdc2 941 MB Kubuntu 7.10 Live (It uses only 697.3 MB, so 750 MB would work fine)
        sdc3 941 MB Ubuntu 7.10 Live (It uses only 696.1 MB, so 750 MB would work)

        If you knew a way to make this persistent--and so save data and settings to the flash drive--there's plenty of extra room on the 2 GB drive if you go with 750 MB for each operating system. And I believe GRUB would go into a 16 MB FAT16 partition, saving some more MB's. (GRUB only needs some 200 Kilobytes, but the minimum for FAT16 is 16 MB.)


        ----- The menu.lst in /dev/sdc1/boot/grub is:

        # Live Flash Drive with Kubuntu 7.10 and Ubuntu 7.10
        default 0
        timeout 10

        title Kubuntu 7.10 LIVE
        rootnoverify (hd0,1)
        chainloader +1

        title Ubuntu 7.10 LIVE
        rootnoverify (hd0,2)
        chainloader +1

        This menu.lst is simple enough, and the rootnoverify appears to be necessary. When I tried simply,
        chainloader (hd0,2)+1
        boot
        I got GRUB Error 17: Cannot mount selected partition
        which is what I expected to get trying to boot syslinux.
        In the How-To (first post above), I used makeactive before rootnoverify; the command makeactive is not necessary.


        ----- Just a few things I'd suggest to you if you try this.

        >>> I did this work in Kubuntu 7.10, which seemed to go smoother than when I did similar work in 7.04. You may have to deal with your permission on the flash drive, using either the command line or K > System Settings > Advanced > Disk & Filesystems | Administrator Mode.

        >>> When you get the flash drive all set up to copy OS files into, it helps to identify and write down how the two OS partitions are mounted before you start the command-line work.
        For example, in my test, /dev/sdc1 was mounted as /media/disk-1 (GRUB partition); /dev/sdc2 as /media/disk-2 (Kubuntu partition); and /dev/sdc3 as /media/disk-1 (Ubuntu partition). Not exactly intuitive; more like random naming!

        You'll have to work through the commands twice, once for sdc2 Kubuntu and once for sdc3 Ubuntu, using the correct mount points and device naming for each.

        >>> When you restart the PC with the flash drive connected, it shows you the boot menu, you make a selection, then you'll see the older syslinux interface on a K/Ubuntu splash screen, offering familiar choices:
        live
        xforcevesa
        driverupdates
        oem
        check
        memtest
        hd

        (To re-boot: The selection "hd" causes a re-boot from the *local* disk, which is the flash drive! This is handy for starting over at a GRUB menu in case you are testing or change your mind about booting into the Live flash drive K/Ubuntu: at the flash drive boot menu, you can hit the "c" key, get a GRUB prompt (grub>), then boot into any drive/OS you wish by manually typing the appropriate GRUB commands.)

        >>> Be patient!
        When you select "live," it takes just 1-2 minutes for the kernel to load 100%, but then it takes 4-5 minutes for initrd to load. Problem is, it may not tell you what's going on and may appear to freeze during the loading of initrd.

        >>> Kubuntu 7.10 Live came up good, except I had to adjust the screen size (the K button was off to the left). Ubuntu came up good, also, except it flashed a couple screens before going black, and when I touched the space bar, the Ubuntu Desktop came up as it should. This is probably a function of my Intel embedded video settings or something like that. The point is, be patient, and if things look bleak, either wait awhile or press, for example, the space bar to get it to come up and go. Your experience may be different, of course. The whole boot takes only, perhaps, 5-7 minutes, so it's not a big deal. It's an opportunity to stand up and pace for some exercise .

        Basically, no problems. Both OSs look real good and work good, though a bit slow to load at first, as I explained.


        ----- Step 7 Install SYSLINUX in the operating system partitions:
        sudo syslinux -sf /dev/sdc2
        sudo syslinux -sf /dev/sdc3
        (On my system, the flash drive is sdc. Caution: Yours may be different!)

        After doing this, you will see the main file ldlinux.sys installed to the flash drive partition, and the boot sector is setup to boot with Syslinux. To boot the partition, you must use a boot loader installed to the MBR, which for us is GRUB (which chainloads to boot syslinux in the partition boot sectors).

        The option -s means a "safe," "stupid" mode and is used for bootable CDroms for buggy BIOSes. I did not test whether it is necessary to use the -s option in this application. As for the -f option, I can't remember what that is, and worse yet, can't seem to find anything on it! If you know, please tell.

        SYSLINUX Documentation
        http://syslinux.zytor.com/faq.php


        ----- Other Live operating systems, using this method?

        I haven't experimented further. What I did here seems to use a couple simple facts. K/Ubuntu on a Live CDrom; and booted on the CD using ISOLINUX. That's it. Seems if you had another Live OS on CD, it would work here, too. We installed SYSLINUX, which is basically the same as ISOLINUX, except SYSLINUX is used for FAT file systems (as we have on the flash drive). That's why were able at the end to rename the files from ISOLINUX to SYSLINUX.


        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

        Live Kubuntu GG 7.10 flash drive WITH PERSISTENCE
        using GRUB all the way (i.e., no chainload to Syslinux)


        Comment
        This was originally Reply #7.
        Live Kubuntu GG 7.10 with persistence, using GRUB (with no Syslinux).
        - - - - - - - - - - - - - - - - - - - -
        - - - - - - - - - - - - - - - - - - - -

        Live Kubuntu Flash Drive for Gutsy 7.10 -- with Persistence --
        using GRUB all the way (i.e., no Syslinux)

        PERSISTENCE means that your (personal) user configuration settings are saved to the flash drive and thus are available next time you run your LIVE Kubuntu from the flash drive. This includes your programs like Firefox and Thunderbird, bookmarks, address book, Desktop settings, icons you put in the panel, setting Konqueror as your default file manger, documents you've saved in /home, the klipper (clipboard) contents, Trash bin, Clock, and so on. Nothing is written to any of your other hard drives in your system (unless you do so intentionally). It is easy to modify the How-To above to allow persistence. We will simplify things even further by using GRUB all the way.

        Troubleshooting
        I've included Troubleshooting Tips (below). The References at the end are very important as they will help you further troubleshoot and perhaps make other adjustments.

        THANKS to the authors of the references including especially KOLO, Tekno_Cowboy, and Herman.

        *** Your BIOS must support "Boot from USB" ***
        *** See the first post of this thread for more specific/logistic how-to details ***
        Note:
        GUI is “graphical user interface” and refers to using Konqueror (or Dolphin, etc.).
        CLI is “command line interface” and refers to using Konsole and commands.

        FLASH DRIVE
        I used a 2 GB flash drive (USB Flash Drive, or UFD). You should be able to do this--tightly perhaps--with a 1 GB flash drive.

        BOOT INTO YOUR REGULAR KUBUNTU installation, where you will do this work.

        CAUTION! For the example here, I am using the notation for my flash drive in my system:
        My flash drive is seen as sdc in Kubuntu and as hd2 in GRUB. Yours may be different! See Step 2.

        STEP 1 Download the Kubuntu Live CD: kubuntu-7.10-desktop-i386.iso.
        Make sure it is good: Check the md5sum; run the CD to select “Check CD for defects”; then test run the Live CD.

        STEP 2 Find out what your flash drive is named. Easy, but very important!
        Example: In my system, it is called sdc = hd2.

        STEP 3 PREPARE the flash drive: Partition, format, set a boot flag, set some labels.
        As follows:
        Partition 1, for Kubuntu: sdc1, ext2, 750 MB, set boot flag, set label: Kubuntu710.
        Partition 2, for the “persistence partition,” sdc2, ext3, 1 GB, set label: casper-rw.
        *** See Troubleshooting about the ext3 format of the persistent partition.

        Use GParted Live CD to partition, format, and set the boot flag. Exit GParted, eject GParted CD & remove the flash drive, re-boot into your regular Kubuntu where you are doing this work, re-connect the flash drive.
        Open Konsole and set the labels by typing these two commands:
        e2label /dev/sdc1 kubuntu710
        e2label /dev/sdc2 casper-rw
        Unplug the flash drive, plug it in again, you'll see the Desktop icons labeled kubuntu710 & casper-rw.

        Note: casper-rw This is important. It's the label you need so your Live Kubuntu recognizes the persistent partition as the one to use to save your data/settings/configurations.
        Note: When you save data to your /home, it is saved in the casper-rw partition.
        Note: Labels. GParted has a label function (Device > Set Disklabel), but apparently it will not do this the way we need it done. At Konsole, type man e2label to see the manual page for e2label.
        Note: GRUB. We are not using a dedicated GRUB partition (as we did in the original post), but you can if you wish, and then you'd have sdc1 = GRUB partition, sdc2 = Kubuntu, sdc3 = casper-rw.


        STEP 4 Install GRUB, set up the MBR, and edit the boot menu /boot/grub/menu.lst
        = = > CAUTION: I am using my notation sdc = hd2 for the flash drive here. Yours may be different!

        (1) On partition 1 (kubuntu710) of the flash drive, build /boot/grub.

        In your regular Kubuntu OS, open Konqueror as root, type /boot, then drag the /grub folder off to your Desktop as a "Copy" (NOT "Move"!). Now open the flash drive icon kubuntu710 corresponding to the first flash drive partition. Right-click in the open window, and create a new folder called "boot" (without the quote marks). Then click on /boot to open it. Now from your Desktop, drag the /grub folder into the open /boot window. So now you set up /boot/grub on partition 1 of the flash drive.
        Note: We only need the grub directory and its files, so you can get it from anywhere (/grub contains stage_1, stage_1.5, and stage_2 files we need here). I took a copy from our regular-installed Kubuntu.

        (2) Set up GRUB in the MBR of the flash drive.

        = = > CAUTION: I am using my notation sdc = hd2 for the flash drive here. Yours may be different!
        Open Konsole, type sudo grub, at the GRUB prompt type these commands:
        grub> root (hd2,0)
        grub> setup (hd2)
        grub> quit
        $exit

        This sets up GRUB in the MBR of the flash drive, (hd2), from the GRUB files in partition 1, (hd2,0).

        (3) Edit the boot menu, /boot/grub/menu.lst. Make a valid boot menu that will work to boot your Live Kubuntu 7.10.

        Open /boot/grub/menu.lst as root as follows: Click on the partition 1 icon labeled Kubuntu710; click on boot; click on grub; right-click on menu.lst, Actions > Edit as root, give your password, wait for menu.lst to appear in a text editor (e.g., Kwrite or Kate). Delete everything in menu.lst; type or copy the following into your menu.lst (and finish with File > Save, File > Quit):

        # Kubuntu 7.10 Live Flash Drive GRUB boot menu.
        # Includes Persistent option, along with other Live options, including Install.
        #
        timeout = 5 # you can make it any number of seconds
        default = 0 # Makes the Persistent option the default OS to boot

        title Kubuntu 7.10 LIVE Persistent
        root (hd0,0)
        kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw quiet splash persistent
        initrd /casper/initrd.gz

        title Kubuntu 7.10 LIVE--Start or Install
        root (hd0,0)
        kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw quiet splash
        initrd /casper/initrd.gz

        title Safe Graphics mode -- xforcevesa
        root (hd0,0)
        kernel /casper/vmlinuz boot=casper xforcevesa ramdisk_size=1048576 root=/dev/ram rw
        initrd /casper/initrd.gz

        title Install with driver update CD -- driver updates
        root (hd0,0)
        kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw debian-installer/driver-update=true quiet splash --
        initrd /casper/initrd.gz

        title OEM install (for manufacturers)
        root (hd0,0)
        kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw oem-config/enable=true quiet splash --
        initrd /casper/initrd.gz

        title Check CD for defects
        root (hd0,0)
        kernel /casper/vmlinuz boot=casper integrity-check quiet splash --
        initrd /casper/initrd.gz

        title Memtest
        root (hd0,0)
        kernel /install/mt86plus

        title Re-boot the PC
        reboot

        # End of menu.lst

        Note: See Technical Note below about USB drive shifting to understand root (hd0,0) used here.
        Note: Another way to create a new menu.lst is to right-click on your regular Kubuntu Desktop, Create New > Text File and name it menu.lst. Then type or copy into it whatever you wish.

        >>>LIVE Kubuntu 7.10 As you can see from the menu.lst, when using this flash drive, you have the option of running it without the persistent capability; that is, you can run it as a straight Live Kubuntu 7.10 OS and it will not save anything to casper-rw. You can use it that way to install Kubuntu 7.10 to an internal/external hard drive.


        STEP 5 Copy the Live Kubuntu files from the CD to the first partition (kubuntu710) of the flash drive.

        IMPORTANT: If you use GUI, make sure you see and copy the HIDDEN FILES! (There was only one on mine, ./disk) In Konqueror, View > Show Hidden Files.

        Experts will want to use CLI. See tips in first post for GUI logistics. You can also do this at CLI without burning the CD: see my How-To at the end of the first post on extracting files from an .iso.
        PERMISSIONS: To copy files into the flash drive's first partition, you may need permissions or to have root privileges to save anything to the flash drive. At CLI, use sudo. At GUI, you can use drag-and-drop or “Copy files to,” but first open konqueror as root as follows: at Konsole, type kdesudo konqueror.


        STEP 6 You are done! Re-boot to test it.
        TESTING PERSISTENCE:
        In your live session, save things and configure things and re-boot to see if they are saved/configured.
        Examples: See “PERSISTENCE” at the start of this post.
        ALSO,
        back in your regular Kubuntu, connect your flash drive, open the casper-rw partition, and have a look at it. You'll see all the many files that are saved there (mine has about 90 MB thus far).

        = = = = = = = = = =
        WHAT TO EXPECT

        My experience has been VERY good thus far. KOLO reports a similar experience during two year's of use (see his thread at Kubuntu, below); and, from reading the boards, others report good experience. As the expression goes YMMV--Your Mileage May Vary! To start, consider this to be somewhat experimental. Be patient. Mess with it. Some things may work perfectly, some may not work at all (e.g., the clock setting on mine is not persistent), and some things may work sometimes and not at other times!

        BACK-UPs Remember, if you wish, while in a Live Kubuntu session, you may backup any of your work to a second data flash drive connected to your PC; or mount an internal/external hard drive and save data to a folder there.

        = = = = = = = = = =
        Troubleshooting Tips

        ----- The ext3 format of the persistent casper-rw partition
        ext2 requires less overhead space than ext3 which uses journalling. We could also use FAT32. When you set it up, give the casper-rw partition the space remaining after using 750 MB for Kubuntu 7.10 for the first partition. I had serious problems using ext2 for the casper-rw partition. When I reformatted casper-rw as ext3, I had almost no problems, and nothing serious. Thanks to KOLO for this tip.

        ----- Permissions, working with root privileges
        To change anything on the flash drive, you may need the proper permissions, or to work with root privileges.
        -- At the command line, simply use sudo to work with root privileges.
        (For command line permissions and ownership, see Tuxfiles in References.)

        -- When working in GUI, with Konqueror, drag-and-drop, copy-paste, dealing with permissions can sometimes be frustrating (“Access Denied,” “You do not have permissions...”). I have found that it (almost) always works to FIRST open Konqueror with root privileges as follows: K > System > Konsole, then type kdesudo konqueror, and it will open as root. From there, you should be ok. From there, you can also right-click on the flash drive icons (under Storage Media), then change permissions under Properties > Permissions. Your other tool is the following: K > System Settings > Advanced > Disk & Filesystems > Administrator Mode button > Right-click on the flash drive partition > Modify. Strangely, I ran into more than one occasion where I had to use both Disk & Filesystems and the Properties > Permissions page of the flash drive.

        -- See the first post above for these notes and tips:
        Technical note about USB drive shifting; GUI Logistics—tips; Buggyness in BIOS & Kubuntu.

        ----- Flashing cursor “-” upper left after re-booting using the Live flash drive: be patient, it may take from 30 seconds to 2 minutes before you see the message “Starting up...” (it's about 30 s on my machine).

        ----- Black screen after the Kubuntu progress bar completes but you expect to see the Desktop loaded: It could be an X/kde/kdm display manager thing. Try simply pressing the space bar or moving the mouse, and wait a few seconds.

        ----- Something on the Desktop gets goofy or you get some message. Ignore it. Or, try restarting X: Control+Alt+Backspace.

        ----- When re-booting, the scrolling text on the screen seems to stop at some point or message. Be patient, hit Enter, be more patient. Maybe for up to a couple minutes.

        ----- Your menu.lst doesn't seem to work when you select an entry from the boot menu you see on your screen after re-booting. Go into your regular Kubuntu, access the flash drive, open menu.lst as root, and try re-typing by hand the boot entry. (When you copy/paste from, say OOo Writer, it may not always work.)

        ----- When all else fails, you can always re-boot (even by a hard re-boot by pressing the Reset button on your PC).

        ----- WHEN ALL ELSE REALLY FAILS Hey, it's part of the game: Do it again! If you are having strange, insurmountable problems, you may reformat the casper-rw partition and start over, and/or re-do the entire project. When you get into this work, you'll find it doesn't really take very long from start to finish, perhaps just 10-20 minutes.

        ----- Bugs in Gutsy? This is not a perfect science (yet). Results vary. For tips, ideas, check out the user comments in this bug report:
        https://bugs.launchpad.net/ubuntu/+s...rt/+bug/125702
        (I posted as mikeXYZ)

        ----- Wear-out the flash drive?
        Who knows! KOLO has posted that he's used his flash drive this way for two years. You don't hear any devastating reports of flash drives biting the dust. The filesystem ext3 might result in more writes to the flash drive than, say ext2 or FAT32, but whether that's a problem is not yet known. I am not worrying about it. Worst case: after awhile, I may lose a 2 GB $17 flash drive, but--in ANY case--this learning experience is fun and rewarding. I've done a lot of work with flash drives, and so far, no wear-out. YMMV

        = = = = = = = = = =
        References

        --- Herman: Thanks to Herman for starting me along some new ideas.
        --- Tekno_Cowboy: Thanks to Tekno_Cowboy for his excellent work on this, including menu.lst.
        --- KOLO: Thanks to KOLO for telling me to try ext3 for casper-rw (which fixed my problems!) and for his interesting and encouraging discussion, including tips on the menu.lst (consistent with that of Tekno_Cowboy's).

        Gutsy bug report:
        https://bugs.launchpad.net/ubuntu/+s...rt/+bug/125702

        HOW TO make a USB Disc with Ubuntu LiveCD and Super Grub Disc in it.
        http://ubuntuforums.org/showthread.php?t=575406
        Herman; Tekno_Cowboy

        http://ubuntuforums.org/showthread.p...99#post1062799
        Ubuntu on a USB Drive? KOLO's posts #100 & #158

        http://kubuntuforums.net/forums/inde...opic=3087651.0
        KOLO's post and discussion where we discussed ext3

        LiveCDPersistence
        https://help.ubuntu.com/community/Li...0e31f46cae5951
        Excellent!

        LiveUsbPendrivePersistent
        https://wiki.ubuntu.com/LiveUsbPendrivePersistent
        Excellent!

        -- How To Make GRUB Thumb Drive (and the posts under that thread)
        http://kubuntuforums.net/forums/inde...opic=3081748.0
        -- How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/inde...opic=3081671.0
        -- GParted: http://gparted.sourceforge.net/
        -- GParted how-to: http://www.howtoforge.com/partitioning_with_gparted
        -- Tuxfiles: http://www.tuxfiles.org/
        (permissions, ownership, commands, file and folders, Linux file system, mounting, and more)
        -- Herman's site (many topics, including GRUB) http://users.bigpond.net.au/hermanzone/


        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

        Kubuntu HH 8.04 on Live Persistent Flash Drive

        Comment
        This was originally Reply #18.
        Live Kubuntu HH 8.04 with persistence.
        Using GRUB (no Syslinux)
        Bug fix:
        It addresses a well-known bug at the time:
        “[hardy] livecd: keyword "persistent" results in busybox and (initramfs)”
        - - - - - - - - - - - - - - - - - - - -
        - - - - - - - - - - - - - - - - - - - -


        Kubuntu HH 8.04 on Live Persistence Flash Drive

        To install HH 8.04 to your flash drive, to run as a live, persistent operating system, follow the how-to in Reply #7.
        (This time, I used ext3 for both partitions of the flash drive—See Step 3 of Reply #7.)

        => Re-boot to test your final product.
        It may work just fine! (... if they have patched the “bug” in HH's scripts/casper file ).
        Otherwise:

        => Troubleshooting a bug in HH 8.04:
        Suppose you re-boot to test it and get dropped to a BusyBox prompt, something like:
        EXT3-fs: Unrecognized mount option “mode=755” or missing value
        BusyBox v1.1.3 Built-in shell (ash)
        (initramfs)_
        and it stops here.

        Then you need to fix a bug. Here's a simple way to do that, and here's two versions, one for experienced users and one for us.


        ----- Fixing the bug: Short version

        Choice #1: ONLY if you use Ubuntu. Not for Kubuntu! (Thx to K0LO for this tip)
        Use a patched initrd.gz file
        Get that from here and copy it into your flash drive (ubuntu804/casper):
        https://bugs.launchpad.net/ubuntu/+s.../?loggingout=1
        See the post by FlipsideTech 2008-04-29.

        Choice #2: Fix initrd.gz yourself, in a working folder called work_here on your Desktop, as follows:
        Assume the first partition of the flash drive is mounted as /media/kubuntu804 and contains the root files.
        Konsole
        sudo su
        mkdir /home/your_name/Desktop/work_here
        cd Desktop/work_here (change into the folder work_here and stay there)
        cp /media/kubuntu804/casper/initrd.gz .
        (see the space and dot afollowing initrd.gz? -- the dot means "the current working directory" = the directory work_here)
        gzip -dc initrd.gz | cpio -i (extract initrd.gz)
        kwrite scripts/casper
        Edit: Change
        mount ${cowdevice} -t ${cow_fstype} -o rw,noatime,mode=755 /cow || panic "Can not mount $cowdevice on /cow"
        to this:
        mount ${cowdevice} -t ${cow_fstype} -o rw,noatime /cow || panic "Can not mount $cowdevice on /cow"
        File > Save, File Quit
        find . | cpio -o -H newc | gzip -9 > initrd.gz (zip the new initrd.gz)
        cp initrd.gz /media/kubuntu804/casper
        Re-boot to test it.


        ----- Fixing the bug: Detailed version

        Choice #1: ONLY if you use Ubuntu. Not for Kubuntu! (Thx to K0LO for this tip)
        Use a patched initrd.gz file
        Get that from here and copy it into your flash drive (ubuntu804/casper):
        https://bugs.launchpad.net/ubuntu/+s.../?loggingout=1
        See the post by FlipsideTech 2008-04-29.

        Choice #2: Fix initrd.gz yourself, in a working folder called work_here on your Desktop, as follows:

        > Create a place to work safely

        Log in to your working Kubuntu operating system.
        On your Desktop, create a folder to work in, say work_here:
        Right-click on Desktop, Create New > Folder, and type work_here for “Enter folder name.”

        > Get the broken file (initrd.gz) from your flash drive
        Plug in the flash drive, access the root partition, say kubuntu804, open it, click on the folder Casper, now copy the file initrd.gz to your work_here folder.

        > Open Konsole and get ready to work.
        K > System > Konsole
        To become root, type
        sudo su
        (and give your password).
        You should be in your home folder right now (indicated by /home/your_name# in the prompt; the # sign indicates root.
        Navigate to the folder work_here:
        cd Desktop/work_here

        > Extract initrd.gz (it is a compressed file and has been compressed by the algorithm called gzip).
        Type the following command to do this:
        gzip -dc initrd.gz | cpio -i

        Now if you look in the folder work_here, you'll see all the extracted files and folders.
        (You can do so in GUI or at Konsole by typing ls -al )

        > Edit the broken file that's causing the problem, work_here/scripts/casper.
        You should still be in the folder work_here.
        Open the file in kwrite:
        kwrite scripts/casper (see note below)
        In file /scripts/casper, locate the following line:

        mount ${cowdevice} -t ${cow_fstype} -o rw,noatime,mode=755 /cow || panic "Can not mount $cowdevice on /cow"

        and change it to this:

        mount ${cowdevice} -t ${cow_fstype} -o rw,noatime /cow || panic "Can not mount $cowdevice on /cow"

        (We deleted exactly this string: ,mode=755 )
        Then File > Save, File > Quit.

        Note: If you have difficulty getting the file to open for some reason (e.g., my sudo su seemed buggy), do it another way. For example, leave Konsole open, and open another instance of Konsole, open Konqueror as root by typing
        kdesu konqueror
        navigate to the file /home/your_name/Desktop/work_here/scripts/casper, open it, and do the edits. You can do this at Konsole or in GUI.

        > Zip the new initrd.gz file.
        In the first Konsole, you should still be in the folder work_here. Issue this command at Konsole:
        find . | cpio -o -H newc | gzip -9 > initrd.gz
        (Note: this reads as follows: find then space then a period then space then the vertical pipe bar etc--don't omit the "dot" or the period)

        > Put it back together in your flash drive.
        Copy this new initrd.gz file back to your flash drive in the casper folder:
        cp initrd.gz /media/kubuntu804/casper

        (Note: You should still have a root prompt, and you MAY need it because you are modifying the casper folder; the first partition of the flash drive may be something like sdc1 but we set a label for it in the how-to, calling it kubuntu804 (or whatever you decided to call it for yourself); and, again, you can always do this also in GUI, starting by opening Konqueror as root int another instance of Konsole by typing the command kdesu konqueror .)


        => Re-boot to test it. It should work.

        - - - - - - - - - - - - - - -

        --- References

        See References above in this thread, for example in Reply #7.

        For the bug and its history and fixes, see
        Bug #219192, first reported on 2008-04-18 by Kenneth Mokkelbost
        [hardy] livecd: keyword "persistent" results in busybox and (initramfs)
        https://bugs.launchpad.net/ubuntu/+s.../?loggingout=1
        (Thanks to K0LO for pointing this "official" bug out to me.)

        For the problem with mode=755, see
        Thomas Skariah's Blog
        Sunday, April 20, 2008
        Ubuntu 8.04 (Hardy Heron) on USB stick (pen drive)--Persistent
        http://t-skariah.blogspot.com/2008/0...on-on-usb.html

        For the gzip commands, see
        http://www.pendrivelinux.com/2007/09...er-persistent/

        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
        = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

        ----- END of REPLY #3 -- past how-to posts -----
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: Build a LIVE Kubuntu Flash Drive, How-To

          Mepis 7 RC2 is a nice-looking distro that also uses KDE. They've recently updated their repos with the new graphics for the official released version, which is anticipated before the end of the month. However I doubt the Live CD images have the new graphics.

          E-live is a very stable distro that uses the Enlightenment 17 desktop, but they want to nick you for $$ to let you download the stable version. I used to run their free "development" version, which was actually quite stable, but the last version of it that I tried had issues with sound, so I dunno. Enlightenment is very attractive, to me.

          Comment


            #6
            Re: Build a LIVE Kubuntu Flash Drive, How-To

            We posted in passing.
            MEPIS might be a good candidate to try here.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: Build a LIVE Kubuntu Flash Drive, How-To

              MEPIS is different. (SimplyMEPIS-CD_6.5.02_32.iso)

              It doesn't use Isolinux. It uses GRUB, with GRUB's stage2_eltorito. So, I used what was there, but without stage2_eltorito, simply modifying its GRUB menu.lst, putting MEPIS on a flash drive sdc2 partition, and pointing at it from a dedicated GRUB partition on sdc1. The steps would be the following. They parallel the Steps in the first post of this thread, but many steps of that post are not needed here. My flash drive was named sdc--Yours may be different--CAUTION!

              --- Download the MEPIS live CD iso version. Burn it to CD using K3b.
              --- Easy but Very Important -- Find out what your flash drive is named. (Mine here: sdc)
              --- Prepare the flash drive: Use GParted Live CD to partition and format and set a boot flag:
              sdc1 GRUB partition FAT 32, 32 MB boot flag
              sdc2 MEPIS partition FAT32 or ext3, 800 MB

              --- Install GRUB to sdc1, set up the MBR, and edit the boot menu
              The menu.lst on sdc1 is:
              timeout 10
              default 0
              title MEPIS Live Flash Drive
              configfile (hd0,1)/boot/grub/menu.lst
              # where (hd0,1) refers to sdc2 WHEN the PC boots from the flash drive.

              Edit the menu.lst on the MEPIS partition /dev/sdc2/boot/grub/menu.lst.
              It has a bunch of boot entries like this:
              title DEFAULTS (auto config with xorg display driver)
              kernel /boot/vmlinuz init=/etc/init apm=power-off vga=791 quiet
              initrd /boot/initrd.gz

              Edit each one by placing
              root (hd0,1)
              immediately after title (and before kernel).

              Next,
              Copy the Live MEPIS files from the CD to the MEPIS partition of the flash drive (here, sdc2).
              And finally,
              You are done! Re-boot to test it. (First, unmount it: right-click the flash drive icons and Safely Remove.)


              This is a bit off-topic, but I started it, and it does illustrate another Linux model and methods, in contrast to the Kubuntu 7.10 case.

              The MEPIS Live flash drive worked fine and worked faster than the MEPIS Live demo CD.

              Kubuntu is more fun to use
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Re: Build a LIVE Kubuntu Flash Drive, How-To

                -- with Persistence --
                Live Kubuntu Flash Drive for Gutsy 7.10
                using GRUB all the way (i.e., no Syslinux)


                *** This topic has been moved by the author ***

                *** SEE the first post of this thread (above) for complete Table of Contents ***
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Re: Build a LIVE Kubuntu Flash Drive, How-To

                  no, but nice plug just what the doctor ordered thanks
                  Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

                  Comment


                    #10
                    Re: Build a LIVE Kubuntu Flash Drive, How-To

                    ... insiders only
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      Re: Build a LIVE Kubuntu Flash Drive, How-To

                      That's a great "Persistant USB Drive" walk thorugh!

                      Comment


                        #12
                        Re: Build a LIVE Kubuntu Flash Drive, How-To

                        Thanks. I try to pull the best of the best references into my How-To's. So far, the persistent Live UFD I built is working great (cross the fingers). For me, the ext3 format for casper-rw was the key (Thx to KOLO for that tip), but ymmv.
                        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                        Comment


                          #13
                          Re: Build a LIVE Kubuntu Flash Drive, How-To

                          kubuntu-restricted-extras ?
                          In Kubuntu Live persistent flash drive session:

                          Can somebody test this, or does anyone know what might be going on:

                          When I try to run
                          sudo apt-get install kubuntu-restricted-extras,
                          I get
                          “can not find package kubuntu-restricted-extras.”
                          (I also tried in Adept Manager and Add/Remove Programs.)

                          sources.list: In the live Kubuntu session, I have edited the /etc/apt/sources.list by copying into it the sources.list from the regular Kubuntu 7.10 (hard-drive installed); still no-go.

                          EDIT: SOLVED. I may not have run sudo apt-get update; but doing so now fixed this.
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            Re: Build a LIVE Kubuntu Flash Drive, How-To

                            “Copy” your flash drive to another fresh flash drive

                            You can quickly clone your (bootable) Live persistent Kubuntu 7.10 flash drive using the dd command. This means you use dd to copy everything—the MBR, GRUB setup, filesystem, formatting, and your persistent data partition (which may also contain your programs like Firefox, Thunderbird, add-ons, etc., and your configuration settings (like custom default settings, bookmarks, and email)). It takes just one command-line statement issued in Konsole. When finished, you can reboot using just the "new" flash drive (the clone you made), and you're set to go--nothing else required to make the clone work.

                            dd Command
                            http://kubuntuforums.net/forums/inde...opic=3090824.0

                            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                            Comment


                              #15
                              Re: Build a LIVE Kubuntu Flash Drive, How-To

                              All I have right now are a couple of older and smaller drives (a 128mb and a 512mb), so I can't try this yet... but I hope to eventually get an eight or sixteen gig drive and set this up on there. It'll be nice to be able to borrow my dad's computer without having to subject myself to the windows. Also, it'll make it easier to share the *buntu love if I can just plug into my friend's computer, reboot and show them what they're missing out on.

                              Comment

                              Working...
                              X