LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 08-01-2012, 04:03 PM   #1
Cleancut Callahan
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Live Linux USB with a read-WRITE Filesystem <Bon Appétit>


[Appetizer]
Intro for Linux beginners (which the Linux supermen & superwomen can skip):

Some Live Linux distros enable a user to save their work & OS customizations inside a persistent Folder called a 'Home' Directory, i.e., in a Folder called 'Home'. This 'Home' Folder, having the “persistency” feature, saves the user's work on the USB even after the USB is removed and/or the computer is shut-down & re-started. The Home Directory is persistent because it's on a partition of the USB that is writable. However the Filesystem, a separate set of folders used for loading & running the Live Linux OS, is on a separate partition of the USB that is NOT writable (which leads to the question):


[Meat & Potatoes]
Here's the Question:

Are there any Live Linux distros that can also enable a user to make & save persistent changes to the Filesystem Folders on a Bootable USB Stick/SD Card? If there aren't any, how can one be made?


[Bread & Butter – optional]
I'd like to install/ extract software packages to the Filesystem Folders of Live Linux Operating Systems on USB stick-drives. The reason is that some programs are scripted such that they require additions & changes to the Filesystem Folders. This is a problem because, by default, some software is hard-coded to install & look in predetermined Filesystem Folders. And those default folder-settings are difficult if not impossible to change. If a user is unable to modify the Filesystem, then they can't save the software programs that they need to do their work when they are traveling. Aside from simply tasting new Linux flavors, the idea is to literally carry my entire computer (OS, files , AND Custom Filesystem Software) in my pants pocket or vest holster:

Specifically, I'm asking the above Question because I'd like to add a persistent installation of the Linux XAMPP package for web development PLUS I'd like to update the MySQL RDBMS (that comes pre-packaged in the Filesystems of Linux distros) by using newer rpm packages of newer versions as they're released – which requires write-access to Filesystem Folders that have the persistency feature.

For example:
Linux XAMPP forces installation & file/folder-referencing inside the '/opt' Filesystem Folder. Using the following command, I tried to globally find-&-replace '/opt/' with '/home/' so that XAMPP could run from the 'Home' directory instead:

grep -lir '/opt/' /home/lampp | xargs -i@ sed -i 's:/opt/:/home/:g' @

Unfortunately, it did not work because, among the scattered 1,037 files that contain multiple instances of '/opt/', many of them still needed '/opt/' in their scripts. As a result, NONE of the bundled XAMPP programs could start.


[Candy & Dessert]
If there aren't any Live distros that allow persistent OS modifications & updates, I was thinking:

This problem could be possibly solved if a Live USB has, first, a tiny read-only partition with code that starts the boot process but then points to, second, a read-write filesystem partition and, third, a read-write home-directory partition; or at least the user should have the ability to change the read-write permissions for the filesystem partition.

Does anyone know how to actually implement this or have any other techniques that could be used to solve this (excluding HDD installs and excluding booting or shooting the USB with my shoe or side-arm)?

Last edited by Cleancut Callahan; 08-01-2012 at 04:22 PM.
 
Old 08-01-2012, 04:14 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
As long as you don't want things like proprietary nVIDIA drivers then you could probably install most distros onto the USB drive as if it were a hard drive. If you wrote GRUB to its master boot record and it was using GRUB2 then you probably wouldn't even need to mess with that.
I've not tried it myself yet but I may do in the next few days, out of interest.
 
Old 08-01-2012, 10:17 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
I don't think there is any live cd that can properly do full updates. Most live cd's installs that you are talking about use a split sort of file system. One is the original live cd part and the other is the persistent part.

As 273 suggests, almost every distro can be used to install to a usb drive just as if it were a real hard drive. An internal and usb is basically a scsi drive to the OS. The only thing you loose is the compressed disk image. It could be replicated if you are tight on space.

I almost always create a virtual machine without a hard drive. I attach the usb device to the virtual machine and boot to the cd/dvd iso image. I then install like any normal install.

Some distro's offer a hybrid iso that can be copied to a usb. Kind of a different deal and different ways to get it to work as you want.

Things like SuseStudio can create a usb image with almost any app you want installed.

Last edited by jefro; 08-01-2012 at 10:19 PM.
 
Old 08-04-2012, 01:23 AM   #4
dru8274
Member
 
Registered: Oct 2011
Location: New Zealand
Distribution: Debian
Posts: 105

Rep: Reputation: 37
I haven't used Linux LiveCDs for a couple of years. But before that, I was quite deeply into it. And I remember that the custom LiveCDs I put together were persistent across the whole root-filesystem. So, some the above doesn't sound quite right...
Quote:
Originally Posted by Cleancut Callahan View Post
Are there any Live Linux distros that can also enable a user to make & save persistent changes to the Filesystem Folders on a Bootable USB Stick/SD Card? If there aren't any, how can one be made?
I think you should keep looking, until you find a LiveCD distro that does what you want. Because there is no technical reason that prevents persistent changes to the whole root filesystem. Seriously, most LiveCDs are based on a union file system like aufs, and changes can be saved across the whole root filesystem. But if a limitation on that exists, then it is entirely because the designer of that particular LiveCD decided to dumb things down intentionally.

But like I said, I'm not currently using LiveCDs. But if I needed to... well, I believe that Puppy Linux allows you to install new packages, with persistence. And I would look at Porteus Linux too, which is a specialist LiveCD distro. And I just can't imagine those guys tolerating half-assed persistence.
Quote:
Originally Posted by jefro View Post
I don't think there is any live cd that can properly do full updates. Most live cd's installs that you are talking about use a split sort of file system. One is the original live cd part and the other is the persistent part.
I agree that yes,the persistent changes are stored separately. But no, I don't agree that this restricts a LiveCD from installing new packages etc. Because basically, a persistent layer can store changes for the entire root filesystem. During boot up, the changes in the persistent layer are transparently superimposed over the read-only layer, and if aufs works as advertised, then everything in the root filesystem should look similar to how it would with any other filesystem like ext2.

The read-only and persistent layers are typically stored on the USB as compressed squashfs fiiles. But if the persistence layer grows large and unwieldy, then the read-only layer and the persistence layer can also be combined, to create a new larger read-only layer. And to then start anew with an empty persistent layer...
Quote:
Originally Posted by jefro View Post
As 273 suggests, almost every distro can be used to install to a usb drive just as if it were a real hard drive. An internal and usb is basically a scsi drive to the OS. The only thing you loose is the compressed disk image. It could be replicated if you are tight on space.
Well, if your PC uses usb-2.0, then your main performance bottleneck will be data transfer to/from your USB. And it could be very, very slow. Basically data transfer to/from a USB isn't fast anyway, but its data-transfer is the fastest when transferring large compressed files, which is typically what a LiveCD does. But a full-install to USB does the opposite... it's data isn't compressed, and it contains lots and lots of small files. So the data-transfer times can be large, and your cpu will be forced to sit idle, while it waits for data-transfer from the USB to catch up.

So yes, it is doable. But no, I wouldn't choose to go that way. Not if I could avoid it.

Last edited by dru8274; 08-04-2012 at 02:12 AM. Reason: adding more...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read and Write to Ext3 Filesystem from Windows onto Linux lennysokol Linux - General 34 01-22-2014 09:07 AM
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - Newbie 16 09-01-2010 09:07 AM
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - General 2 08-26-2010 03:32 PM
How can I have: Root has Read-Write, user has read only for the boot filesystem? xmrkite Linux - Software 6 10-16-2008 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 07:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration