PCLinuxOS-Forums
News: Wishing everyone a Happy 2012
 
*
Welcome, Guest. Please login or register. February 12, 2012, 08:27:40 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Manually Create a Live USB Flash Stick Install -- 2009  (Read 9682 times)
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« on: September 12, 2009, 03:32:57 AM »

Pre-requisites:-
                        Working from an installed PCLOS ..... either updated to present or a 2009.1 install.
Flash stick minimum of 1GB but preferably larger

Aim:-
           To produce a flash stick that will run PCLOS 2009.1 (or later) from any PC which is capable of booting from USB

Synopsis:-
           
1. Create an ext3 partition on a flash drive of 1GB size or greater. Give permission to everyone to R/W
2. Copy the OS files to the partition from an ISO or CD of 2009
3. Create a boot folder on the partition, and copy the grub folder from a running PCLOS 2009 into the boot folder
4. Edit the menu.lst file on the flash disk
5. Install Grub to the MBR of the flash drive

That's it!

Below is my suggestion of one method of achieving this.
It is not the only method, nor is it exhaustive, but it should get you through the process if you are in any doubt.
Essentially this is the same method as described here
http://pclosmag.com/html/Issues/200804/page01.html
with a few minor changes to the boot stanza and the use of the partition Label to boot, and also includes persistence.

************

Process :-

1.
         Use PCLOS Control Centre - Local Disks - Manage Disk Partitions.
Delete all existing partitions on the stick.
Create an ext3 partition of minimum 1 GB but preferably more if persistence is needed.
If it is a 4GB flash disk then make the partition the full size of the flash drive.
Set the permissions of the partition to allow everyone to read and write it.
Give the partition a Label .... let's say    2009
Format the partition.
Select Done from the bottom of the page.


2.
   Safely remove the drive and then reinsert it after a few seconds.
An icon should appear on the Desktop called    2009.
It should now mount to /media/2009 when clicked.
Right click on the Desktop icon, select Properties and from the Mounting tab untick "Access time Updates". OK


Next ...

Using a 2009 live CD open it in Konqueror ...

or

if you have just the ISO of 2009, right click on it ... Actions - ISO9660 View. This will open the ISO in Konqueror. Click on the folder ISO9660 to display its contents.

Then ....
Click on the 2009 Desktop icon so that it opens in Konqueror or other file manager.

Now from the Konq view of the CD or ISO, copy to the 2009 flash disk partition, the isolinux directory and the livecd.sqfs file.


3.
   Next create a directory called  boot   on the 2009 flash disk.

Navigate to /boot  in the running OS and copy the    grub   directory to within the boot directory of the 2009 flash disk.

Your flash disk should now have
isolinux      folder
boot           folder   {and inside this folder should be the grub folder}
livecd.sqfs  file


4.
   Open the /boot/grub/menu.lst file on the flash disk for editing.
Delete the existing boot stanzas, leaving the headings etc intact.
Place a # in front of the gfxmenu line. {if you want a graphical boot it can be done later}
Add the following boot stanzas  [EDIT: Added second boot stanza to allow use without Persistence]

Code:
title 2009 -- With Persistence
kernel (hd0,0)/isolinux/vmlinuz vga=788 livecd=livecd fromusb root=Label=2009 changes_dev=LABEL=2009 acpi=on fstab=rw,noauto
initrd (hd0,0)/isolinux/initrd.gz

title 2009 -- No Persistence
kernel (hd0,0)/isolinux/vmlinuz vga=788 livecd=livecd fromusb root=Label=2009  acpi=on fstab=rw,noauto
initrd (hd0,0)/isolinux/initrd.gz

Now for the terminal stuff .....

5.
   Open a terminal and su to root. Type
grub <enter>
After some little time you get a grub prompt
grub>
To be sure we work on the correct drive and not interfere with any HDDs in the system we ask Grub to find all instances of menu.lst file
grub> find /boot/grub/menu.lst
You will get a response something like
(hd0,0)
(hd0,5)
(hd2,0)


grub>
This shows I have a menu.lst file in partitions 0 & 5 of hd0 (first HDD) and on the first partition of my third disk. So I reckon that the third disk is my flash drive but I want to confirm it, so

grub> geometry (hd2)
This gives me
drive 0x82: C/H/S = 500/255/63, The number of sectors = 8040448, /dev/sdc
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83

{Note: There may be other lines like the one above if there are other partitions on the device .... such as
   Partition num: 1,  Filesystem type is ext2fs, partition type 0x83}

I can see from this that the third disk is /dev/sdc and I can confirm that to be my flash drive by hovering the mouse over the icon on the desktop which will give me the device node of the drive. In my case it tells me it is /dev/sdc1. So now I am sure I can go ahead and install grub to the MBR of that drive.

grub> root (hd2,0)  <enter>     -> this specifies the location of the files that Grub is to use when booting

grub> setup (hd2)   <enter>     -> this installs Grub to the MBR of (hd2) which is /dev/sdc

When this completes and reports success, all is finished.


To change your flash stick to 2009.2 or .3 or later all that is required is to replace the isolinux folder and the livecd.sqfs file with the newer version.

Note: Without the fromusb code in the boot line the stick does not shut down properly. I do not know if its presence will affect correct booting in other situations ..... I have only a limited amount of hardware to try it on. I would appreciate it if others could check this out on their hardware. If the stick has a problem booting in any situation please first try removing the "fromusb" code from the boot line and then reboot.

Finally there is additional information below for those wishing to have more than one choice of OS on their flash drive. This explains how to configure the files to allow different versions of PCLOS to be bootable from the same flash stick.

Have fun!
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« Reply #1 on: October 20, 2009, 04:22:17 AM »

For those of us who are using USB flash sticks to carry our favourite PCLOS releases around to boot whatever PC we come across, I thought to add a small change here which might make things easier.

The above method called for the various releases to be in their own folder and to change the location of the release files when you wished to boot a different OS.

Instead of that method, which is awkward, try this ....

Let us imagine that we have the OS files for
Minime 2009.1
PCLOS 2009.2
ZenMini 2009.1
all in their own folders on the USB stick.

Rename each of the pairs of files from
isolinux & livecd.sqfs   to something reflecting their release. So in the above example they might become

kdemini1 & kdemini1.sqfs
pclos2 & pclos2.sqfs
zenmini1 & zenmini1.sqfs

Now the files can be moved to the root of the stick and they won't interfere with each other as they all have different names, and are named in pairs representing their release.

Because the files are named differently we will need a different boot stanza for each release we have on the stick. So the menu.lst file might look something like this


Code:
title  Minime 2009
kernel (hd0,0)/kdemini/vmlinuz livecd=kdemini fromusb acpi=on fstab=rw,noauto vga=791
initrd (hd0,0)/kdemini/initrd.gz

title   Zen Mini Gnome 2009
kernel (hd0,0)/zenmini/vmlinuz livecd=zenmini fromusb acpi=on fstab=rw,noauto vga=791
initrd (hd0,0)/zenmini/initrd.gz

title  PCLOS 2009.2
kernel (hd0,0)/pclos2/vmlinuz livecd=pclos2 fromusb acpi=on fstab=rw,noauto vga=791
initrd (hd0,0)/pclos2/initrd.gz

You can of course keep adding releases as long as you have the space for them on your disk.
If your files are on other than the first partition just change the (hd0,0) to reflect that ... to hd(0,1) if they are on the second partition etc.

NB    If you wish to use an older version of PCLOS -- I tried Minime2008 -- I advise not renaming the files. The change of name by the livecd= boot code was not implemented then it seems ....



regards.
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« Reply #2 on: April 19, 2010, 01:31:51 PM »

Just a note for anyone accessing this thread:

The initial releases of PCLOS 2010 have some problems when running live on USB.

First of all they do not shut down cleanly, but this is not a problem as almost all of the shutdown procedure has been accomplished .
I use the power button to turn off the machine once the shutdown procedure stops, or if I want to reboot the machine I usually use
Ctrl,Alt +SysRq then +b

Unfortunately persistence is unavailable on PCLOS live USB disks at this time, but it is being worked on and hopefully a fix will be forthcoming sometime soon.

Other than that it has been fun playing with the new releases .......  particularly the smaller sized releases.
I managed to get 8 different distros on to a 4 GB flash stick .....  mostly PCLOS mini releases but also including things like Partition Magic.
All bootable and all available from the boot menu.
A very handy tool indeed to carry around.

