SliTaz SliTaz Forum

You are not logged in.

#1 2011-08-05 08:10:01

HMA
Member
Registered: 2011-08-05
Posts: 73

SliTaz frugal installation with save changes every shutdown

Hi Volks.

i discovered SliTaz for my Acer Aspire One on the quest of a very fast booting and also powerfully Operating System. And ... well ... i am impressed from SliTaz. Small, fast an still full-value!!!

At time, i have installed SliTaz on a small ext3 Partition. But i prefere to run it from a frugal installation... i have tryed it out and booting bzimage and rootfs from grub workes fine. But the only issue is.... no changes can be stored.

Is there a How To or any way to make changes permanently by a frugal installation?

(similarly puppy linux or xpud ... there changes will be stored in a file an loaded every boot)

Thank an regards ...

HMA smile

(p.s. .. apologize my not very good english)

Offline

#2 2011-08-05 14:25:00

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: SliTaz frugal installation with save changes every shutdown

It mentions Frugal installs here, so maybe it can help you:

http://doc.slitaz.org/en:guides:uncommoninst

Offline

#3 2011-08-06 17:19:30

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: SliTaz frugal installation with save changes every shutdown

Slitaz has no script that autosaves the root filesystem changes on a frugal system.

Before shutdown either "tazusb writefs" from xterm , right click menu SliTaz Live ,or SliTaz Desktop logout box checkboxes

Tazusb frugal install setup :

grub menu.lst: kernel /boot/bzImage home=sdxx or hdxx

/home is mounted to partition, everything written to regular users home folder is saved to disk

/home/boot contains bzImage(kernel),rootfs.gz,previous.gz, etc

To save all installed programs and configs not in /home :

Before shutdown:

#tazusb writefs gz

I don't use lzma it always ends up corrupting the rootfs.gz

Old rootfs.gz are renamed and kept as backups in /home/boot along with kernel.

#tazusb clean

Safely removes older timestamped rootfs.gz backups

To boot with a backedup rootfs.gz, edit grub menu on boot:

initrd   /boot/rootfs.gz

to

initrd   /boot/previous.gz

If your partition is large no compression writefs is fast:

#tazusb writefs

http://doc.slitaz.org/en:handbook:liveusb

file:///usr/share/doc/tazusb/tazusb.htm

http://hg.slitaz.org/tazusb/file/b65e12e46feb/tazusb

Offline

#4 2011-08-10 08:46:18

Guest
Guest

Re: SliTaz frugal installation with save changes every shutdown

There's something interesting here :

http://doc.slitaz.org/en:guides:frugal#tuning-the-boot-process

The fact is that the way to create a " /boot/extra-softwares.gz " or " /boot/my-config-files.gz " is NOT explained  sad

#5 2011-08-10 13:53:20

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: SliTaz frugal installation with save changes every shutdown

To create 'compressed cpio archives' :

# find the-list-of-files | cpio -o -H newc | gzip -9 > /boot/extra-softwares.gz

Example:

# find /etc/rcS.conf /etc/daemons.conf /etc/dropbear /home/tux/.ssh | cpio -o -H newc | gzip -9 > /boot/my-config-files.gz

Offline

#6 2011-08-10 15:10:05

Guest
Guest

Re: SliTaz frugal installation with save changes every shutdown

Greazt! ;D

Now what about to package it with lzma or even with none compression ?

#7 2011-08-10 20:03:55

Guest
Guest

Re: SliTaz frugal installation with save changes every shutdown

To create 'compressed cpio archives' :

# find the-list-of-files | cpio -o -H newc | gzip -9 > /boot/extra-softwares.gz

euh ... "find the list of files"  ?    a folder with tazpkg's ?   I thought it was just to load in RAM a bigger rootfs ...  not sure I'm right

#8 2018-05-16 01:08:18

dudu
Member
Registered: 2018-05-15
Posts: 8

Re: SliTaz frugal installation with save changes every shutdown

I used $HOME for saving and removing files in frugal install.

Slitaz 5.0 RC3

First to do:

#Create a parent folder

mkdir $HOME/slitazsave

#Create a list of original programs

tazpkg list > $HOME/slitazsave/list.org

#Tell the bootloader, where $HOME is saved

kernel.... rw root=/dev/null nomodeset home=cb58a50f-6401-4f41-8cf3-409ec78a9f38

#The first script saves the installed programs in $HOME. After booting they

#will be loaded with "echo root | su -c "cp -r $HOME/slitazsave/packages/* /".

#This can be done automatically with a file $HOME/.config/autostart/load.desktop.

#!/bin/sh

rm $HOME/slitazsave/files.list

rm $HOME/slitazsave/*.fi

tazpkg list > /tmp/list.new

diff $HOME/slitazsave/list.org /tmp/list.new | grep ^+[a-z] | cut -c 2- > /tmp/diff+

diff $HOME/slitazsave/list.org /tmp/list.new | grep ^-[a-z] | cut -c 2- > /tmp/diff-

diff /tmp/diff+ /tmp/diff- | grep ^-[a-z] | cut -c 2- | cut -d " " -f1 > /tmp/list.pak.new

a=$(wc -l /tmp/list.pak.new | cut -d " " -f1)

cat /tmp/list.pak.new >> $HOME/slitazsave/list.pak

sort -u $HOME/slitazsave/list.pak > $HOME/slitazsave/list.new

rm -r $HOME/slitazsave/list.pak

mv $HOME/slitazsave/list.new $HOME/slitazsave/list.pak

c=$(wc -l $HOME/slitazsave/list.pak | cut -d " " -f1)

for i in $(seq 1 $c);do cp -r /var/lib/tazpkg/installed/$(head -n$i /$HOME/slitazsave/list.pak | tail -1)/files.list $HOME/slitazsave/$(head -n$i /$HOME/slitazsave/list.pak | tail -1).fi;done

for i in $(seq 1 $c);do cat $HOME/slitazsave/$(head -n$i $HOME/slitazsave/list.pak | tail -1).fi >> $HOME/slitazsave/files.list;done

b=$(wc -l $HOME/slitazsave/files.list | cut -d " " -f1)

mkdir /tmp/folder

mkdir -p /tmp/folder/var/lib/tazpkg/installed

for i in $(seq 1 $c);do cp -r /var/lib/tazpkg/installed/$(head -n$i $HOME/slitazsave/list.pak | tail -1) /tmp/folder/var/lib/tazpkg/installed;done

for i in $(seq 1 $b);do mkdir -p /tmp/folder/$(head -n$i $HOME/slitazsave/files.list | tail -1);done

for i in $(seq 1 $b);do rm -r /tmp/folder/$(head -n$i $HOME/slitazsave/files.list | tail -1);done

for i in $(seq 1 $b);do cp -r $(head -n$i $HOME/slitazsave/files.list | tail -1) /tmp/folder/$(head -n$i $HOME/slitazsave/files.list | tail -1);done

echo root | su -c "rm -r $HOME/slitazsave/packages"

echo root | su -c "cp -r /tmp/folder $HOME/slitazsave/packages"

rm -r /tmp/*

#The second script removes programs with a little GUI as well as dependencies, if they

#are not necessary for other programs.

#!/bin/sh

a=$(yad --center --text "remove package" --entry $(cat $HOME/slitazsave/list.pak))

tazpkg depends $a | cut -d "(" -f1 | sed 's/ //g' | sort > /tmp/$a

cat $HOME/slitazsave/list.pak | grep -v $a > /tmp/list2

diff /tmp/list2 /tmp/$a | grep ^-[a-z] | cut -c 2- > /tmp/other

diff /tmp/list2 /tmp/$a | grep ^" "[a-z] | cut -c 2- > /tmp/list-dep

b=$(wc -l /tmp/other | cut -d " " -f1)

for i in $(seq 1 $b);do tazpkg depends $(head -n$i /tmp/other | tail -1) | cut -d "(" -f1 | sed 's/ //g' >> /tmp/otherdep;done

sort -u /tmp/otherdep > /tmp/oth-dep

diff /tmp/oth-dep /tmp/list-dep | grep ^" " | cut -c 2- > /tmp/res

cat /tmp/other >> /tmp/pak-new

cat /tmp/res >> /tmp/pak-new

cp $HOME/slitazsave/list.pak $HOME/slitazsave/list.pak.bak

rm -r $HOME/slitazsave/list.pak

cp -r /tmp/pak-new $HOME/slitazsave/list.pak

rm -r /tmp/*

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]