How to install lubuntu to USB

Leszek Lesner leszek.lesner at web.de
Tue Feb 4 11:20:27 UTC 2014


Am 04.02.2014 03:43, schrieb Tong Sun:
> On Mon, Feb 3, 2014 at 4:45 PM, Aere Greenway wrote:
>
>> In the past few releases, the GTK version of USB Creator has failed for me
>> as well.  I would hope they would have fixed it by now, but apparently not.
> Glad to know that it is not only me.
>
>> I have been using the KDE (kubuntu) version of USB creator, and it seems I
>> had to do that with 13.10 as well.
> I tried to install usb-creator-kde, but gave it up because I need to
> pull in over 150 packages just for it.
>
>> I know I found something that worked (probably the KDE version), because I
>> have a working Lubuntu 13.10 bootable USB with a persistence file.
> Could you do me a favor and document how your USB boots please?
As I am also the main dev of Neptune and we claim ourselves to be live
and persistency experts here a short explaination for you.
First of all you have two choices to make.
1. I want a FAT32 partitioned USB Stick that not only contains my live
system but also is usable as normal usb stick on every computer around
(especially windows and mac pcs)
2. I want a linux live only usb stick without the necessity of a FAT32
partition.

For making it short I only explain 1. here

For 1: I would recommend to use unetbootin to get the ISO onto an usb
stick.
In Details what unetbootin does is:
    * Copy over the contents of the ISO onto the usb stick (including
hidden folders like .disk which is necessary for ubiquity in particular
for the installation process)
    * Install syslinux bootloader to boot. (This step includes
converting/copying the isolinux bootmenu file to syslinux format)

To make that stick now persistent you have two options.
A. I want a persistency file on my fat32 part of the usb stick so that I
can also delete/copy or make a backup of it and share it with my friends
directly from the usb stick and can live with the filesize limit of
FAT32 which is 4 GB.
B. I want a large persistency partition and don't care about easily
copying ot deleting it.

For A: dd is your friend and you can create a empty disk image like this
dd if=/dev/zero of=test.img bs=1M count=1000
This creates a 1 GB test.img file.
For it to work as persistent file it needs to be formatted as something
that the linux system can read (e.g. ext2/3/4/jfs/xfs/btrfs ...)
I recommend ext2 here or if you are fancy ext4 without journaling
(journaling makes no sense on flash based devices like an usb stick)
mkfs.ext2 test.img
This is basically all. You need to rename the file to
casper-rw
and copy it over to the root of the usb stick.
Then adding the boot option
persistent
(either manually by pressing TAB in the bootmenu of syslinux or directly
in the syslinux.cfg) the *buntu system should then boot up with
persistency enabled.

For B: You need to make space for the persistency partition on the usb
stick. Gparted is your friend here.
When creating the ext2/3/4/jfs/xfs/btrfs partition for your persistency
make sure to label the partition as
casper-rw
Then again after adding the boot option
persistent
the *buntu live system should boot up with persistency enabled.

I hope that helps as a start.

Greetings
Leszek




More information about the Lubuntu-users mailing list