Build scripts for small debian live images (similar to woof)

A home for all kinds of Puppy related projects
Message
Author
emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#106 Post by emil »

Hi efgee,
for working puppy like persistence, you need:
a) "persistence" boot parameter (in grub or other boot manager - not "persistent" as it was used in the older version of live boot)
b) a persistence file on a different partition than the live medium (if you absolutly need to place the persistence file on the same partition there are 2 workarounds for this)
c) the persistence file has to contain a persistence.conf file, which is just the text "/ union"

This configuration worked for me, specifically I could save my wireless drivers and settings.

cheers, hope you get it to work
emil

PS: to make terminology clear, "persistence" is basically the same as the savefile in puppy linux

Edit: I noticed that the persistence boot parameter was missing from the example boot code saintless gave earlier in this thread, maybe adding this is the easy fix for your woes...
Last edited by emil on Mon 24 Feb 2014, 10:02, edited 1 time in total.

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#107 Post by efgee »

These are my grub4dos settings:

Code: Select all

title Debian-live-64 persistent
  root (hd0,5)
  kernel /debian-testing/live/vmlinuz live-media-path=/debian-testing/live boot=live config persistent quickreboot noprompt autologin
  initrd /debian-testing/live/initrd.img 
Saintless' 1GB persistant file resides on (hd0,4)

Still a no go...

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#108 Post by saintless »

efgee wrote:These are my grub4dos settings:

Code: Select all

title Debian-live-64 persistent
  root (hd0,5)
  kernel /debian-testing/live/vmlinuz live-media-path=/debian-testing/live boot=live config persistent quickreboot noprompt autologin
  initrd /debian-testing/live/initrd.img 
Saintless' 1GB persistant file resides on (hd0,4)

Still a no go...
Hi, Egfee.
The code you have will work only with downgraded initrd.img if you create one for 64 bit version with live-boot v2. Like the one I use on light wheezy. Replace peristent with persistence
Option persistent is for Squeeze + live-rw save file. And persistence is for Wheezy + persistence save file.
Use one of this two persistence save file 1Gb examples. Extract them on top of a partition different from the boot partition.
http://www.smokey01.com/saintless/1Gb-p ... ive-rw.zip
http://www.smokey01.com/saintless/01-Gb ... ink.tar.gz
The first persistence file has only / union standard full persistence content in persistence.conf
The second has the workarownd with separate folders in persistence.conf in case you use more than one squashfs module in /live
Both should work.
Your boot code should look like this now:

Code: Select all

title Debian-live-64 persistence
  root (hd0,5)
  kernel /debian-testing/live/vmlinuz live-media-path=/debian-testing/live boot=live config persistence quickreboot noprompt autologin
  initrd /debian-testing/live/initrd.img 
Toni
Last edited by saintless on Mon 24 Feb 2014, 13:44, edited 1 time in total.

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#109 Post by emil »

Manpage Debian Live Boot:
http://www.clonezilla.org/clonezilla-li ... ntents.php

It should be made clear that the scripts run and use the debian live tools version 3.x. Please don't mix instructions for older versions. There were quite fundamental changes, if those changes were always choosen on the lucky side is none of my business.

I edited some of the earlier posts to make this clear and especially warn from the "persistence" vs "persistent" confusion.
cheers
Emil

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#110 Post by efgee »

OK changing the name to persistence got me one step further.

Because I wanted to see the changes made/saved I used a partition named persistence and placed the persistence.conf file on it. (/ union)
Now I can see all stuff on this partition (there are more directories with other stuff stored there, but it shouldn't matter).

However, (after booting the debian live system) if I manually change the /etc/network/interfaces file to include the wireless info it does not get written into the same file on the persistence partition.
Can say that because if I boot another linux to verify things I can see that after reboot my changes are gone.
Also if I manually modify the /etc/network/interface on the persistence partition to include my wireless info, all changes are overwritten after booting the debian live system again.
(but it should be the other way around to make some sort of sense...)

Baby steps I guess...

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#111 Post by emil »

efgee I can not test at the moment. But I think I had a similar issue when I did a manual setup of the wireless network in Debian light Wheezy

The baseline is, you need to add the nonetworking boot parameter to your grub config, otherways your network parameters are overwritten every fresh boot.

Note - this doesn't happen if you install WICD or network manager.

This is one of the peculiar and rather undocumented features of debian live, one finds it only with pure luck and google. This is the original forum question I found:

http://www.linux-archive.org/debian-use ... faces.html

so please try:

Code: Select all

kernel /debian-testing/live/vmlinuz live-media-path=/debian-testing/live boot=live config persistence nonetworking quickreboot noprompt autologin 

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#112 Post by saintless »

Hi, Efgee.

A few questions to make your trials clear?
Do you have persistence save partition working except network issue? For example if you apt-get a program is the program there after reboot? It is important to test if any other changes are saved after reboot and only network change is a problem.
I used a partition named persistence and placed the persistence.conf file on it. (/ union)
I guess it means the partition has label persistence? If yes it is the right way.
Also if I manually modify the /etc/network/interface on the persistence partition to include my wireless info, all changes are overwritten after booting the debian live system again.
(but it should be the other way around to make some sort of sense...)
How many squashfs modules do you have in /live folder? If it is only one squashfs / union should work. If you have more than one squashfs module in /live you will get exactly the result you described - backward overlay the second squashfs on top of the save partition and first squashfs on top of the second one.

If you get other changes saved after reboot here is what you can try about network issue. To enter static ip address and network settings use kernel boot line. Proper described from JBV here:
http://foxyroxylinux.com/viewtopic.php?f=12&t=242

Toni

Edit. We posted at the same time, Emil :)

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#113 Post by efgee »

emil wrote:efgee I can not test at the moment. But I think I had a similar issue when I did a manual setup of the wireless network in Debian light Wheezy

The baseline is, you need to add the nonetworking boot parameter to your grub config, otherways your network parameters are overwritten every fresh boot.

Note - this doesn't happen if you install WICD or network manager.

This is one of the peculiar and rather undocumented features of debian live, one finds it only with pure luck and google. This is the original forum question I found:

http://www.linux-archive.org/debian-use ... faces.html

so please try:

Code: Select all

kernel /debian-testing/live/vmlinuz live-media-path=/debian-testing/live boot=live config persistence nonetworking quickreboot noprompt autologin 
Added the persistance module during iso build In addition to the nonetworking parameter/. Changes get saved now.
Thank you emil.

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#114 Post by efgee »

saintless wrote:Hi, Efgee.

A few questions to make your trials clear?
Do you have persistence save partition working except network issue? For example if you apt-get a program is the program there after reboot? It is important to test if any other changes are saved after reboot and only network change is a problem.
I used a partition named persistence and placed the persistence.conf file on it. (/ union)
I guess it means the partition has label persistence? If yes it is the right way.
Also if I manually modify the /etc/network/interface on the persistence partition to include my wireless info, all changes are overwritten after booting the debian live system again.
(but it should be the other way around to make some sort of sense...)
How many squashfs modules do you have in /live folder? If it is only one squashfs / union should work. If you have more than one squashfs module in /live you will get exactly the result you described - backward overlay the second squashfs on top of the save partition and first squashfs on top of the second one.

If you get other changes saved after reboot here is what you can try about network issue. To enter static ip address and network settings use kernel boot line. Proper described from JBV here:
http://foxyroxylinux.com/viewtopic.php?f=12&t=242

Toni

Edit. We posted at the same time, Emil :)
The partition has the label persistence, and all changes are saved (installed htop through synaptic and was still there after reboot)
Networking is working now but I have to manually do:

Code: Select all

ifconfig wlan0 up
ifup wlan0=wireless
because wicd isn't working on my hardware.
Will try out more stuff.

BTW: have only one squash file (the standard one)

thank you tony.

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#115 Post by efgee »

Installed ceni (best console network interface tool) for setting up wi-fi and works fine, even after a reboot.
(no manual intervention needed anymore)

ceni is a perl5 script, the perl libs that need to be installed are:

Code: Select all

libcurses-ui-perl
libfindbin-libs-perl
libexpect-perl
libio-pty-perl
How to get ceni (it's not in debian's repository):

Code: Select all

# cd /tmp
# wget http://packages.siduction.org/base/pool/main/c/ceni/ceni_2.38_all.deb
# dpkg -i /tmp/ceni_2.23_all.deb
# apt-get -f install
Next step will be to get ceni and libs onto the iso,..

Thank you all for your tremendously generous help you guys provided.


BTW: will surely post more infos/questions as I move along in this endevour...

happy greetings

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#116 Post by efgee »

Found out that if you want to manually copy the 3 needed files (image, filesystem, kernel) onto a partition of your choice, you don't have to mount the iso to have access to them.
If the build goes right there will be a "build" directory and inside of it there will be a "binary/live" directory with all the files that are pushed inside the iso.

