You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Live USB sticks with persistence

Author (Read 13894 times)

0 Members and 1 Guest are viewing this topic.

Re: Live USB sticks with persistence
« Reply #11 on: April 17, 2015, 12:43:02 AM »
 

N4RPS

  • Donator
  • Platinum Level Poster
  • **********
  • 1149
    Posts
  • Reputation: 155
  • Knows JUST ENOUGH Linux to be DANGEROUS
    • View Profile
    • Orphans for Christ, Self Advocates of Mecklenburg

  • CPU: Several Different 32-bit & 64-bit CPUs, 2-8 GB RAM

  • MEMORY: 8Gb

  • VIDEO CARD: Several Different AMD and Intel GPUs
Just before I sign off, LL2.4 is supposed to support Bluetooth, but it still does not work. I need to install the PPA and use cschramm's fix to get it working. Maybe my definition of "supports" is incorrect. I expect it to mean OTB, but sadly not the case. At least there is a way to enable it. Have you found this to be the case.

Hello!

I can confirm that it seems the Bluetooth patch was not incorporated into the latest update. I upgraded to 2.4 on this netbook via LiveCD, and had to run the Bluetooth patch on it to get it enabled. I suppose it's just as well, as not all Bluetooth adapters are supported on Linux.

The super-cheap dongles from China ($1-$2 range), work like a champ. Older Broadcom-based adapters, such as the Targus ACB10US1, ARE suppoprted with the Broadcom patch, but some newer ones made by Broadcom won't work in ANY version of Linux until Broadcom writes and releases firmware drivers for them...

73 DE N4RPS
Rob


A gun in your hand is worth more than a whole police force on the phone.
 

Re: Live USB sticks with persistence
« Reply #10 on: April 16, 2015, 08:12:40 AM »
 

bugfree

  • New to Forums
  • *
  • 47
    Posts
  • Reputation: 9
  • Linux Lite Member
    • View Profile
Hi gold_finger,

Have now successfully made 3rd live USB with LL2.4. (and on an old stick).

Have stopped using Startup Disk Creator, as it also seems to be part of the problem, together with the Gparted resizing glitch.

The fat32 partition imho, must need some wiggle room to organise the install before finishing off with the ext2 partition labeling and deletion of the original casper-rw partition.

Also Startup Disk Creator only allows a minimum of 1GB persistence and crashes if this amount is not available. That is, if the pre-built fat32 is say 1.8GB, the stick will finish, but with a fatal error and won't boot properly. In some cases booted fine, but resulted in stuttering, hanging or just plain painfully slow.

Unetbootin, on the other hand allows any persistence size from zero. I made a fat32 of 1.25Gb and set Unetbootin to create a persistence of 200Mb. This worked and the final persistence file came out as 157.3Mb, which was deleted after naming the ext2 partition. So Unetbootin is smart enough to use the balance of the partition for persistence.

Have installed many new programs on these sticks and all are quick. Indeed, the snappiness of menus, updates, installs and usage is on a par with an installed system. Happy days!

Cheers!

 

Re: Live USB sticks with persistence
« Reply #9 on: April 15, 2015, 10:03:16 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
Glad all appears to be working out now.

I may have time to toy around with testing GParted on some USB's this weekend.  If so, I'll test out shrinking partitions again to see if same problems occur.  Will report back with results.


Just before I sign off, LL2.4 is supposed to support Bluetooth, but it still does not work. I need to install the PPA and use cschramm's fix to get it working. Maybe my definition of "supports" is incorrect. I expect it to mean OTB, but sadly not the case. At least there is a way to enable it. Have you found this to be the case.

I have never used bluetooth (aside from using it with a cell phone headset), so can't really offer any advice on that.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: Live USB sticks with persistence
« Reply #8 on: April 14, 2015, 02:25:23 AM »
 

bugfree

  • New to Forums
  • *
  • 47
    Posts
  • Reputation: 9
  • Linux Lite Member
    • View Profile
Hello gold-finger,

I think we are in agreement now, judging from both our experiences. The gparted method, by firstly creating a fat32 WITH nominal persistence space AND naming the ext2 part AFTER, seems to do the trick.

I agree that the system appears to get confused with 2 instances of casper-rw and lack of space in the fat32 part to initially set it all up. Proof of this, is my success a short while ago, in resurrecting an old 8gb Silicon Power stick that was giving me all sorts of trouble, including hanging and running slow.This was always a slow stick when new, but it is now quite snappy and useful.

