3

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?

4 Answers 4

1

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!

1
  • sounds legit. Unfortunately I'm not going to have time to test it myself anytime soon, so I'll mark this as solved.
    – Dennis
    Jun 7, 2013 at 20:26
1

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

0

There is a menu option that will guide you.

You will need a usb formated ext3. The partition table must be msdos not gpt. The usb must have 2 partitions one for / and the other for home.

0

@sdaau @Derek @Yuri Herrera Your notes helped me figure out how to set up true persistence. Here's how.

First you must add a second partition to your USB drive. This partition must be ext3, not NTFS or FAT32. I used Gparted to format the ext3 partition.

Then when editing syslinux.cfg which is now called isolinux.cfg in newer versions of slitaz. The version of slitaz I used its slitaz cooking.

In isolinux.cfg you need to add home=sdb2 where sdb2 is your second partition you created on your USB drive. home=sdb2 goes directly after append but before initrd=

It will look like this

append home=sdb2 initrd=/boot/rootfs4.gz,/boot/rootfs3.gz,/boot/rootfs2.gz,/boot/rootfs1.gz rw root=/dev/null vga=normal lang=en_US kmap=us autologin

or

append home=sdb2 initrd=/boot/rootfsA.gz rw root=/dev/null vga=normal lang=en_US kmap=us autologin 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .