PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 26, 2012, 05:50:47 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Manually Create a LiveUSB Flash Stick plus various enhancements - 2010/2012  (Read 9148 times)
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6885


MLU


« on: June 20, 2010, 04:45:38 AM »

UPDATE:
                The processes described in this tutorial are now all packaged up nicely for you to use. So if you do not want to do things manually there is no need. You can just read the posts here to understand what is happening and so be able to manage your Live USB devices with more confidence.
  The utility should be available soon in the repository. Look out for
                   PCLinuxOS-liveusb

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

This thread is for information and will require a few posts to complete so please bear with me while I try to get it all together.

Although these posts emphasise the use of a Flash Disk, the method can be used on other drives also.

This is intended to be a general guide with specifics dealt with in the help section for those requiring such information.



**********

Live USB Flash Stick PCLOS 2010.07


OK, this first post deals with an overview of a manual means of what needs to be done to achieve a bootable USB flash drive that runs PCLOS live.
For those who want just a simple bootable flash drive maybe one of the GUI methods of achieving the same result would be more suitable. For those who wish to expand what they can achieve I believe this method is more suitable.

Overview

The Flash Stick

Get a flash stick -- minimum size 1GB, but the larger the better for future expansion of its capabilities. 8GB or more flash sticks are now much more reasonably priced.

I have found it advisable to run fdisk -l on the new flash sticks as they can have some weird partition table when purchased. If something odd shows up in the fdisk report, IMO it is best to replace that partition table with a standard DOS partition table, again using fdisk.

Create one large partition on the stick, labelled LiveOS, and formatted to ext2/3
Adjust permissions to ensure that you have write permissions on the partition.


The Operating System

Extract from the KDE ISO of PCLOS, the isolinux directory and the livecd.sqfs file, and copy them to the flash stick. Ark is good for this.

Create an empty 'boot' directory on the stick.
Copy the Grub directory and all its files from the /boot/ directory of a running PCLOS, to within the 'boot' directory of the flash stick.

Edit the menu.lst file on the flash stick ....  found in /boot/grub/ .... by deleting all the existing boot stanzas, and copy in this stanza


Code:
title   PCLinuxOS 2010.1 KDE
kernel (hd0,0)/isolinux/vmlinuz vga=788 livecd=livecd fromusb root=Label=LiveOS  acpi=on fstab=rw,noauto
initrd (hd0,0)/isolinux/initrd.gz


Making it Bootable

Install Grub to the MBR of the flash drive, using the files available on the stick in the /boot/grub  directory.
Details for using the Konsole to do this are posted in the help thread.

*******

More specific details about some of the above procedures can be added to the Help thread, if required.

*******

Your flash stick should now be bootable in any PC with the facility to boot a USB stick.

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

Posts: 6885


MLU


« Reply #1 on: June 20, 2010, 04:46:11 AM »

Persistence

Persistence is the ability of the live USB stick to have changes made to its operating system and have those changes retained for the next and subsequent boots.
The changes a user might make include installing extra applications or maybe changing the Desktop theme or such.

The 'changes' are stored on the flash stick, so sufficient room is needed of course, which is one of the reasons for a large as possible flash stick as mentioned above. The booting system will include those changes if told to do so, by a boot option.

So when the 'changes' boot option is first used the system will create the required directory on the stick and populate it with any changes the user makes.
On subsequent boots with the 'changes' boot option in place, it will pick up those changes and apply them. You then run a 'changed' OS.

If the user wishes to boot an unchanged OS all is required is to use a boot stanza that does not include the 'changes' boot option, in which case the 'changes' stored on the stick are ignored.

So, to add the changes option to the stick created in the first post, what I do is to edit the /boot/grub/menu.lst file adding another boot stanza which includes the 'changes' boot option.
I then have the option to boot with or without the changes I have made.

The second boot stanza - to be added to the menu.lst file - is as follows


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



That's it for the moment regarding persistence.

Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6885


MLU


« Reply #2 on: June 20, 2010, 04:47:19 AM »

Multi-Boot

In this post we will move on a little bit.
Here we will deal with having more than one live OS available on the same flash drive.
Of course this will not be possible due to size constraints if the stick is too small to accommodate the extra versions. Another good reason to use as large a flash drive as you can.
All versions of PCLOS have the OS files named the same, so to add more would be rather confusing. To avoid this, we rename the files, according to their version, and make changes to the boot stanzas to reflect the new names of the files.

So on the assumption that the first ISO used was for the full KDE release, we would rename the
livecd.sqfs
to
kde.sqfs

and the directory
isolinux
to
kde-isolinux

Now edit the menu.lst file to reflect those edits to the names. The new boot stanzas should look like this after editing


Code:
title   PCLinuxOS 2010.1 KDE
kernel (hd0,0)/kde-isolinux/vmlinuz vga=788 livecd=kde fromusb root=Label=LiveOS  acpi=on fstab=rw,noauto
initrd (hd0,0)/kde-isolinux/initrd.gz

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


At this point it is advisable to check the booting of the stick to ensure that the edits were correctly performed.

Now, using the same procedure as outlined in the first post, we can extract the OS files from the OpenBox PCLOS ISO.

Rename the files to ensure it is obvious they are the OpenBox files ...  to maybe

ob.sqfs
ob-isolinux

Add a stanza to the menu.lst file to boot this new OS.
Use the same boot options as before, just changing the name of the files to suit the new names.