So the lesson here for the time being, is  to avoid using gparted to resize partitions, only use it to create them.

Having mentioned the triple unetbootin menus previously, I've now noticed that this new stick is now booting only one instance of the unetbootin menu before the feather logo, so that's a win. This might have something to do with our discussion on unetbootin thinking there are two systems/partitions.

If the stick is plugged into a computer, the file manager will open up two notifications, one being the system and the other the casper-rw partition. Now that the creation of the stick is slightly different, regards the building sequence, unetbootin may have stabilised itself to recognise just one OS. I'm only guessing, though, but I'll take it.

With regard to the stick types, I'm using those tiny Sandisk Cruzer Fit sticks. They are most reliable and available up to 64Gb in size (in fact, I think they now come in 128Gb, but might be wrong on that). They are about 5mm in size, so are perfect to permanently leave inserted and run linux as a live or installed system. They don't poke out the side and my users love them as they can be left in, whilst in transit. A bit dearer than others, though!

Just before I sign off, LL2.4 is supposed to support Bluetooth, but it still does not work. I need to install the PPA and use cschramm's fix to get it working. Maybe my definition of "supports" is incorrect. I expect it to mean OTB, but sadly not the case. At least there is a way to enable it. Have you found this to be the case.

Cheers for now and thanks again!  :) :)
 

Re: Live USB sticks with persistence
« Reply #7 on: April 14, 2015, 12:04:12 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
However, booting from unetbootin displays 2 identical menus and then a third which is a condensed version, prior to displaying the LL feather logo.
Yes UNetbootin can seem a little quirky at startup -- it shows a menu and countdown, then appears to be stuck for a few seconds at end of countdown, then menu size gets re-adjusted smaller (probably after scanning for correct graphics driver and resolution to use) for a few more seconds before it actually boots the OS.  I usually just let people know this is normal and not to worry unless it actually gets stuck for more than 30-60 seconds.  I've also noticed that there are occasions when it actually does fail to boot and ends up displaying all kinds of error messages on the screen -- about 1 out of every 10-15 boot-ups.  So, I tell them to just do a hard shutdown with the power button and boot again.  Usually it's just a glitch on that particular boot-up and it's fine the next try.


I think there is a problem when using gparted to shrink the fat32 partition to it's minimum and creating an ext2 casper-rw at the same time. It may be as simple as leaving a bit of space in the fat32 partition as you suggest and not labeling the ext2, until the install to the fat32 is done.
Like I said before, as far as "shrinking" the FAT32 partition with GParted goes, I have had the same problem as you attempting to do that on USB's -- so I think you may be right that there is (or was) some kind of bug causing that.

