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:

#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 :)

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

#36 Post by saintless »

Hi, Anikin.
anikin wrote:Now, it would be great to get COW working ... if saintless is willing to help :)
Extract initrd1.img from Light-Wheezy2, use it with Cat-0.2 and it is done :)
http://www.smokey01.com/saintless/Light ... eezy-2.iso

Toni

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

#37 Post by saintless »

Hi, Emil.

About IceWM-Control-Center:
saintless wrote:I can make a module but you can add it to install packages list:
1. Install icecc debian package:
http://prdownloads.sourceforge.net/icec ... b?download
2. Install this libqt3-mt package:
http://packages.ubuntu.com/lucid/libqt3-mt
I just use from the last one copy of libqt3-mt with two symlinks in /opt/lib instead installing ubuntu package.
3. Create symlink from any text editor to /opt/bin/gvim
In my choice /opt/bin/gvim is link to geany

There are also 3 options in icecc that does not work without python. I don't think they are important but if you need them install python as well.
If you prefer separate module I can make one.

Edit: Hi, Emil.Here is separate squashfs module if you decide it is better to add it this way. If something does not work write here.
http://www.smokey01.com/saintless/Fredx ... c.squashfs


Toni

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

#38 Post by anikin »

saintless wrote:Hi, Anikin.
anikin wrote:Now, it would be great to get COW working ... if saintless is willing to help :)
Extract initrd1.img from Light-Wheezy2, use it with Cat-0.2 and it is done :)
http://www.smokey01.com/saintless/Light ... eezy-2.iso

Toni
Hi saintless,

Does it look OK, nothing wrong in the picture?
Attachments
cow.jpeg
(69.38 KiB) Downloaded 483 times

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

#39 Post by saintless »

anikin wrote:Does it look OK, nothing wrong in the picture?
The only unusual thing is this empty folder /live/cow/live
It should not be there but this seems doesn't make problems. Maybe it is created because of something was left from the mounting /lib/live/mount/medium in /home but I'm not sure.
In general do not touch (delete, rename, move) anything inside /live/cow
You will end up with broken system.
The wh. hidden files and folders are created for deleted items to be marked as deleted in the main module. They will appear in xfe as well if you mark show hidden files.
Install squashfs-tools and use mksquashfs /live/cow to save changes or live-rw save file.
From quick test all seems to work as it should with the downgraded initrd.img from Light-Wheezy2.

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

#40 Post by anikin »

Hi saintless,

Thank you, for all your help.
All is going well so far, except, that I'm experinencing a little issue.
This netbook has 2 SSD drives - sda1, sdb1 (both vfat) and an SD card - sdc1 (ext4).
Out of those 3, only sda1 and sdc1 can be mounted - either via the provided script, or manually.
sdb1 refuses to mount - with a message like, it's not found in fstab, or mtab.
Any ideas?

Post Reply