I hope to update this thread when there is new information about the existing problems with the PCLOS live USB installs.


regards   Wink
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« Reply #3 on: May 08, 2010, 09:49:45 AM »

Those interested in running live from USB flash sticks will be delighted to note that

the 2010.1 KDE ISO can now be used properly on a USB flash stick in live mode

and that it has both correct shut-down AND persistence working.

All is well with the world again!   Cheesy

Thanks to the devs responsible for getting this out.   Smiley

regards.
Logged
antman
Jr. Member
**
Offline Offline

Posts: 15



WWW
« Reply #4 on: May 08, 2010, 05:34:19 PM »

Those interested in running live from USB flash sticks will be delighted to note that

the 2010.1 KDE ISO can now be used properly on a USB flash stick in live mode

and that it has both correct shut-down AND persistence working.

All is well with the world again!   Cheesy

Thanks to the devs responsible for getting this out.   Smiley

regards.

I'm going to try your procedure tonight to create my custom live usb stick.... glad to hear that persistence will work now.  Grin
Logged

PCLinuxOS 2010 Kde 4.5.1, Linux Mint 9 Gnome, and Windows 7
melodie
Hero Member
*****
Online Online

Posts: 5671


XMMP=Jabber, free instant messaging protocol !


WWW
« Reply #5 on: May 13, 2010, 02:27:59 AM »

Hi,

I use a similar method, but all on a usb stick that is in fat32 partition format. This way I don't have to care about write permissions on it. I also have other distributions booting in it the same way : Clonezilla, and Parted Magic...

and a "Document" folder in which I copy any file I need to have apart from the distros, on the same stick. If I need the permissions to be kept I make a tar archive before copying them.

I don't quite understand why you use ext3 : pendrives have a limited life span... (I mean number of write cycle) using ext2 not to have journalised fs : wouldn't it be better ?

Logged

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« Reply #6 on: May 13, 2010, 06:23:30 AM »

Hi,

I use a similar method, but all on a usb stick that is in fat32 partition format. This way I don't have to care about write permissions on it. I also have other distributions booting in it the same way : Clonezilla, and Parted Magic...

and a "Document" folder in which I copy any file I need to have apart from the distros, on the same stick. If I need the permissions to be kept I make a tar archive before copying them.

I do not use anything from MS if it can be reasonably avoided.
The only time I will consider a FAT filesystem is if the partition is very small as FAT has a lighter overhead than ext ......  for instance a 10MB partition for the boot manager.

I therefore do not have to take extraordinary measures (such as archiving) to retain permissions of files after the stick has been set up. It is a one time setting when creating the structure and never needs to be touched again, regardless of use.

In any case that stick is for use as a live USB and not for general copying of files from one place to another. For copying files I use either another USB stick, also with ext filesystem, or do so over the LAN using NFS.

Quote
I don't quite understand why you use ext3 : pendrives have a limited life span... (I mean number of write cycle) using ext2 not to have journalised fs : wouldn't it be better ?

I am of the opinion that a 10 year life expectancy is quite sufficient .....  I certainly do not expect to be using this stick by then.
Also I would bring your attention to
Quote
untick "Access time Updates"
which prevents the majority of unnecessary writes while still giving the benefit of the journal when using persistence.

Anyway, as mentioned, the above is just one means of achieving the desired result.

I won't willingly use a MS filesystem; others can make their own decisions. I won't be changing my mind on that.   Wink


regards.
Logged
robertsig
New Friend
*
Offline Offline

Posts: 3


« Reply #7 on: May 13, 2010, 05:00:34 PM »

I won't willingly use a MS filesystem; others can make their own decisions. I won't be changing my mind on that.   Wink

I admire your zealousness, but it's not like you're actually giving Microsoft any money by using it.  Smiley
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« Reply #8 on: May 13, 2010, 07:27:25 PM »

I won't willingly use a MS filesystem; others can make their own decisions. I won't be changing my mind on that.   Wink

I admire your zealousness, but it's not like you're actually giving Microsoft any money by using it.  Smiley

I did  not realise I came across as zealous, I simply stated that I do not willingly use MS filesystem.  I did not urge, encourage or otherwise attempt to influence other peoples choices.
I simply stated my reason when queried.   Wink

regards.
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1666


Keep it clean.