BTW: Every time I want to disable "root" and enable "user" on startup I end up with X and no window manager, no menu, nothing.
Also I googled around to find the sequence that is used after init (things like startx, xinitrc, etc.) so I could plug in my settings, but didn't find anything. (using openbox-session and it's autostart file for now...)

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#117 Post by saintless »

Hi, Efgee.
Found out that if you want to manually copy the 3 needed files (image, filesystem, kernel) onto a partition of your choice, you don't have to mount the iso to have access to them.
If the build goes right there will be a "build" directory and inside of it there will be a "binary/live" directory with all the files that are pushed inside the iso.
Yes, I usualy mount the iso and copy /live folder on top of a partition. This makes frugal install like in puppy.
Every time I want to disable "root" and enable "user" on startup I end up with X and no window manager, no menu, nothing.

I had the same problem with SLIM display manager. I guess you have nodm and it is not the same, but there is a way to boot as user or root without display manager installed. If you like to try this is the section from /etc/inittab which does that. Change root with user for example:

Code: Select all

1:2345:respawn:/bin/login -f root </dev/tty1 >/dev/tty1 2>&1
#1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6
Toni

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#118 Post by efgee »

Thanks, will try it out as soon as I can.

One more question if I might ask:
From your point of view what is the best display manager: SLIM?

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#119 Post by saintless »

SLIM is the smallest but unfortunately it does not work well for IceWM, OpenBox, JWM.
I would suggest to test xdm and nodm (both the same size) and a little bit bigger but working without problems lightdm.

Toni

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#120 Post by emil »

If the build goes right there will be a "build" directory
yes, the build directory is very instructive! you will find the files for frugal install and the complete chroot directory there.
Every time I want to disable "root" and enable "user" on startup
efgee, for building a CAT with being user after autologin you have to add the following line to the nodm-hooks.chroot in modules/CAT/hooks

Code: Select all

sed -i 's/^NODM_USER.*/NODM_USER=user/g' /etc/default/nodm
If you want to change this in running CAT (with persistence enabled) please edit file

/etc/default/nodm

change NODM_USER=root to NODM_USER=user

cheers 8)
emil

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#121 Post by efgee »

saintless wrote:SLIM is the smallest but unfortunately it does not work well for IceWM, OpenBox, JWM.
I would suggest to test xdm and nodm (both the same size) and a little bit bigger but working without problems lightdm.

Toni
Thank you for the info.
Will try to work with lightdm as I'm not after smallest size.
I'm more after "it just works" :D

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#122 Post by efgee »

emil wrote:
Every time I want to disable "root" and enable "user" on startup
efgee, for building a CAT with being user after autologin you have to add the following line to the nodm-hooks.chroot in modules/CAT/hooks

Code: Select all

sed -i 's/^NODM_USER.*/NODM_USER=user/g' /etc/default/nodm
That's what I did and the result was X11 with an X as a cursor.
No window manager was loaded.
emil wrote: If you want to change this in running CAT (with persistence enabled) please edit file

/etc/default/nodm

change NODM_USER=root to NODM_USER=user

cheers 8)
emil
At this point in time I am creating/recreating the iso with persistence disabled.
Want to see how "healthy" my settings are.

konaexpress
Posts: 75
Joined: Fri 14 Oct 2011, 02:17

#123 Post by konaexpress »

Keep it up boys, looking forward to testing/using this.

I can't do what you guys do but I can test and make graphics so let me know.

Icons, wallpapers or logos......give me an idea.

Best hopes,

John

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#124 Post by emil »

Hi konaexpress,
you can alread test, I am using CAT-041 on my working laptop. There are some usability quirks, but it is definitly usable.
If you want to contribute Wallpapers, logos or icons feel free to do so. There were already ideas about naming different builds, CAT themes offers a lot of possibilities, just think of Tiger, Lion or Jaguar.
I also liked sickguts names for varios desktop items (like "meow" for start menu or "kitty litter" for trash. So there is room for creativity!
kind regards
emil

efgee
Posts: 34
Joined: Thu 08 Apr 2010, 19:56

#125 Post by efgee »

As a follow up:
I know it's not the Puppy way, but being a normal user with sudo capabilities fits my needs.
(instead of being root all the time)
Tried to get a normal user working with this script but to no avail.

Started using the original sagedebianlive script and to my surprise beeing a normal user (not root) works just fine.
Instead of wasting more time in trying to figure out what changed (and why the cat script does not work in this regard) I will use the original sagedebianlive script while moving forward.

Many thanks to all involved that intruduced me to the cat script, debian live and the work the sagedebianlive guys did.

Will post my progress (if it's OK with you guys).

Keep up the good work!

Post Reply