Code:
title   PCLinuxOS 2010 OpenBox
kernel (hd0,0)/ob-isolinux/vmlinuz vga=788 livecd=ob fromusb root=Label=LiveOS  acpi=on fstab=rw,noauto
initrd (hd0,0)/ob-isolinux/initrd.gz


At time of writing, persistence is not available on versions other than KDE. Hopefully we will soon have new ISOs for the other versions which should include the persistence option.

You should now have the ability to boot either KDE or Openbox from your live USB flash stick.

You can now add as many of the PCLOS variations as you have space for on the stick, using the same procedures.

{ You can of course use whatever naming scheme you wish, the above being just suggestions }

So there we have it ......  a multi boot USB flash stick.

Even more FUN!!!!
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6885


MLU


« Reply #3 on: June 20, 2010, 05:35:47 AM »

Multi-Boot with Multi-Persistence

It is hoped that when updated ISOs become generally available that this subject will be addressed.


In the meantime, comments and criticisms should be posted to the help thread for consideration.

Please be gentle   Grin

http://www.pclinuxos.com/forum/index.php/topic,74879
Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6885


MLU


« Reply #4 on: September 13, 2010, 12:15:46 PM »

Multi-boot with persistence took a back seat for some time while the main procedure was being packaged up for users.

That is now complete.

I hope it proves useful to those who try it.

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

Posts: 6885


MLU


« Reply #5 on: November 25, 2010, 03:10:37 PM »

Copy2RAM

Copy2ram has not been available using the methods described here, and included in the PCLinuxOS-liveusb creator package.

This was due to the renaming of the OS files which was not accommodated in the mylivecd set up when creating an ISO. The renaming takes place to allow more than one version of PCLOS to reside on a partition, with another one, without any interference between them.

I am happy to announce this has now been attended to, and the new version of mylivecd will produce ISOs which will allow those of us booting them from USB devices by using the liveusb creator utility, to also use the 'copy2ram' boot code.

You must of course have sufficient ram for the purpose.

This would be an example of the boot stanza for such an OS ....

Quote
title   PCLinuxOS 2010 OpenBox
kernel (hd0,0)/ob-isolinux/vmlinuz vga=788 livecd=ob fromusb copy2ram root=Label=LiveOS  acpi=on fstab=rw,noauto
initrd (hd0,0)/ob-isolinux/initrd.gz

Also, for those interested, copy2ram will also work along with 'Persistence' and even save any changes you may make while running from RAM.

All looking good so far.   Grin

P.S.  Yes I know ....  multiboot with persistence on multipe OSs .... it is still on the todo list   Grin

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

Posts: 6885


MLU


« Reply #6 on: November 28, 2010, 01:58:15 PM »

Out of date info deleted



Logged
Was_Just19
Hero Member
*****
Offline Offline

Posts: 6885


MLU


« Reply #7 on: December 28, 2010, 07:17:04 PM »

The instructions in the preceding post about setting up multiboot persistence can be ignored for all 2010.12 ISOs.

For the present, just use a copy of the first persistent boot stanza, with changes to the OS file names, for subsequent OSs installed to the partition.

In the new year an updated version of the creator utility will incorporate the new boot stanzas by default.

The boot options now can be

standard boot
boot with persistence
copy to ram
boot with persistence AND copy2ram

Those four boot options will be available for each installed OS in a partition, thus giving multiboot with persistence and copy2ram.

Hopefully this is close to achieving all the intended functionality of this utility.

If you think there is some desirable function missing that would be useful, please post about it in the help thread -- link in first post.

Thank you all.

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

Posts: 6885


MLU


« Reply #8 on: February 04, 2011, 11:15:59 AM »

The new version of the utility is nearing completion .....  it is about to go into final testing unless something unexpected occurs.

All remasters made with the updated mylivecd utility will have these extra functions available also .....  just as in the official ISOs.

For those of you interested in testing the new version, please keep a watch on the 'testing' section. I hope the updated version will be released to testing in a couple of weeks.

Here's hoping  Grin

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

Posts: 6885


MLU


« Reply #9 on: March 03, 2011, 05:55:53 AM »

Version 0.9.5  is now in the repository and those of you who have earlier releases installed should see the update.


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

Posts: 6885


MLU


« Reply #10 on: December 16, 2011, 06:16:31 AM »

It has been quite a while since an updated version was released.

I hope to be able to have the new version in the repos soon.

There are several enhancements and a couple of bug-fixes included.

The user will have greater control over what is added to the boot menu as well as being able to control where grub is written - or indeed if Grub is rewritten.

The user can select to write Grub to the boot sector of the partition; to the MBR of the drive; or not to write Grub at all (only adding the boot stanzas selected to the menu.lst file).

By not writing Grub unnecessarily, the life of the flash drive is not unduly shortened.

Still some testing to be done and then a couple of translations, before it gets packaged.

Hopefully we will have it for the new year.

Happy Xmas and New Year to all  Wink

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

Posts: 6885


MLU


« Reply #11 on: January 25, 2012, 10:38:34 AM »

This is just a notification that the latest version of LiveUSB Creator has been packaged and will hopefully hit the repositories in the next couple of weeks.

I hope we will get feedback about the extra functions included as well as all other comments.

If you think it can be improved, please let us know.

Have fun!  Cheesy
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