Create Debian 9 (Stretch) minimal ISO similar to DebianDog

A home for all kinds of Puppy related projects
Post Reply
Message
Author
User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

Create Debian 9 (Stretch) minimal ISO similar to DebianDog

#1 Post by fredx181 »

*** Create a Debian 9 (Stretch) minimal live ISO similar to 'DebianDog' ***

See also, related: A Debian-Stretch-Live Starter Kit by rcrsn51
EDIT 2018-06-27: Stretch-Live has systemd installed, but boots by default without it, so there's choice to use it or not. For those who are absolutely anti systemd see:
Create Devuan ascii minimal live ISO similar to 'DebianDog'

Update 2019-06-09 New! mklive-stretch appimages Updated: 2019-08-08 http://murga-linux.com/puppy/viewtopic. ... 42#1033942
Updated on 2019-06-01 Kernel upgrade
Thanks All for the contributions, suggestions, testing and any other feedback, specially:
dancytron, belham2, rcrsn51, wiak, jd7654, backi, AndresC2, peebee

See here for updates and fixes

===================
EDIT 2017-08-04 Forum member wiak found that debootstrap can work from Puppy and provided a pet for it:
http://murga-linux.com/puppy/viewtopic.php?t=111222
Download:
http://murga-linux.com/puppy/viewtopic. ... &id=110292
===================

EDIT 2017-10-10 Should work from any newer puppy now, see also Here
EDIT: 2018-02-01 Instructions for how to make it work on FatDog

With aufs support and porteus-boot style included
It's required to have at least 3 GB free space and to run the script on a Linux filesystem, e.g. ext4
Should work running from any Debian based OS, I tested on Stretch Dog 32 and 64 bit.

Similar to This (for Jessie) but this is **way** better, easier, faster! (using debootstrap)

Just download and run This 'mklive-stretch' script
Before running, make it executable:

Code: Select all

chmod +x mklive-stretch
And run from terminal:

Code: Select all

./mklive-stretch
Update 2017-08-18: Without option (such as: -gui will show the help text, GUI and CLI options available now, and use of external config file.
Update 2017-08-26: Choice of Desktop Environments (GUI only), more info: Here
Updates: Added DDog, Kiosk and DE choice with CLI
And two more choices
Packages overview from custom repository

Run from terminal:

Code: Select all

./mklive-stretch -gui
Image

Wait... and.. That's all ! (except for some questions to answer and to set the root password during the build)
Took for me 15 minutes to create ISO, size: 164 MB (xz compressed squashfs) on a 10 year old HP laptop (dual core) and a medium fast internet connection.

See for much more information Here

Packages available from custom repository, see Here

This may not be considered as just a howto, but as a project that can grow, e.g. extend the script by calling other scripts e.g. for having choice of different window-managers, desktop environments, applications. Better use of git may be the best (but not my strongest point).

So development depends on the interest, feedback and help from anyone. This is anyway some sort of base concept (that can be changed also, of course).

Some links to useful info in this thread:
WiFi Firmware
3D graphics acceleration
Installing Brother printers in Stretch-Live-64bit
Problem changing brightness, solved
How to Install the NVIDIA Video Driver in Stretch-Live
Package of SANE scanner backends
pet2stretch
Isobooter designed for Stretch-Live
Whisker Menu modified
DEVX and Firmware squashfs modules Here
Run newest firefox with apulse, see Here , Here and Here
Change cursor theme workaround
Soundcard Selector + Alsa-equalizer discussion follow-up
Broadcom wl driver package
Workaround and/or alternative for installing abiword
Setup timezone and time with peasyclock (time setup discussion following)
Auto detect and change timezone (and time)
Some tips for making the system boot faster and/or running the system more light
Standalone installer program (from ISO) by rcrsn51
Gnost, a partition backup/restore system
Instructions for how to make it work on FatDog
Install Debian Stretch-Backports kernel

Thanks to everyone who recommended debootstrap, it's a very convenient and fast method.
A full netinstall is less minimal, more basic software included which is an advantage in a way
(using debootstrap you'll have to watch more carefully not to make it 'too minimal')

Fred
Last edited by fredx181 on Thu 08 Aug 2019, 17:50, edited 75 times in total.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#2 Post by fredx181 »

*** Updates and Fixes ***

2017-08-07:
- Fixed bug that it worked well only from an OS with the same kernel version as the default Stretch kernel version.
(works on Debian Jessie also now)
- Script is more compact, building time will be shorter, ISO size 161 MB
- More applications, right-click actions for PcManFM, Lz4 support for squashfs, etc.. , see more Here

Changes on 2017-08-18:
- GUI and CLI version into one, added different options: -help (no option, will show help) -gui -cli, or e.g. -cli <config_file> (use config file), -conf (create standard config file 'stretchlive.conf')
- The apt cache in /var/cache/apt will be kept (instead of downloading each time script is run)
- Added field 'Desktop' to the gui (see more info when clicking Information button)
- Creates 'build_setup.txt' in stretch folder containing how you configured the build and create 'build_setup.conf' (ready to use as config file)
- Added checkboxes (GUI):
------ Remove some automatically installed packages
(to keep ISO size more down)
(more info when clicking Information button)
------ If running 64 bit host OS, create a 32 bit build
- Multi-user support improved ('Add new user' in Menu)
(user puppy does not exist in the system but can be added, /home/puppy folder exists preconfigured already for openbox type of build)
- Added google-chrome repository (64 bit only)
(google-chrome-stable package can be added to apps list in the GUI)
(in /usr/local/bin there are launchers 'chrome-root.sh' and 'chrome-puppy.sh', thanks to dancytron
- Pin the kernel version (lock)
- Allow the user to make changes in chroot just before creating 01-filesystem.squashfs (script paused)
(use upgrade-kernel to upgrade to newer version)

To create log from output run e.g.:

Code: Select all

./mklive-stretch -cli 2>&1 | tee mklive-stretch.log
(note that progress of mksquashfs looks like it's idle for sometime)
2017-08-21, some small changes, see here
http://murga-linux.com/puppy/viewtopic. ... 085#965085

Important bugfixes:
http://murga-linux.com/puppy/viewtopic. ... 197#965197
http://murga-linux.com/puppy/viewtopic. ... 281#965281

2017-08-26 Added choice for (preconfigured) Desktop environments, see here:
http://murga-linux.com/puppy/viewtopic. ... 532#965532
2017-08-28 Bug fixed for LZ4 squashfs support:
http://murga-linux.com/puppy/viewtopic. ... 726#965726
2017-09-03 Added to GUI: Full 'Dog' build
http://murga-linux.com/puppy/viewtopic. ... 475#966475
2017-09-08 Added to GUI: Kiosk
http://murga-linux.com/puppy/viewtopic. ... 103#967103
2017-09-09 Added choice of DE also when used CLI
http://murga-linux.com/puppy/viewtopic. ... 201#967201
2017-09-12 Two more choices
http://murga-linux.com/puppy/viewtopic. ... 513#967513
2017-09-14 Boot from FAT32 didn't work, fixed
http://murga-linux.com/puppy/viewtopic. ... 755#967755
2017-09-17 Bugfix, more safe unmount 'mount binds'
http://murga-linux.com/puppy/viewtopic. ... 071#968071
2017-10-10 Should work from any puppy and from xenialdog now
http://murga-linux.com/puppy/viewtopic. ... 477#970477
2017-11-03 Added question yes/no at start of build to run Xterm after the install process.
http://murga-linux.com/puppy/viewtopic. ... 190#973190
2017-11-17 Added choice to install pae or no-pae kernel, in case of 32bit build
http://murga-linux.com/puppy/viewtopic. ... 507#974507
2017-11-23 changed installed kernel to 4.9.0-4 (previously was 4.9.0-3) and more small changes
http://murga-linux.com/puppy/viewtopic. ... 017#975017
2018-01-12 Kernel security update:
http://murga-linux.com/puppy/viewtopic. ... 018#980018
2018-01-13 added "xserver-xorg-video-intel" to packages install lists:
http://murga-linux.com/puppy/viewtopic. ... 225#980225
2018-02-24 Kernel upgrade to version 4.9.0-6
http://murga-linux.com/puppy/viewtopic. ... 977#983977
2018-08-15 Kernel upgrade to version 4.9.0-7
http://murga-linux.com/puppy/viewtopic. ... 71#1002171
2019-06-01 Kernel upgrade
2019-08-08 Some more impovements
http://murga-linux.com/puppy/viewtopic. ... 42#1033942
2019-08-17 Major change:
http://murga-linux.com/puppy/viewtopic. ... 59#1034559
2019-10-06 Upgrade kernel to 4.9.0-11:
http://murga-linux.com/puppy/viewtopic. ... 89#1038789

------------------------
Last edited by fredx181 on Mon 07 Oct 2019, 21:12, edited 34 times in total.

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#3 Post by dancytron »

I ran it from Stretch 64 and it absolutely seems to work.

I removed midori, lxpanel and synaptic from the list and got an ISO of about 130 meg. The filesystem01.squashfs file was less than 100 meg.

Installed it as porteus boot save on exit. Save to flash worked.

It doesn't really do anything though. . . :lol: :lol:

I take it that it uses the list of repositories from the distribution you are using to run it? That's what it seemed to do. edit: no it doesn't

I caught myself before I did it, but I imagine you don't want to run it from /root since that would fill up your ram memory and crash. Instead run it from the linux partition. Right?

I'll play with it some more later.

edit: I made another one. Then I installed all the deb dog specific scripts. Ran the quick remaster and it worked (used gzip, because you didn't say anything about lz4 working).

The only issue is that I somehow broke (or maybe just couldn't figure out) the network for my ethernet. Is there a file I should delete during the remaster to reset it or ???

Any way, this is a great accomplishment, alhough I'm not sure I'll be able to build anything I'll like better than your standard one.
Last edited by dancytron on Wed 02 Aug 2017, 08:28, edited 1 time in total.

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#4 Post by wiak »

My understanding of this is that it uses Debian debootstrap script to create a minimal Debian Stretch install in a chroot environment? And the rest of the script then adds to that to include Porteus boot and all the other Dog-related extras to create a Dog out of the debootstrap base?

https://wiki.debian.org/Debootstrap

http://www.thegeekstuff.com/2010/01/deb ... tallation/

EDIT: removed some comments since want to keep comments short and on point...

This method of producing Dogs certainly seems to be a positive way to go.

wiak

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

Re: Create Debian 9 (Stretch) minimal ISO similar to DebianDog

#5 Post by belham2 »

fredx181 wrote:
This may not be considered as just a how to, but as a project that can grow, e.g. extend the script by calling other scripts e.g. for having choice of different window-managers, desktop environments, applications.

So development depends on the interest, feedback and help from anyone. This is anyway some sort of base concept (that can be changed also, of course).

Hi Fred!

Interesting and good stuff! Thank you for your hard work. And this what I think is the most exciting part of this:

...but as a project that can grow, e.g. extend the script by calling other scripts e.g. for having choice of different window-managers, desktop environments, application....


Now, I just gotta hope my simple grasp of scripting skills are good enough that I can trial & error different WMs, DEs and Apps to do different builds :mrgreen: :wink: (is there a central location for all the dog-specific scripts, is it on your DDog webiste???)




P.S. I also wanted to give "Dancytron's" comment a big thumbs up:

"Any way, this is a great accomplishment, alhough I'm not sure I'll be able to build anything I'll like better than your standard one"

+1

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#6 Post by backi »

Hi belham,Fred and everybody !
You are a man of action Fred.
Smells like an interesting/exciting new Game/Kick.
Although i dont have any clue of how this is working i am going to start the engine and follow your instructions to to see what happens.
I am sure it is worth to keep an eye or maybe two on it .
Regards !

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#7 Post by backi »

Edit

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#8 Post by fredx181 »

Thanks guys !
dancytron wrote:I take it that it uses the list of repositories from the distribution you are using to run it? That's what it seemed to do. edit: no it doesn't
It creates new /etc/apt/sources.list and includes the right (stretch)dog repository depending if it's 32 or 64 bit build.
I caught myself before I did it, but I imagine you don't want to run it from /root since that would fill up your ram memory and crash. Instead run it from the linux partition. Right?
Yes, that's right don't run from e.g. /root but on a linux filesystem formatted partition, e.g. sda2
edit: I made another one. Then I installed all the deb dog specific scripts. Ran the quick remaster and it worked (used gzip, because you didn't say anything about lz4 working).

The only issue is that I somehow broke (or maybe just couldn't figure out) the network for my ethernet. Is there a file I should delete during the remaster to reset it or ???
Lz4 indeed not supported (yet)
I think your internet connection broke because the remaster script does clean one folder too many (it removes important part of peasywifi), inside quick-remaster script this line should be removed (or commented out:

Code: Select all

 rm -rf tmpa/etc/rc.d
Now that peasywifi is in the dog repositories, I guess I'll have to update all remaster script packages that have similar as this line (not sure yet, maybe easier to consult rcrsn51 about a small change in peasywifi) sigh...
wiak wrote:My understanding of this is that it uses Debian debootstrap script to create a minimal Debian Stretch install in a chroot environment? And the rest of the script then adds to that to include Porteus boot and all the other Dog-related extras to create a Dog out of the debootstrap base?
Exactly, however not all dog related, just some, the ones specially required for porteus-boot style and some more
Belham, to answer your question where the files are, it's here:
https://github.com/DebianDog/MakeLive
The ones ending with -stretch are used by the script, the tarball: https://github.com/DebianDog/MakeLive/b ... z?raw=true has the porteus-boot files and config files e.g. for autologin, sources.list and much more (these are all copied by the script to the chroot).

I will leave the script how it is for a while, just did a little 'visualizing' about how to extend, for example questions like:
"Which browser to include ?": 1) firefox 2) chromium 3) midori ...... *) "No thanks, I hate browsers" :lol:
Same maybe with file manager or window manager or even combinations (may be very complicated to accomplish though)

But perhaps the best thing to do first is to extend it with more handy dog applications, e.g. filemnt, sfs-load, lz4 support etc..
As always, any suggestions are welcome.

EDIT: Question to those who tested this. How long did it take ? (and with xz or gzip compression ?)

@backi, it's really easy, open a terminal on some linux partition, sda* (with at least 2GB free space) and run the script.

Fred

backi
Posts: 1922
Joined: Sun 27 Feb 2011, 22:00
Location: GERMANY

#9 Post by backi »

Hi Fred !
Followed your main instructions .
What i did:
Put resulting live Folder to an ext4 partition with grub4dos entry :

title PorteusDog (sda7)
find --set-root /TEST/live/vmlinuz1
kernel /TES/live/vmlinuz1 noauto from=/TEST changes=EXIT:/TESTlive/
initrd /TEST/live/initrd1.xz

Could not boot to Desktop :
This was the Message :
creating live filesystem and inserting modules
mount:mounting aufson/union failed:no such device
can`t setup union(aufs)-read only filesystem?
When you finish debugging press (Ctrl+Alt+Del) to reboot

The same with DebLive_stretch-i386.iso burnt to DVD

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#10 Post by dancytron »

Fred said:
But perhaps the best thing to do first is to extend it with more handy dog applications, e.g. filemnt, sfs-load, lz4 support etc..
As always, any suggestions are welcome.
I agree with this. It seems like the basic Debian Dog functions, create an sfs, mount and use an sfs, edit an sfs, and remaster could be included just listing the appropriate apps in the list at the top of the script.

Since you can delete midori and add firefox-esr or whatever, I am not sure browser choosing needs to be automated much more than that.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#11 Post by fredx181 »

Hi backi,

Sorry to hear, looking at your grub4dos entry, I assume this is typo:

Code: Select all

kernel /TES/live/vmlinuz1
(should be TEST)

But you couldn't boot burned ISO to cd either, looks like the creating of the 01-filesystem.squashfs is not fully completed, how big is it ? (right-click on it in filemanager > How Big ?)
Don't know, maybe the same problem as you had with apt2sfs a while back (not enough space ? on sda7)
Anyway I think I will implement in the script a check for at least 2.5 GB free space and otherwise exit.

Fred

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#12 Post by fredx181 »

dancytron wrote:Fred said:
But perhaps the best thing to do first is to extend it with more handy dog applications, e.g. filemnt, sfs-load, lz4 support etc..
As always, any suggestions are welcome.
I agree with this. It seems like the basic Debian Dog functions, create an sfs, mount and use an sfs, edit an sfs, and remaster could be included just listing the appropriate apps in the list at the top of the script.

Since you can delete midori and add firefox-esr or whatever, I am not sure browser choosing needs to be automated much more than that.
Yes, indeed those kind of special dog applications should be included (and implement right-click actions for filemanager associations).
I agree, a browser can be easily replaced, so better think about including choices that are not straight forward to do by a user.

Fred

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

#13 Post by saintless »

fredx181 wrote:t...his line should be removed (or commented out:

Code: Select all

 rm -rf tmpa/etc/rc.d
Now that peasywifi is in the dog repositories, I guess I'll have to update all remaster script packages that have similar as this line (not sure yet, maybe easier to consult rcrsn51 about a small change in peasywifi) sigh...
Removing /etc/rc.d, /etc/DISTRO_SPECS, and /initrd in remasterdog and remastercow scripts is sometning I insisted to include to prepare DebianDog for puppy-boot option (using initrd.gz from puppy with debian kernel).
Better remove the lines above from the scripts to make easier puppy developers to keep the same structure for packages like peasywifi (inside /etc/rc.d for puppy and dog based system). Porteus-boot and live boot will not create /initrd or /etc.rc.d (both are puppy specific for important configuration files).

Toni

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#14 Post by fredx181 »

in the other thread, tired :) belham2 wrote:[ignore everything I just wrote] Wink

...let me try something here, about ready to hit myself between the eyes for possibly confusing the partitions.....

Nope, sadly, I didn't confuse them. Well, the build process seems to go great, gives me the big "OK" at the end. But nothing I can do will get either of the two builds I did to boot up.

Will try tomorrow----maybe will swap out stuff from Trinity Stretch and see if the problem is either the vmlinuz and/or possible the initrd1.xz (my betting money would be on the initrd1.xz).
Yes, good to try initrd1.xz from Trinity-Stretch, could be the problem with that
A few questions:
- 01-filesystem.squashfs, what's the size (from right-click > How big ?)?
- From what OS you did run it ?
- Enough free space on the partition you build on ?

Since dancytron and I didn't have the problem, I'm thinking in the direction of missing packages (failed download through https, ISP issue ?), and apt-get possibly refuses to install anything if one or more packages it cannot find.
just guessing though. We'll see later tomorrow.

Fred

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#15 Post by belham2 »

Fred,

This is just wonderful......I wonder if people in the puppy world will realize how this script approach of yours is stepping ahead of them in many ways when it comes to what a simple, beautiful build process can be. My God, woof-CE can learn something here. It overall is so nice. I mean, the build is only ~165MB, it's the latest Debian, it updates so easy beyond anything in puppy world, and I can install anything from Synaptic and all the deb repos (and yours, Toni's, others...)

I just don't have words to tell you how much fun this is and was.

20 mins to build on a very slow amd single-core Sempron from 2005, it still took only 20 mins. On faster machines, it will move below 10 mins! And to think of the customizations that can be done to this build script.....the ideas going off in my head are so numerous it is going to explode :wink: Well done, my friend, very, very well done.
Attachments
Stretch9-Mini-Build-Script-This-is-INCREDIBLE.png
(106.82 KiB) Downloaded 20775 times

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#16 Post by dancytron »

fredx181 wrote:Thanks guys !
dancytron wrote:I take it that it uses the list of repositories from the distribution you are using to run it? That's what it seemed to do. edit: no it doesn't
It creates new /etc/apt/sources.list and includes the right (stretch)dog repository depending if it's 32 or 64 bit build.

/snip/

Fred
I think an improvement might be to allow specifying additional repositories as a variable in the script. Of course, I'm thinking of Chrome, but there are lots of other "independent" Debian/Ubuntu repositories out there that people might want to use.

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#17 Post by belham2 »

fredx181 wrote: A few questions:
- 01-filesystem.squashfs, what's the size (from right-click > How big ?)?
- From what OS you did run it ?
- Enough free space on the partition you build on ?

Fred

1) 133.5MB for the 01-filesystem.squashfs

2) Ran it from Trinity-Stretch 32

3) a 3GB build partition, then moved what I needed over to my big "frugal" partiton with all the various Puppies, DDogs, Trinities and Toni's Mintpup, and BAMMMM---it booted like a champ once I realized the dumba## stunt I was pulling when first trying to get it to boot (plz don't ask, it is embarrassing, lol).


I AM LOVE with this process----oooooh, the moditifcations to the build-script are running through my head, question popups for what DE you want, what borwser, what email, etc, etc......the customization could be incredible.

I am not going to bed NOW (unless the wife come stomping down the stairs and flashes me the "I am going to KILL YOU" look, lol)....I am having too much fun here. :D :lol: :wink:

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#18 Post by fredx181 »

Thanks belham :)

Glad it works now for you, so the "at least 2 GB needed" I wrote should probably changed ? (assuming not enough disk space was the reason it didn't work first few times for you)
Heading to bed now :wink:

Fred

dancytron
Posts: 1519
Joined: Wed 18 Jul 2012, 19:20

#19 Post by dancytron »

belham2 wrote:
fredx181 wrote: A few questions:
- 01-filesystem.squashfs, what's the size (from right-click > How big ?)?
- From what OS you did run it ?
- Enough free space on the partition you build on ?

Fred

1) 133.5MB for the 01-filesystem.squashfs

2) Ran it from Trinity-Stretch 32

3) a 3GB build partition, then moved what I needed over to my big "frugal" partiton with all the various Puppies, DDogs, Trinities and Toni's Mintpup, and BAMMMM---it booted like a champ once I realized the dumba## stunt I was pulling when first trying to get it to boot (plz don't ask, it is embarrassing, lol).


I AM LOVE with this process----oooooh, the moditifcations to the build-script are running through my head, question popups for what DE you want, what borwser, what email, etc, etc......the customization could be incredible.

I am not going to bed NOW (unless the wife come stomping down the stairs and flashes me the "I am going to KILL YOU" look, lol)....I am having too much fun here. :D :lol: :wink:
Let's be careful not to kill the elegant simplicity of it.

How about just embedding some different "recipes" inside the script but commented out? Want xfce, uncomment the xfce line. Want lxde, then uncomment the lxde line. Want KDE with libre-office, Firefox, Thunderbird, Gimp, KODI and all the other goodies, then uncomment that line.

That could then become an easy way to share configs, by just saying, "This is the recipe that I used, just paste it into the script and go."

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#20 Post by wiak »

The script is really quite simple at the moment so would be a good time to think about modularising it in such a way that it could easily be amending for particular purposes/additions/distributions without changing the resulting core script. I played with mcewanw's wex recently and it has some kind of facility for addon functions without needing to change original script at all, but I'm pretty much a novice myself when it comes to scripting.

wiak

Post Reply