The only reason I had that "bit of space" in the FAT32 partition was to have somewhere for UNetbootin to create a persistence file (casper-rw) and to set itself up to boot in that manner.  Technically, that extra space is not necessary for UNetbootin to boot.  For example, I could have done a non-persistent install; shrunk the FAT32 partition as far as it could go; added an Ext2 partition labeled "casper-rw" after the fact; and then simply added "persistent" to the boot parameters of UNetbootin.  (I did that a while back also and it worked fine.  At that time I didn't have the shrink problem with GParted.)


As for the Ext2 partition being labeled "casper-rw" -- yes, you only want to label it AFTER you've installed to the FAT32 partition.  I'm guessing (because I've never tested this) that the presence of  both a casper-rw file and a casper-rw partition on the USB would cause confusion during boot-up.  I think the system can only use (and is only expecting to see) one.  (Again, this is just an educated guess.  I could be wrong.)


My difficulties seem to stem from reusing sticks which somehow get corrupted.

What I usually do before reusing one is wipe everything out on it with GParted first.  Try this in GParted on one of your used sticks:
  • Delete any partitions on it, then "Apply" those deletions (Edit -> Apply All Operations).
  • Create a brand new partition table on it:  Device -> Create Partition Table -> "msdos -> OK.
  • Create your desired new partition(s) -- in your case a FAT32 partition 200MB bigger than the ISO file and an Ext2 partition for rest of space that you can switch the persistence to after the USB is created.
  • "Apply" those new partition changes (Edit -> Apply All Operations).
Hopefully that gets them working again.  The only time I've had problems on mine is if they're particularly old and I've done many, many versions of bootable ISOs on them; or, when I've used seriously cheap no-name brands which tend to get corrupted after only a few times of doing that.


What is your opinion of usb sticks. I have quite a few different brands. Some, though are very slow, whilst others are markedly faster. I thought they were all basically the same speed
One would think that all "USB 2.0" sticks would behave the same and all USB 3.0 sticks would be the same, but you're right -- they're not.  The quality of the flash memory used in them can vary quite a bit.  Very generally speaking, the really cheap no-name brand are more likely to perform badly.  But that doesn't mean that some of the bigger names are always best.  Many times they have different product lines of their USBs, some of which may not be that great either.  What I always do is check out the ratings that people give them on Newegg.com (a computer parts website) or similar site before I buy any.  From my own experience, brands I've been satisfied with are:  Adata, Patriot, Sandisk and Kingston.


Have you tried installing LL or any other distro to an SD card and would this be a better/faster option.

I have not done that, but I'm pretty sure others here have so they'll be better able to answer this.  If you're BIOS will allow booting from an SD card, go ahead and test it out.  I know people have done full installs to SD cards just fine.  "Live" installs?  I don't recall, but I'd guess that you shouldn't have any problems doing that either.


And just another point which may be outside your field. I load Googleearth (same version) on all the computers I set up, as the users like this program. In LL, however, it is extremely slow to the point of being unusable.
Sorry -- I don't have any experience with Google Earth.  Find your old post on that subject and "bump" it asking for help again.  Maybe it just got lost down the memory hole on the forum and if you bump it back to top of the list someone may be able to help this time.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: Live USB sticks with persistence
« Reply #6 on: April 13, 2015, 11:30:14 AM »
 

bugfree

  • New to Forums
  • *
  • 47
    Posts
  • Reputation: 9
  • Linux Lite Member
    • View Profile
Hi gold_finger,

Thanks for your comprehensive tutorial. I have used this method before from memory, but nevertheless, repeated your steps just to check, and, as expected, this method worked fine.

Unetbootin seems to be the preferred option and I have had more success with it than startup disk creator. However, booting from unetbootin displays 2 identical menus and then a third which is a condensed version, prior to displaying the LL feather logo. Not sure why, but this is the reason I've preferred startup disk creator, as it boots straight to the feather logo, which avoids a "why" question from new users. So, first test successful.

I'll try replicating using startup disk creator and see if the result is the same. I think there is a problem when using gparted to shrink the fat32 partition to it's minimum and creating an ext2 casper-rw at the same time. It may be as simple as leaving a bit of space in the fat32 partition as you suggest and not labeling the ext2, until the install to the fat32 is done.

My difficulties seem to stem from reusing sticks which somehow get corrupted. All in all, the straightforward method you outline looks best at this point. More testing on my part, but I still think gparted has difficulty with fat32 resizing, at least in the latest version.

On the plus side, I have today introduced 2 more users to LL and successfully created usb sticks with persistence, but using startup disk creator. However, I used brand new sticks, which startup disk creator seems to have no difficulty with. It's when I re-use these sticks that problems emerge.

And on an entirely different matter. What is your opinion of usb sticks. I have quite a few different brands. Some, though are very slow, whilst others are markedly faster. I thought they were all basically the same speed, unlike SD cards which have the speed numbers printed on them. 10 being the fastest, as far as I'm aware. Is there a way to tell which is a fast stick.

Have you tried installing LL or any other distro to an SD card and would this be a better/faster option. 

And just another point which may be outside your field. I load Googleearth (same version) on all the computers I set up, as the users like this program. In LL, however, it is extremely slow to the point of being unusable. There are lost pixels in the display, which I'm unable to correct.

I think it's an LL problem, as booting Mint13 with GE installed, and on the same machines, is perfect and fluid. Only plays up in LL.

BTW, in LL and in Firefox and running "showmystreet" which uses Google maps, the display is perfect. So I think the video driver is well capable of displaying the maps, but LL must be choosing an incorrect driver. I don't know how to force GE to use a different driver. Any thoughts on this. I did post about this some time back, but replies were unhelpful and the problem remains unsolved.

Cheers for now!  :)

 

Re: Live USB sticks with persistence
« Reply #5 on: April 12, 2015, 06:46:00 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
@bugfree,

Not sure why you're having a problem creating persistence.  I just ran a test doing the steps I outlined above and had no problems.  Here's what I did.

  • On my LL 2.0 desktop machine I used GParted to create a 2GB FAT32 partition and a 30GB Ext2 partition (no label on Ext2 at this point) on a 32GB USB stick.  (USB stick is approx. 1-yr old Kingston.)
  • Using UNetbootin, created live Mint Xfce 17.1 (64-bit) USB directing it to use the 2GB FAT32 partition.  The ISO file is approx. 1.6GB, so made a persistence file of approx 400MB to take up rest of 2GB size.
  • Booted the live USB on different computer to make sure it worked after initial creation.  It did work (including persistence).  Shutdown live environment; then plugged it back into my LL desktop machine.
  • Opened GParted again and labeled the Ext2 partition as "casper-rw".
  • Mounted the 2GB FAT32 partition on the USB and opened it with file manager.
  • Found and deleted the "casper-rw" file on the FAT32 partition.
  • Unmounted and ejected the USB.
  • Booted other computer again with the USB.
  • Worked again and this time persistence showed it was approx. 30GB instead of 400MB.
So, for me everything seems to work fine.  (I didn't try to resize the USB partitions in GParted -- that probably still fails.  But creating them from scratch works fine.)
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: Live USB sticks with persistence
« Reply #4 on: April 12, 2015, 12:49:52 AM »
 

bugfree

  • New to Forums
  • *
  • 47
    Posts
  • Reputation: 9
  • Linux Lite Member
    • View Profile
Hi LL-user and gold_finger,

Great info in your replies! Thank you! Will try these as time permits!

The main trouble I'm having right now is the difficulty in creating persistent usb sticks using recent linux distros. Of course my main OS is LL, which I think is just a wonderful OS but because of my probs, I've experimented with other distros, mainly deb or ubuntu.

What I've found is similar with most, if not all.

Initially I suspected my machine, but have now eliminated this, as I'm on my 4th separate test computer. Not mine (if I could be so lucky) and the results are the same.

So far, I think I have discovered a bug in gparted (the version included in the distros) by this reasoning. Using gparted in LL and the other similar distros with my method of minimizing the fat32 and creating a discrete ext2 partition, causes GP to exit without changing the stick. Using the same stick and repeating the GP procedure on my old computer running Mint9 resizes and partitions the stick, perfectly.

Additionally, I'm getting mixed results with sticks created in whatever method I use in my experimenting. Have noticed that these sticks sometimes will not boot at all, others will boot but hang or just go slow. Firefox 37.01 and 36.01 are now slow to load pages and frequently just stop, as if congested. Thunderbird also frequently crashes or hangs. If left long enough it will finally close.

Anyway, all in all, I think I'm chasing multiple problems and it's a matter of tracking them down one by one.

All this, whilst interesting and demanding, is quite frustrating when I just want to quickly create LL sticks with persistence and farm them out to update the various people I support. I also noticed my old machine with Mint9 on a celeron machine runs faster, is fluid, FF (15) is much better and a delight to use. All these newer OS's seem to have degraded performance IMHO.

Perhaps some of these problems could be attributed to privacy/security issues, init/systemd changes, cheap sticks etc. Just a thought! Lots of things to sort out that were not an issue several years back.

However, I'm still plugging away. Will post results as found, but will first try your suggestions. Need to buy a few more sticks beforehand, though.  :)

 

Re: Live USB sticks with persistence
« Reply #3 on: April 11, 2015, 06:53:58 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
Hi All,
Just playing around with this project again, but have hit a snag. Latest Gparted seems to have a bug.

When resizing a fat32 partition, the setup is accepted, but on pressing Enter, the program exits. No changes are made to the stick. Repeating the operation on an older version of Gparted will resize the partition perfectly. Only happening on latest linux distros with gparted included.

Anyone else encountered this.

@bugfree,

Yes, I've encountered same problem trying to resize USB partitions with GParted.  Not sure what's causing that and haven't had time to look into it more myself yet.


Regarding problems creating live USB's with persistence, I haven't run into problems with that -- but I haven't tried doing it the way you are attempting in quite a while.  You're trying to get around the 4GB persistence size limit by using a separate (bigger) Ext2 partition.  I've done that too, but not recently.  Since you're having problems resizing USB partitions, here is what I would suggest going strickly from memory of the last time I did this.  (I used UNetbootin at the time instead of DD, so that's what I'll post here.)
  • On your USB stick, make one FAT32 partition slightly bigger than the ISO file you're using -- approx 100-200MB's bigger.
  • Also make a second partition on it that covers the rest of the space, formatted as Ext2, but don't label it yet.
  • Direct UNetBootin to make the live USB on the first (FAT32) partition and have it set to use persistence.  (The persistence file that gets created will only be 100-200MB's in size -- the difference between the size of ISO file and total size of FAT32 partition.)
  • Close UNetbootin when it completes and "safely" remove the USB stick.  (Make sure you select to "unmount" or "eject" it; don't just pull the stick if it's mounted.)
  • Wait 15-30 seconds, then plug the USB back into computer.
  • Use file manager to find the "casper-rw" file on it and delete it.  (Note:  you're not booted into the USB stick for this -- you're still in your regular LL system, or whatever distro you're using on the computer.)
  • Close file manager, then open GParted and display the USB stick.
  • Right-click the big Ext2 partition and choose "Label".  (If that partition is mounted, you'll need to unmount it first -- right-click it, choose "Unmount", then proceed with labeling it.)
  • Label that partition as "casper-rw" (lowercase letters, no quote marks).
  • Close GParted.
  • Now, when you start from the USB stick it should have persistence enabled but using the big Ext2 partition for it instead of the small casper-rw file that it had set initially.
Hopefully my memory is correct on steps above.  Advantage of that is you don't have to go back and resize anything -- partitions are sized ahead of time.



Unfortunately I can't find the resource at the moment but I remember having read something about the different architecture of USB sticks that supposedly makes a huge difference for usages like ours.

@LL-user,

If you happen to stumble back on to that info, I'd be interested in seeing it.
« Last Edit: April 11, 2015, 06:56:34 AM by gold_finger »
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: Live USB sticks with persistence
« Reply #2 on: April 11, 2015, 01:17:37 AM »
 

LL-user

  • I come here a lot
  • *****
  • 455
    Posts
  • Reputation: 214
  • Linux Lite Member
    • View Profile
Hi bugfree,

That's a tough one and I can very much relate to that frustration.
Therefore I have reduced the use of USB sticks as much as possible and prefer portable hard drives. I know, the physical size...

The way I have played around/ worked with it has been a bit different as I didn't utilize casper but set up sticks to boot into several iso files, either via grub2 or extlinux (=syslinux), both bootloader available, i.e. launching GRUB2 via extlinux if necessary. The worst was using FAT partitions, so I sometimes used ntfs and of course ext file systems.

Unfortunately I can't find the resource at the moment but I remember having read something about the different architecture of USB sticks that supposedly makes a huge difference for usages like ours.

At least trying to contribute something constructive to your issue:

1. Did you try booting the USB stick before resizing the FAT32 partition?

2. Have you tried to re-install sys/extlinux after resizing?

3. Maybe also worth trying: not resizing the FAT32 to minimum but leaving it a few MB bigger than necessary

4. Have you tried SDcards? Especially the microSDcards in an USB adapter offer an amazing size opposed to USB sticks. And maybe they don't have the flaws of the newer sticks? The ones I played with worked fine.

Hang in there, there is always a solution! :)
« Last Edit: April 11, 2015, 07:53:54 PM by LL-user »
 

Live USB sticks with persistence
« Reply #1 on: April 09, 2015, 11:35:24 PM »
 

bugfree

  • New to Forums
  • *
  • 47
    Posts
  • Reputation: 9
  • Linux Lite Member
    • View Profile
Hi All,
Just playing around with this project again, but have hit a snag. Latest Gparted seems to have a bug.

When resizing a fat32 partition, the setup is accepted, but on pressing Enter, the program exits. No changes are made to the stick. Repeating the operation on an older version of Gparted will resize the partition perfectly. Only happening on latest linux distros with gparted included.

Anyone else encountered this. I've tried on 2 different computers running LL and the same behaviour is exhibited.

The next problem is simply creating a usb stick. I'm using my old computer running Mint9 and Gparted and have created many functioning usb sticks using this computer.

Just now, I've created a live usb of LL on a brand new unused 8gb stick, resized the fat32 to minimum, and created an ext2 casper-rw partition on the remainder. All looks fine to me (done using my older reliable machine).

However, the stick won't boot. It stops on the SYSLINUX -> Boot: prompt and simply repeats the boot sequence, i.e. displays the F2 and F12 options.

Could anyone advise me on how to fix this.

Also, I'm having great difficulty in creating a workable live usb with persistence lately, using new sticks. Is it possible the sticks themselves are being manufactured differently. I've made upwards of 50 sticks with persistence in the past without any dramas, but lately it's hit or miss on whether success is achieved. Something has changed and I can't put my finger on it.

Any thoughts! It's very frustrating!  :'(

 
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section