SliTaz SliTaz Forum

You are not logged in.

#1 2013-03-30 12:24:16

mt12345
Member
Registered: 2013-03-25
Posts: 84

Create custom multiple rootfs (russian dolls)

I've been using slitaz4core liveusb for couple of days and I like it very much.

I add some apps and my rootfs is growing fast !

How can I split the applications into separate rootfs files so I can choose what to load at boot?

I mean something like: rootfs-base.gz, rootfs-games.gz, rootfs-officesuite.gz etc.

or even chopp into smaller pieces:

rootfs-assaultcube.gz, rootfs-warzone2100.gz

Offline

#2 2013-03-30 12:38:31

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

very easy - when you run tazusb you get /rootfs.gz - you rename it as /rootfs-office.gz save this file in the boot folder (ther will then be a lot of different rootfs.gz) and add a special bootline to grub or syslinux - works fine, I use this since years...

title SliTaz normal

  kernel (hd0,0)/boot/bzImage rw root=/dev/null vga=normal

  initrd (hd0,0)/boot/rootfs.gz

title SliTaz Office

  kernel (hd0,0)/boot/bzImage rw root=/dev/null vga=normal

  initrd (hd0,0)/boot/rootfs-office.gz

Offline

#3 2013-03-30 13:05:06

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

You are talking about creating different versions of the system - with or without office etc

Yes easy but it's waste of pendrive's space (Im limited to 2gb at the moment!)

I guess I will need to invest in 8gb pendrive?

I like TinyCoreLinux way - you can add packages, save it on disk, and you can choose which packages to load automatically at boot or you can load it up when needed.

Thanks!

Offline

#4 2013-03-30 15:02:15

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

so why you dont stay with tinycore?

you have more possibilities - like you can use Softmaker Office (another thread), which installs nice in /home, you can safe tazpkg files locally and install them only, when you need it and so on....

Offline

#5 2013-03-30 15:15:21

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

Have not tried tinycore in last 2 years...

Yes I was thinking about keeping packages locally but how about dependencies? Do I have to resolve it manually?

Softmaker - I'll try

Offline

#6 2013-03-30 16:34:59

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

why not tinycore? because it looks  ugly hehehe

softmaker freeoffice +1

Offline

#7 2013-03-30 17:02:10

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

I have not tried to install packages - but you can do it with litte scripts - when you install a package, you find the process in /var/log/slitaz/tazpkg.log -

so here an example for warzone

Offline

#8 2013-03-30 17:54:06

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

I see.

I can get list of dependencies from

tazpkg info warzone2100

tazpkg depends warzone2100

Anyway in Debian I would put the packages into /var/cache/apt (dont remember the correct path)

and simply perform

apt-get install warzone2100

Offline

#9 2013-03-30 17:55:31

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

Hey, how to remove package WITH ITS DEPENDENCIES???

Offline

#10 2013-03-30 18:00:55

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

you do not have to remove it - as long as you dont run tazusb, they ar not saved and next time the computer boots in the basic version

Offline

#11 2013-03-30 18:12:38

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

well I use tazusb and I want to remove warzone completely!

Offline

#12 2013-03-30 18:20:43

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

I installed Warzone before, saved rootfs and deleted old rootfs.

Now I want to decrease the rootfs  size and boot time.

Do I have to remove 'orphaned' packages manually? What if some of them are needed by another program which I might have installed ? Will I break dependencies?

Offline

#13 2013-03-30 18:51:27

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

you will see - try it out, if something does not work anymore, you can reinstall it... and run tazusb another time....

Offline

#14 2013-03-30 19:05:52

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

OK system prevents me from breaking, this is cool:

root@slitaz:/home/tux# tazpkg -r libsdl

The following packages depend on libsdl:

  libmpeg2

  libsdl-image

  libsdl-mixer

  libsdl-net

  libsdl-ttf

  libsmpeg

  mpg123

  python-pygame

  qemu

Remove libsdl (1.2.14) ?

Please confirm uninstallation (y/N) :

Offline

#15 2013-03-30 19:10:24

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

But anyway, how do I install or remove multiple packages?

root@slitaz:/home/tux# tazpkg -gi zip unzip

only the first package is going to be installed (zip)

Offline

#16 2013-03-31 09:11:16

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

I think its

tazpkg -gi zip && tazpkg -gi unzip

but the easier way is with the script, when you want to use it permanent - as I told you - just save the script in the same directory as the saved tazpkgs somewhere in /home make it executable and run it as root

http://linuxconfig.org/Bash_scripting_Tutorial - and in slitaz we dont use #!/bin/bash, we use #!/bin/sh

Offline

#17 2013-03-31 11:23:30

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

Re: Create custom multiple rootfs (russian dolls)

@mt12345 see http://hg.slitaz.org/tazlito/raw-file/tip/doc/tazlito.en.html#merge

Example:

1- You have a slitaz-officesuite.iso (may be build with http://pizza.slitaz.me/)

2- You have a slitaz-games.iso

3- And a rootfs.gz from slitaz-core.iso

Run

# tazlito merge 512M slitaz-officesuite.iso 256M rootfs.gz

# tazlito merge 512M slitaz-games.iso 256M rootfs.gz

Ram size doesn't matter. We want to get rootfs1.gz only.

# mount -o loop,ro slitaz-office.iso /media/cdrom

# cp /medida/cdrom/boot/rootfs1.gz /boot/rootfs-office.gz

# umount -d /media/cdrom

# mount -o loop,ro slitaz-games.iso /media/cdrom

# cp /medida/cdrom/boot/rootfs1.gz /boot/rootfs-games.gz

# umount -d /media/cdrom

You grub menu.lst will look like

title SliTaz normal

kernel (hd0,0)/boot/bzImage rw root=/dev/null vga=normal

initrd (hd0,0)/boot/rootfs.gz

title SliTaz Office

kernel (hd0,0)/boot/bzImage rw root=/dev/null vga=normal

initrd (hd0,0)/boot/rootfs.gz (hd0,0)/boot/rootfs-office.gz

title SliTaz Games

kernel (hd0,0)/boot/bzImage rw root=/dev/null vga=normal

initrd (hd0,0)/boot/rootfs.gz (hd0,0)/boot/rootfs-games.gz

Offline

#18 2013-03-31 12:18:15

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

thx pascal - I did not check this until now - just off topic, I think, hg documentation is in the meantime the only up-to-date one. Should we link or copy those docs in guides ?

Offline

#19 2013-03-31 14:09:50

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

@kultex

I know  '&&' from debian:

apt-get update && apt-get dist-upgrade && apt-get clean

I was trying to remove warzone dependencies:

root@slitaz:/home/tux# tazpkg -r libsdl libsdl-net mesa openal libtheora physfs libglu-mesa freeglut fribidi quesoglc ttf-dejavu-extra

making script doesnt make sense because it's one-time action only.

@Bellard

This is still the way from post 2.

So let's say I would run 4 different operating systems (base,games,multimedia,office) sharing /home.

So imagine I run office-fs and I have to unpack some rar archive, I install rar, I do the job, tazusb-write,shutdown.

Next day I boot into default base-fs I want to unpack some rar... command not found!

You know what I mean?

I simply want one rootfs, with flexibility to choose what apps to load at boot stage (modular system like tinycore)

I see it's not possible :-(

Storing install packages in /home seems to be solution for me. With install scripts to handle dependencies.

So whenever I feel urgent need for bloodshed, I install Assaultcube and SAVEGAMEs and PREFS should survive reboot because /home is persistent.

BTW ram its not a problem - 2.5 GB, so I could actually create one rootfs wit ALL apps I use, including all games and libreoffice, but it's waste of resources (and booting/writefs time!)

THANKS FOR REPLIES !!!

Offline

#20 2013-03-31 14:22:21

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: Create custom multiple rootfs (russian dolls)

@mt12345  you did not understand - its different than the post 2

it is like you boot the slitaz 4 in 1 iso - it is that what you wanted

http://forum.slitaz.org/topic/multiple-grafic-card-liveusb-it-is-possible

http://hg.slitaz.org/tazlito/raw-file/tip/doc/tazlito.en.html#merge

Offline

#21 2013-03-31 15:04:35

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

Oh looks like I was totally wrong.

I thought 'russian dolls' are complete, independent rootfs's just like I described above (base,games,multimedia,office).

I will study it tomorrow.

THX!!!

Offline

#22 2013-04-01 03:05:17

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

Referring to

http://hg.slitaz.org/tazlito/raw-file/tip/doc/tazlito.en.html

I can 'Manufacture a flavor' or 'Adapt a flavor'

but how to add warzone (with dependencies!) before generating iso?

(I dont want to bake pizza, I want to do it myself)

Offline

#23 2013-04-01 04:49:30

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

OK I'm getting closer:

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

looks like I have to edit distro-packages.list manually.

at least  dependencies are solved automatically!

question: how can I generate distro-packages.list from my current rootfs? (for comparison)

I tried:

tazpkg list

but I get output in columns.

Offline

#24 2013-04-01 07:41:27

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

Re: Create custom multiple rootfs (russian dolls)

$ ls /var/lib/tazpkg/installed > distro-packages.list

Offline

#25 2013-04-01 13:29:48

mt12345
Member
Registered: 2013-03-25
Posts: 84

Re: Create custom multiple rootfs (russian dolls)

without version numbers :-((

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

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