« Reply #9 on: June 08, 2010, 08:16:34 AM »

This post is in reference to the following:
http://www.pclinuxos.com/forum/index.php/topic,73291.msg610009.html#msg610009
to address opie's question of what to edit in his menu.lst when creating a LiveUSB.

The contents of my USB are currently:
Quote
[jpaglia@core2pclinux PCLOS]$ ls -lnh
total 3.4G
drwxrwxr-x 3 501 501 4.0K 2010-03-09 09:34 archive/                                                 
drwxrwxr-x 3 501 501 4.0K 2009-08-12 15:39 boot/
drwxr-xr-x 2   0   0 4.0K 2009-08-25 13:49 changes/                                                 
drwxr-xr-x 2 501 501 4.0K 2010-04-14 00:00 e17_2010/
-rw-r--r-- 1 501 501 597M 2010-04-14 00:00 e17_2010.sqfs
drwxrwxr-x 2 501 501 4.0K 2010-04-13 14:16 gnome2010/
-rw-r--r-- 1 501 501 682M 2010-04-12 05:27 gnome2010.sqfs
lrwxrwxrwx 1 501 501   10 2010-04-20 10:13 isolinux -> ./lxde2010/
drwxrwxr-x 2 500 500 4.0K 2010-05-04 19:43 kde2010/
-rw-r--r-- 1 500 500 679M 2010-05-05 15:41 kde2010.sqfs
lrwxrwxrwx 1 501 501   15 2010-04-20 10:13 livecd.sqfs -> ./lxde2010.sqfs
drwx------ 2   0   0  16K 2009-08-12 15:34 lost+found/
drwxr-xr-x 2 501 501 4.0K 2010-04-14 00:00 lxde2010/
-rw-r--r-- 1 501 501 566M 2010-04-14 00:00 lxde2010.sqfs
drwxr-xr-x 2 501 501 4.0K 2010-04-13 00:00 phoenix2010/
-rw-r--r-- 1 501 501 608M 2010-04-13 00:00 phoenix2010.sqfs
drwxr-xr-x 2 501 501 4.0K 2010-04-14 00:00 ZENmini2010/
-rw-r--r-- 1 501 501 330M 2010-04-14 00:00 ZENmini2010.sqfs
[jpaglia@core2pclinux PCLOS]$



My menu.lst file contains the following:
Quote
[jpaglia@core2pclinux grub]$ cat menu.lst
timeout 10
color black/cyan yellow/cyan
#gfxmenu (hd0,0)/usr/share/gfxboot/themes/pclinuxos/boot/message
default 3

title PCLOS circa 2010 -- With Persistence
kernel (hd0,0)/isolinux/vmlinuz vga=788 livecd=livecd fromusb root=Label=PCLOS changes_dev=LABEL=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/isolinux/initrd.gz

title PCLOS circa 2010
kernel (hd0,0)/isolinux/vmlinuz vga=788 livecd=livecd fromusb root=Label=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/isolinux/initrd.gz

title PCLOS ZEN mini 2010
kernel (hd0,0)/ZENmini2010/vmlinuz vga=788 livecd=ZENmini2010 fromusb root=Label=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/ZENmini2010/initrd.gz

title PCLOS KDE 2010
kernel (hd0,0)/kde2010/vmlinuz vga=788 livecd=kde2010 fromusb root=Label=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/kde2010/initrd.gz

title PCLOS LXDE 2010
kernel (hd0,0)/lxde2010/vmlinuz vga=788 livecd=lxde2010 fromusb root=Label=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/lxde2010/initrd.gz

title PCLOS e17 2010
kernel (hd0,0)/e17_2010/vmlinuz vga=788 livecd=e17_2010 fromusb root=Label=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/e17_2010/initrd.gz

title PCLOS Gnome 2010
kernel (hd0,0)/gnome2010/vmlinuz vga=769 livecd=gnome2010 fromusb root=Label=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/gnome2010/initrd.gz

title PCLOS Phoenix XFCE 2010
kernel (hd0,0)/phoenix2010/vmlinuz vga=788 livecd=phoenix2010 fromusb root=Label=PCLOS acpi=on fstab=rw,noauto
initrd (hd0,0)/phoenix2010/initrd.gz
[jpaglia@core2pclinux grub]$



