How to install lubuntu to USB

Israel israeldahl at gmail.com
Tue Feb 4 17:14:16 UTC 2014


On 02/04/2014 05:20 AM, Leszek Lesner wrote:
> 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
>
>
And another option (if you do not need to partition your harddrive, is 
to boot from an ISO on the harddrive.  GRUB2 supports directly booting 
from and ISO file on the harddrive.  This limits some of the 
functionality (like installing it to a new partition, as you cannot 
partition the drive while it is mounted and in use).
for more info on that:
https://help.ubuntu.com/community/Grub2/ISOBoot
This is a decent option if you want to try out various flavours, though 
ones other than Ubuntu can be a bit harder to boot from an ISO, most of 
them will boot pretty well just looking at the menuentry(I can't 
remember the filename right now) in the ISO and adapting it....
  You can boot an ISO on a USB from GRUB2, even if your BIOS wont 
support booting from USB (though you can also install the live system to 
the USB, and boot into that OS from GRUB2 as well)

These points are mainly to add to the discussion for people following 
it... it may not really be the type of answer you are looking for... but 
it can all be done from the grub command line too.

Also, Fedora has a script for writing live images to a USB.  You could 
(if you know BASH) adapt it to suit your needs, as it worked quite well 
for me writing Korora to a USB (faster than unetbootin)

-- 
Regards




More information about the Lubuntu-users mailing list