How To: Persistent Live LMDE USB Install

Archived topics about LMDE 1 and LMDE 2
kurtjavier

Re: How To: Persistent Live LMDE USB Install

Post by kurtjavier »

Hi, i've just follow the instructions and works great, the live USB works fine and the persistence too. But I have a problem, I updated the live usb (including kernel and running the live usb) and now doesnt want to boot =S, this is a capture from the error:

[url=http://imageshack.us/photo/my-images/854/t1as.png/][img]http://imageshack.us/a/img854/7747/t1as.th.png[/img][/url]

this is the syslinux.cfg file entry

Code: Select all

label ubnentry1
menu label Default
menu label ^Live (686-pae failsafe)
kernel /ubnkern
append initrd=/live/initrd1.img boot=live persistence config memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal
Is a Debian wheezy distribution. I don't know how fix it, and I already look searching in google and nothing. Please if anybody knows how fix it, help me. I need the live USB to work in my job =S.
TomRoche

LMDE-201403? multiboot?

Post by TomRoche »

Thanks for this detailed tutorial--it looks like a lot of work went into it! Yet I still have questions :-) regarding a usecase: I'd like to have a single USB drive able to multiboot several LMDE-201403s (cinnamon-64, mate-64, mate-32) to use to test on several PCs. Hence I'd like to know (apologies in advance if these are Really Stupid Questions :-)

Regarding the instructions: has anything significant changed in the past year, from LMDE-201303 to LMDE-201403 ? If so, what? or should I be looking for a newer tutorial?

Regarding the target USB drive (on which one wants to install the bootable liveUSB partitions): should or must the target drive be blank? or can one install bootable liveUSB partitions onto a USB drive that already contains files? (Latter sounds risky, but the drive on which I'd like to install already has 125 GB, which would be tedious to move.)

And specifically regarding the boot and persistent partitions:

1. Can one boot different OS from the same USB drive? I assume one can and that `unetbootin` takes care of that, but ICBW.

2. If one *can* one boot different OS from the same USB drive, and they're all LMDEs:

2.1. is this reliable, or failure-prone?

2.2. are there any special instructions for creating the persistent partition for each LMDE? or does one just repeat steps 5-8 for each LMDE persistent partition?

3. If one *can* one boot different OS from the same USB drive: does it matter which OS they are? I'm not planning on booting Windows, MacOS, etc, but would like to know if I could add those to the USB drive in future if desired.

TIA, and thanks again for taking the time to produce this tutorial.
kwatson512

Re: How To: Persistent Live LMDE USB Install

Post by kwatson512 »

@TomRoche,

First, thanks for the feedback. I'm glad you found this useful. Second, I'm no longer using LMDE. I switched to Mint 16. The reason for that was that some of the update packs in LMDE broke my USB installation and I had to start over, several times. I still like the concept of a semi-rolling distro based on Debian, but find that Mint main "just works" and gets out of the way so I can just use the computer as a tool.

That said, I think I can answer some of your questions. Others may want to chime in.

Has anything changed in the last year? I can't say, since I haven't used the latest version. The biggest change before that was the new label needed for the persistent partition, which I was fortunate to add to the tutorial.

Does the USB have to be blank? In my experience, it does not have to be blank. I have used and re-used USB drives with data on them to install and run multiple distros with Unetbootin, and have never lost a file.

Can you run multiple distros from the same USB drive? I think it is possible, but it might not work well with Unetbootin. Unetbootin writes menu files and folders using the same labels every time it installs a live distro, so if you use it to install a second one, you might inadvertently overwrite something needed for the first one. I've never tried that, so you might want to experiment and report back, or someone else can chime in. I do know you can install to USB as if it were a hard drive (do a full installation), and then GRUB takes care of multiple distros on the same drive (of course, that involves partitioning the drive as you would a HDD or SSD). But in my experience, a full install on a USB drive is painfully slow in operation. You're limited to USB throughput - better with USB 3.0, but not really useful for day-to-day work.

Can you create multiple target persistent partitions for different LMDE versions? I think so, but I haven't done this, either. This would be more involved than just changing the syslinux.cfg file to add persistence (and somehow adding a label for each target persistence partition). The "live-rw" hook is somewhere else (vmlinuz? preseed?) and would probably involve translating from hex, rewriting those labels, and recompiling. Again, I've never done this.

I would suggest carrying a separate USB stick for 32-bit and 64-bit versions of LMDE. You can load both of those up with both Cinnamon and MATE and select the one you want at login. If you want to do everything from a single stick, I'm afraid you'll need more programming expertise than I can provide.

:)
bjd5882

