Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed Slitaz on a USB pendrive. However I can't figure out how to make it persistent automatically. There are different sources telling me different ways to make it persistent.

One told me to add slitaz home=usb to the syslinux.cfg file like this:

append initrd=/boot/rootfs.gz rw root=/dev/null vga=normal autologin slitaz home=usb

but it didn't work for me.

The handbook gave an example of how to do it manually but I didn't try it and I also want it to happen automatically.

There is an older article that also explains how to make the USB persistent but I don't want to try it 'cause it looks outdated (from 2008).

Does anyone know the best way to make the USB automatically persistent?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

I just bumped into the same thing, so I thought I'd post some notes here:

At first boot, one is being auto-logged in as tux user; the problem is:

  • tux user is "autogenerated" apparently
  • When changes are saved for persistence, apparently, the home folder of the autogenerated tux user is not saved

Anyways, here I tried installing some programs (like xvkbd) through Package Manager (Tazpanel - Packages); and to make them persistent, first:

  • Right-click on Desktop, Slitaz Live, TazUSB Writefs (gzip)

This will save a rootfs.gz file in / - this one you must copy manually to the USB flash drive, where the others (rootfs1.gz, rootfs2.gz) are - in /boot on the USB thumbdrive!

Then, you must also manually add this file to syslinux.cfg! There is another problem here - if the usb thumbdrive is FAT-formatted, then the autologin command for the tux user will fail - and you will get a login prompt/window instead; where you cannot login as tux (which has an empty password by default, otherwise); you can only login as root.

Thankfully, there is a way around this - note first, the default entry in syslinux.cfg would be like this:

LABEL sli
    KERNEL /boot/bzImage
    append initrd=/boot/rootfs4.gz,/boot/rootfs3.gz,/boot/rootfs2.gz,/boot/rootfs1.gz rw root=/dev/null vga=normal autologin 

Note, on that line one could also use home= for persistence - but not on a FAT32 USB thumb (the login problem).

Then, you could copy the rootfs.gz generated by Writefs previous as /boot/rootfsA.gz; now if you try just

    append initrd=/boot/rootfsA.gz rw root=/dev/null vga=normal autologin 

... then you again get the login problem (though if you login as root, you'll see the installed programs are there).

The cool thing, is that you can add rootfsA.gz along with the others in the append line; if it is added at end, then it is the same as if it is alone (login problem) - but if you prepend it - that is, add it first:

    append initrd=/boot/rootfsA.gz,/boot/rootfs4.gz,/boot/rootfs3.gz,/boot/rootfs2.gz,/boot/rootfs1.gz rw root=/dev/null noswap vga=normal lang=en kmap=us autologin 

... then both the installed programs will be available (some persistence) - but the next filesystems will overwrite settings; and will create the live user tux and proceed to autologin in that accound. So, it is not possible to save desktop icons and such - but at least the installed programs are there. Add lang=en kmap=us to avoid the questions at startup (so it proceeds directly to autologin; EDIT - it throws a message on lang=en; so it's probably lang=en_US) - and I also tried to add noswap to deactivate swap; but it still finds my local HD's swap, and does "Activating swap memory ..." (which I'd rather it didn't).

Anyways, nice it can be hacked in this way - though it is a bit of a pain having to generate a new image and copy it around, each time I change a single config line or so...

Hope this helps someone,
Cheers!

share|improve this answer
    
sounds legit. Unfortunately I'm not going to have time to test it myself anytime soon, so I'll mark this as solved. –  Dennis Hodapp Jun 7 '13 at 20:26
add comment

When adding it into the boot line, drop the "slitaz" as it's already called out. "home=usb"

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.