There are the old persistent entries, but I don't use them, anymore.  I find this just to be a very convenient alternative to carrying around 5-7 CDs in my pocket  Wink.

Hope this helps you, opie.  If you need anything clarified, just ask.
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« Reply #10 on: June 08, 2010, 10:36:27 AM »

Just for comparison here are the contents of one of my flash sticks ...

Code:
[user@Dell LiveOS]$ ls -lnh
total 3.3G
drwxrwxr-x 3 500 500 4.0K 2010-05-07 10:23 boot/
drwxrwxr-x 2 500 500 4.0K 2010-04-14 16:19 e17-isolinux/
-r-------- 1 500 500 597M 2010-04-14 16:19 e17.sqfs
drwxr-xrwx 2 500 500 4.0K 2009-08-27 19:12 gfxmenu/
drwxrwxr-x 2 500 500 4.0K 2010-04-14 23:46 gnome-isolinux/
-r-------- 1 500 500 330M 2010-04-14 23:46 gnome.sqfs
drwxrwxr-x 2 500 500 4.0K 2010-05-05 01:43 kde-isolinux/
-r-------- 1 500 500 679M 2010-05-05 01:43 kde.sqfs
drwxrwxr-x 2 500 500 4.0K 2010-05-09 19:44 lxde-isolinux/
-r-------- 1 500 500 566M 2010-04-14 19:14 lxde.sqfs
drwxrwxr-x 2 500 500 4.0K 2010-04-28 04:40 openbox-isolinux/
-r-------- 1 500 500 587M 2010-04-28 04:40 openbox.sqfs
drwxrwxr-x 3 500 500 4.0K 2010-03-20 15:56 pmagic/
drwxrwxr-x 2 500 500 4.0K 2010-04-20 14:33 xfce-isolinux/
-rw-rw-rw- 1 500 500 608M 2010-04-13 12:52 xfce.sqfs


Quote
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/gfxmenu/message
default 0

title   KDE
kernel (hd0,0)/kde-isolinux/vmlinuz livecd=kde fromusb root=LABEL=LiveOS acpi=on fstab=rw,noauto vga=791
initrd (hd0,0)/kde-isolinux/initrd.gz

title  LXDE
kernel (hd0,0)/lxde-isolinux/vmlinuz livecd=lxde fromusb root=LABEL=LiveOS acpi=on fstab=rw,noauto vga=791 splash=silent
initrd (hd0,0)/lxde-isolinux/initrd.gz

title  Xfce
kernel (hd0,0)/xfce-isolinux/vmlinuz livecd=xfce fromusb root=LABEL=LiveOS acpi=on fstab=rw,noauto vga=791 splash=silent
initrd (hd0,0)/xfce-isolinux/initrd.gz

title  Gnome
kernel (hd0,0)/gnome-isolinux/vmlinuz livecd=gnome fromusb root=LABEL=LiveOS acpi=on fstab=rw,noauto vga=791 splash=silent
initrd (hd0,0)/gnome-isolinux/initrd.gz

title   Enlightenment
kernel (hd0,0)/e17-isolinux/vmlinuz livecd=e17 fromusb root=LABEL=LiveOS acpi=on fstab=rw,noauto vga=791 splash=silent
initrd (hd0,0)/e17-isolinux/initrd.gz

title  OpenBox
kernel (hd0,0)/openbox-isolinux/vmlinuz livecd=openbox fromusb root=LABEL=LiveOS acpi=on fstab=rw,noauto vga=791 splash=silent
initrd (hd0,0)/openbox-isolinux/initrd.gz

title   PartMagic
kernel (hd0,0)/pmagic/bzImage edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw loglevel=0 vga=791 livemedia noeject max_loop=256 keymap=uk
initrd (hd0,0)/pmagic/initramfs

title Memtest
root (hd0,0)
kernel /boot/memtest-4.00.bin
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6893


MLU


« Reply #11 on: June 20, 2010, 06:21:40 AM »

This thread will hopefully be replaced in time by the following threads

http://www.pclinuxos.com/forum/index.php/topic,74878

http://www.pclinuxos.com/forum/index.php/topic,74879

which deal with the 2010.1 ISOs of the various 'flavours' of PCLinuxOS.

Thanks for trying this scheme, and I hope the new threads can be useful.

regards.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM