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

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

#16 Post by emil »

mavrothal,
maybe your problem is from the inclusion of the /home persistence module in my latest builds, because it tries to mount the live medium rw during boot and this is of course not possible with a CD.

Maybe you can try a frugal hd install with the files from the iso. Otherways I will rebuild the iso without direct /home persistence module.
cheers
Emil

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#17 Post by mcewanw »

Just downloading before heading for bed. Hope to try it out tomorrow, thanks, William
github mcewanw

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

#18 Post by emil »

I just uploaded CAT-0.2.iso.

http://boxen.math.washington.edu/home/e ... AT-0.2.iso

This is built without the "home" persistence module. So the live medium will be mounted read only.

If you have a frugal install, you can do the following:

Code: Select all

sudo mount -o remount, rw /lib/live/mount/medium
to make the home directory persistent in the save file, you have to uncomment the
/home union

entry in persistence.conf file.
mavrothal, it would be nice if you could test this iso to see if this was the reason.
thank you
emil

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#19 Post by mavrothal »

emil,
tested CAT-0.2.iso in the VM.
The (not really) bad news is that the errors shown previously are still there.
The good news is that I'm posting from it :D
I guess removing the "home" persistence module did the trick.

Now, can someone do an dpkg/apt-get pet or sfs for puppy? :wink:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#20 Post by big_bass »

There have been several lost names that new forum users (dont remember) those that have tried to make puppy more linux like and follow open source standards

I see that this is a strong desire by several out of the box thinkers

When Dr. Ian Malcolm heard that by design there would be no
life produced (without the controlling parties consent) he reflected a moment and said
Dr. Ian Malcolm: No, I'm, I'm simply saying that life, uh... finds a way.
meaning if others have failed to get the point across this doesnt mean they failed
they have discovered that there are better ways to enjoy linux
and life finds a way

Joe

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

#21 Post by emil »

Mavrothal - superb!
I leave the CAT-0.2.iso then as my demo iso!
Has anybody tried to use the build scripts?

Hi Big Bass,
there is a reason my subtitle is cats and dogs - even they may become best friends.
Image
It would be great if you could have a look at my icewm module, It could use some improvements...
all the best
emil

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#22 Post by mavrothal »

big_bass wrote:follow ... standards ... out of the box thinkers
Without necessarily disagreeing with what you say, the above is a bit strange. Don't you think?
(I believe the meaning is not changed by the omitted words)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

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

#23 Post by emil »

I think for long time forum-members Joes remark is clear, but anyway I really don't want to go down the same road and wake up all those past arguments again.
People do what they do with passion and want to have fun. This is a fresh project and no harm was done and no quarrel stirred up to present. It is under the project section, it is not about debian vs puppy or dull standards vs fun, just about a build script for small debian compatible linux system for which I hope to get some valuable input, advice and maybe contributions.
So let old times rest...

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

#24 Post by saintless »

emil wrote:I leave the CAT-0.2.iso then as my demo iso!
Has anybody tried to use the build scripts?
Hi, Emil.
I think Cat-0.2 is better. I get only one warning on boot this time about creating symlink in /proc
It is perfectly harmless informative warning.

I tried the built script with CAT-0.2 but I had some issue with non responding system because of my low-ram issue. I have your instructions about this problem from before, but I will use another computer with 512Mb ram for the test tonight.

Toni

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

#25 Post by emil »

Thank you Toni,
yes you use real low ressources - I used a machine with 1GB RAM.
actually having the cache on a disk will help a lot, because it won't download the same packages from the net over and over again.
cheers
emil

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#26 Post by anikin »

Good to see, that a whole, new ecosystem is evolving around Debian Live.
Posting from CAT-0.2. Boots perfectly well on eeepc1000, runs fast, feels light and snappy.

Thank you, emil for this great contribution!

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

#27 Post by saintless »

Hi, Emil.
Building script tested and it works perfect. No questions to confirm even.
Debian-light-build folder grows up to 2,4 Gb and at the end it is 1,3 Gb.
The new builded iso is in /build-light-debian/build/binary.hybrid.iso
The build script folder was on ext3 partition.
I can't understand how exactly works but it works very well. Great job!