Re: How To: Persistent Live LMDE USB Install

Post by bjd5882 »

Thanks so much for the guide. It was indispensable for creating a persistent live LMDE usb install based on LDME 201403 MATE Edition. The only alteration necessary for LDME 201403, was to rename the live-persistence.conf file to persistence.conf
Jeff11

Re: How To: Persistent Live LMDE USB Install

Post by Jeff11 »

I'm trying to run Mint 16 KDE with persistence using Unetbootin. Is the persistence still a 4 GB limit with no way to manually change that limit? I've attempting to install about 6 times with 9GB and it gives me a "corrupted kernel" error but the check shows my file is fine. Any other insights to get this running on a 16GB sandisk would be great!

Thanks,
Jeff
kwatson512

Re: How To: Persistent Live LMDE USB Install

Post by kwatson512 »

Yes, you can configure a larger persistence partition if you want. This tutorial is only for the LMDE version of Linux Mint, though. It WILL NOT WORK for main Mint.

That said, I run Mint 16 Cinnamon on a 32 GB Corsair Voyager USB stick, with half of that reserved for persistence. It's actually simpler than what is required for the LMDE version.
1. Install using Unetbootin, with a small persistence partition (128MB will do). (You're not actually going to use the one you create with Unetbootin.)
2. After installing to the USB stick, boot to make sure it works, then reboot into any live distribution.
3. Use Gparted or other partition manager in the live distro to create your persistence partition. Make it whatever size you want, leaving plenty of space for the FAT-32-formatted partition to hold and run Mint. Format the persistence partition to ext2, 3, or 4 (you might want to do some research on the advantages and disadvantages of each). Label the persistence partition "casper-rw" (without the quotes).
4. Delete the small casper-rw partition created by Unetbootin.
5. Reboot into your USB installation, and it should use the new persistence partition.

Here is a more complete tutorial for making a Mint 16 persistent live USB: http://tuxtweaks.com/2014/03/create-lin ... -live-usb/

One tweak you'll need to know after installing: If you plan to update your system (I do), the live version includes a repository that points to a CD (which is non-existent in this case), so before updating, you'll have to uncheck the CD repository under "Additional repositories" in Software Sources or "Repositories" in Synaptic before updating.
Last edited by kwatson512 on Mon Apr 28, 2014 9:36 am, edited 1 time in total.
Jeff11

Re: How To: Persistent Live LMDE USB Install

Post by Jeff11 »

Thanks for the help. I'll give it a try and take a look at the other instructions for the Mint 16 main. I actually use 16 KDE.

Jeff
kwatson512

Re: How To: Persistent Live LMDE USB Install

Post by kwatson512 »

DE doesn't matter. KDE, Gnome, MATE, Cinnamon, LXDE, XFCE, whatever should all work fine.

The problem you ran into is a limitation in the FAT-32 file system on your USB stick. FAT-32 only recognizes a maximum file size of 4GB. So if you try to force Unetbootin or any other USB system creator to make a bigger one, it will either fail to complete or give you an error like you noticed. What both persistent live USB creation methods do is to create a second partition in a Linux-specific file system to get around that limitation. By labeling it the same as the originally created file, and then deleting the original, the boot manager will look for and find it at startup.

The difference in the two methods is because of the differing underlying architecture between Ubuntu and Debian. Mint main is based on Ubuntu, which labels its persistent partition "casper-rw". Any distro based on Ubuntu can use that name for a persistent partition. Debian uses "persistence" instead, and so for any distro based on Debian (including LMDE), you have to add the "persistence.conf" file as described in the LMDE tutorial.
LuKePicci

Re: How To: Persistent Live LMDE USB Install

Post by LuKePicci »

I found this tutorial very useful and interesting, but unfortunately I can't get my frugal LMDE installation working.

In the past year I used an ubuntu leve+persistent installation on an old XP laptop (with 32-bit non-PAE CPU). Yesterday I had the idea to switch to Mint but I sadly discovered that the 32-bit version of Mint 16 (ubuntu-based) uses a PAE kernel as default, so I can't run that on this laptop. I found that LMDE still comes with non PAE kernel into his 32.bit version, so I'm trying to boot it as a live system from my harddrive using UNetbootin (choosing C: as target drive, unetbootin allow that).

Mint boot logo appears for some seconds,then I stuck on an error message immediately after bootloader messages:

Code: Select all

modprobe: module dm-raid45 not found in modules.dep
I googled for it but the only relevant page I found here talks about Debian while simply installed on the HDD.
I also tried on different PCs and thay all fail to boot live LMDE from the internal HDD.
Anyone has a solution/idea?
kwatson512

Re: How To: Persistent Live LMDE USB Install

Post by kwatson512 »

@LuKePicci,

Question: If you are installing to your hard drive (C: in Windows-speak), why are you trying to install a live version? It would make more sense to me to do a full install instead. You could either take over the whole drive or install a dual-boot instance if you need to preserve XP or something else on that drive.

To check compatibility, have you made a live DVD of LMDE? You could run it from the DVD drive of the laptop, and if everything works, then install.
LuKePicci

Re: How To: Persistent Live LMDE USB Install

Post by LuKePicci »

The idea of a full installation is surely the best solution for a standard pc. However, the reality is a little bit different, since I have some needings I'd like not to explain, keeping the problem simpler and avoiding OT.
I'm already using ubuntu in the same configuration without any problems. I've not tested LMDE while booting from live DVD, but as I said in my previous post, I got the same exact error message while trying a simple frugal installation (ie live+persistence from hdd) on a totally different pc (5 years newer).

I will try to boot live LMDE from USB hdd and see what happens.
tone303

Re: How To: Persistent Live LMDE USB Install

Post by tone303 »

I found out that as of May 2015 and Mint 17.1, the Abandonware Remastersys still works to save your system to iso so you can USB that instead of the default system.

You need to run one .deb from the first directory and one .deb from the 3rd directory and then it appears in "administration"

You need not do anything except:

terminal:
gksu caja

browse to the home folder, Hold down Ctrl then type H + A + C || in the same window, browse to /etc/skel and Crtl + V

press the DIST button in remaster sys and wait a while for it to be done

the .iso is in /home/remastersys/

If you choose not to try to get larger persistence to work and are limited to 4 GB, consider your free space on your USB not wasted, but there for dynamic wear-leveling and additional storage. the following Terminal Command or "Add to Panel Custom Application Launcher" command will bring you to your real-free space, outside of the persistence virtual free space:

gksu /cdrom

with the default fat method You have two kinds of free space with these systems. the free space within the persistence and the actual free space outside the system.

Dont worry, your free space on the USB Drive isnt wasted, its wear-leveling space and like owning more than one USB
tone303

Re: How To: Persistent Live LMDE USB Install

Post by tone303 »

sick of firefox blocking outdated flash player but dont want to run update but once every 3 months on a USB?

then change extensions.blocklist.enabled to false.
tone303

Re: How To: Persistent Live LMDE USB Install

Post by tone303 »

Why is step 8 needed?

Shouldn’t everything be done after step 7 in terms of making a new persistence that is not limited to 4 GB? Step 8 will cause a lot of problems. Why users and passwords? is that relevant to getting the new larger persistence partition working, or did you just add that so people's live systems are secured?
tone303

Re: How To: Persistent Live LMDE USB Install

Post by tone303 »

is there a way to make the whole system to copy to RAM and then boot from the RAM disk by ONLY adding lines to syslinux.cfg and refreshing grub?
tone303

Re: How To: Persistent Live LMDE USB Install

Post by tone303 »

kwatson512 wrote:Yes, you can configure a larger persistence partition if you want. This tutorial is only for the LMDE version of Linux Mint, though. It WILL NOT WORK for main Mint.

That said, I run Mint 16 Cinnamon on a 32 GB Corsair Voyager USB stick, with half of that reserved for persistence. It's actually simpler than what is required for the LMDE version.
1. Install using Unetbootin, with a small persistence partition (128MB will do). (You're not actually going to use the one you create with Unetbootin.)
2. After installing to the USB stick, boot to make sure it works, then reboot into any live distribution.
3. Use Gparted or other partition manager in the live distro to create your persistence partition. Make it whatever size you want, leaving plenty of space for the FAT-32-formatted partition to hold and run Mint. Format the persistence partition to ext2, 3, or 4 (you might want to do some research on the advantages and disadvantages of each). Label the persistence partition "casper-rw" (without the quotes).
4. Delete the small casper-rw partition created by Unetbootin.
5. Reboot into your USB installation, and it should use the new persistence partition.

Here is a more complete tutorial for making a Mint 16 persistent live USB: http://tuxtweaks.com/2014/03/create-lin ... -live-usb/

One tweak you'll need to know after installing: If you plan to update your system (I do), the live version includes a repository that points to a CD (which is non-existent in this case), so before updating, you'll have to uncheck the CD repository under "Additional repositories" in Software Sources or "Repositories" in Synaptic before updating.
are you saying We only have to make a new partition and merely label it casper-rw, delete the other casper-rw, and not tell any conf file how to use the partition??
kwatson512

Re: How To: Persistent Live LMDE USB Install

Post by kwatson512 »

@tone303,

Yes, that's all it takes for main Mint. That's the USB configuration I use now. Note again, this will not work for LMDE.
tone303

Re: How To: Persistent Live LMDE USB Install

Post by tone303 »

kwatson512 wrote:@tone303,

Yes, that's all it takes for main Mint. That's the USB configuration I use now. Note again, this will not work for LMDE.
Thats great. and so it will just grow on-demand until the casper-rw partition is filled? thats better for flash memory than a virtual disk with the free space inside of a file. the flash memory controller see's that free space as taken. If any boot problems after this, flag the original FAT part as the boot partition.

I have a tip for those who still use Remastersys to first customize a system, then usb-creator-gtk to make a USB with a FAT 4 GB persistence file.

When you first make your USB, write all zeros to the virtual free space*(see below dotted line). Then go into another system, copy casper-rw onto another drive, and RAR the casper RW file into a rar like restore.rar, with compression method set too "Good" and a 3% recovery record, (ECC for file corruption)

delete the copy of casper-rw that you moved to the other drive to compress, then Put the Restore.rar on the root of the USB. You now have a Factory Reset / system recovery file, to reset the USB back to its original state , akin to those recovery partitions that come with windows computers. To revert USB back to first-created state, UnRAR it with "extract here" and press Yes to overwrite existing files. Or you can experiment within the USB its self to see its capable of over-writing its self with the unrar command in a script.

I did this and my 4 GB casper-rw file is compressed to just 147 MB due to writing zeros before shutting down & compressing in another OS.


-------------------------------------

* - how to write all zeros to the free space

Terminal

Code: Select all

dd if=/dev/zero of=wipe_file
Go to home folder, and Shift + Del the wipe_file

shut down immediately, go into another system, and TAR or RAR the casper-rw which will now compress a lot due to being mostly zeros. So small, that the backup fits onto the root of an 8 GB USB , if the initial system squash fs is under 2 GB and the persistence is a full 4



These instructions are for backing up the conventional casper-rw 4 GB persistence file into a tiny file only 150 to 250 MB. You can give bootable USBs as gifts and tell the person how to save bookmarks regularly and what to do to reset USB back to state of first boot.
habanany

Re: How To: Persistent Live LMDE USB Install

Post by habanany »

I just installed mint 17.2 Rafaela on a 4gb usb persistent and after installed, I deleted a few apps brasero pidgin banshee libreoffice thunderbird and Tomboy notes, the i did sudo update & upgrade and rebooted and my mint is working perfect :lol:
User avatar
Oscar799
Level 20
Level 20
Posts: 10397
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: How To: Persistent Live LMDE USB Install

Post by Oscar799 »

habanany
This is the LMDE section
Posts about Main edition don't belong here and only cause confusion when tacked on to existing threads
Image
Locked

Return to “LMDE Archive”