About the MIME types: Terry (sunburnt) is working on this for Light-Wheezy and as far as I understand he couldn't script them to be imported for ROX or XFE. He uses /root/.config/xfe/xferc file to add them manual there. Same for Rox.

Toni

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

short description how the scripts work

#28 Post by emil »

Code: Select all

build.sh install
executes

Code: Select all

apt-get install live-build live-boot live-config syslinux kpartx apt-cacher
as explained earlier, it might be a good idea to symlink the /var/cache directory to a dir somewhere on a disk to avoid clobber.

If you do
build.sh (module1 module2 ... )

then in a first step the configuration files from the /config directory are loaded. The default file is always loaded, settings from the modules can override the default settings.

example - in the config/icewm there is>

Code: Select all

IMAGE='iso-hybrid'
RECOMMENDS='false'
INDICES='false'
LINUX_FLAVOURS='486'
NON_FREE_WIRELESS='0'
MODULES='icewm wireless'
The first 4 of those settings are options to the lb command (debian live builder). Alternatives would be e.g.
IMAGE='hdd' (would build a binary image ready to dd to usb ord harddisk),
RECOMMENDS='true' (would install all recommended packages, this would make the iso much bigger),
INDICES='true' this would install all apt indices, which would mean no apt-get update is necessary before installing new files
LINUX_FLAVOURS="686" or "686pae" or "AMD64" would be possible among other alternatives

the last to options influence which packages are installed.
NON_FREE_WIRELESS=1 would install propriaty drivers
the most important setting is
MODULES='icewm wireless' - this defines which packages and commands are executed.

after the configs are loaded the build.sh script executes the code from the MODULES variable.
They are defined in the /module directory. Lets study /modules/wireless.
it has only the file wireless-config.sh (each Module has such a config file). The first part of this file is:

Code: Select all

add_packages "wireless" "wireless-tools wpasupplicant firmware-linux-free"
add_packages "wireless" "ndisgtk ndiswrapper-utils-1.9 wicd"
with the add-packages function, debian packages are added to the list which will be installed to the new system (the first string, "wireless", is just an identifier). The 2nd part of the wireless-config loads non-free wireless packages if NON_FREE_WIRELESS='1'.

The second module icewm is more interesting. Beside the icewm-config.sh there are also directories (hooks, includes.chroot and packages.chroot).

/includes.chroot
contains files which will be included in the new filesystem.
For example ther is the /etc/skel/.config/ directory, which has the keyboard switcher and the rox.sourceforge.net folder with the pinboard file. This is the skeleton user directory which will be copied into every new user home directory.
I also added to /usr/share/icewm . There is a themes folder with two additional icewm themes, a new startup file and a new default theme.
In the /usr/share/pixamps folder there is a custom icon set. In /usr/share/applications I define some custom applications (those are the applications which are also put into the rox pinboard file.

In the /opt directory there is the background folder with some wallpapers and the /opt/bin folder with some scripts - I think every non debian app should go to /opt.

Hooks:
hooks are programs which will be installed after the packages are installed. For example there is config.chroot:

Code: Select all

#!/bin/sh

# set some environemtal variables
echo 'VISUAL=xfwrite' >> /etc/environment						# set editor in X to xfwrite
echo 'GDK_NATIVE_WINDOWS=true' >> /etc/environment			# fix ROX filer focus bug 

# change terminal default font and fontsize
echo "*faceName: Liberation Mono" >> /etc/X11/app-defaults/XTerm
echo "*faceSize: 11" >> /etc/X11/app-defaults/XTerm
the stripped.chroot hook will remove:

Code: Select all

or PACKAGE in apt-utils aptitude man-db manpages info wget dselect
do
	if ! apt-get remove --purge --yes "${PACKAGE}"
	then
		echo "WARNING: ${PACKAGE} isn't installed"
	fi
done

apt-get autoremove --yes || true

# Removing unused files
find . -name *~ -print0 | xargs -0 rm -f

#rm -rf /usr/include/*
rm -rf /usr/share/groff/*
rm -rf /usr/share/doc/*
rm -rf /usr/share/locale/*
rm -rf /usr/share/man/*
rm -rf /usr/share/i18n/*
rm -rf /usr/share/info/*
rm -rf /usr/share/lintian/*
rm -rf /usr/share/linda/*
rm -rf /usr/share/zoneinfo/*
rm -rf /var/cache/man/*

# Truncating logs
for FILE in $(find /var/log/ -type f)
do
	: > ${FILE}
done
the packages.chroot folder should contain deb packages which are automaticly installed while building - I have to admit it didn't quite work for me until now.

during the build process, all files are stored to the /build directory. there is the chroot directory which will become squashed to be the new filesystem.squashfs

I hope I could give an idea of how those script work and about options for customisation. There are additional possibilities, e.g. include binary files and also to customize the boot behavior.

cheers emil

PS: the live-tool manuals have lots of info

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

#29 Post by saintless »

Thank you, Emil.
Getting much clear for me how this build script works.
I will experiment more.

Toni

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#30 Post by big_bass »

Hey emil

Very Interesting !

The main point from building with debian is you know what to expect
from a very large team of players with many years of
perfecting upon the base system this is why they can provide so many archs.
and you start out with thousands of carefully made packages that won't
bork your system and can be easily updated and maintained
though apt-get

you guys on puppy just want to give it your special touch and keep it light
and after several years of doing it " the hard way" by using puppy as the base which is always changing like trying to hit a moving target

you found the easy way
I wish I did it that way a few years ago :D
anyway its good to see some fresh ideas
and new options

if you do it right you could even contribute some small apps
to the linux community that would work on many debian based systems
this is what I meant by the term thinking out of the box

Joe

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

#31 Post by saintless »

Hi, Joe :)

I think for now this puppy deb packages from Fred will work without problems on standard debian wheezy and squeeze for multiuser:
http://www.smokey01.com/saintless/Fredx ... wheezy.deb
http://www.smokey01.com/saintless/Fredx ... -0.8.3.deb
http://www.smokey01.com/saintless/Fredx ... utdown.deb
http://www.smokey01.com/saintless/Fredx181/pfind.deb
http://www.smokey01.com/saintless/Fredx ... %29.tar.gz
Sorry, the url tags make this post invisible :(
Fixed.
Toni
Last edited by saintless on Mon 10 Feb 2014, 17:55, edited 5 times in total.

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

#32 Post by emil »

Hey Joe,

i think I didn't found it, I am still searching. Anyway it feels that a light system is possible and with the build scripts you have a blueprint to transform it easily, customize it and also build for different arches.

Yes - doing it the light way is not so easy, and here one can learn a lot from puppy. Transforming apps will include - but is not limited to replace /root with /$HOME. I am still looking for the right policy - should one keep the pet format or should one convert it into deb and use apt-get to install?

It seems logical that apt should be configured with
reccommends=false, suggests=false, indices=false
Concerning which packages to include in the base distro and how to combine apps and dependencies to keep it small and light one could learn also much from puppy...

Currently the filesystem is purged from docs, manuals, locals etc..
header files are kept. Maybe a split inte dev / doc / nls packages like in puppy would make sense (when combining thos files to seperate to squashfs).

For the puppy feeling it is possible to replace in /etc/default/nodm

Code: Select all

NODM_USER=user with NODM_USER=root
(the nodm.hook could be modified to have this the default behaviour)

Right here in the forum there are many people with more experience and skill than me, so I can not achieve much alone.
cheers
emil

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#33 Post by RSH »

[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

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

#34 Post by saintless »

Thank you, RSH.
I will keep this in mind while uploading files.

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#35 Post by anikin »

emil wrote:For the puppy feeling it is possible to replace in /etc/default/nodm
Code:
NODM_USER=user with NODM_USER=root

(the nodm.hook could be modified to have this the default behaviour)
I downloaded nodm from Debian packages, undebbed it to have a look at the file structure, which looks as follows:

/etc/pam.d/nodm
/etc/insserv.conf.d/nodm
/etc/init.d/nodm

and replaced user with root. Works like a charm.
Now, it would be great to get COW working ... if saintless is willing to help :)

Post Reply