Bullseye build script

a very small Live CD shaped to look and act like Puppy Linux.

Moderator: fredx181

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

fredx181 wrote: Mon Aug 23, 2021 1:36 pm
wiak wrote: Mon Aug 23, 2021 10:42 am

Code: Select all

for i in `seq -w 02 99`;do mkdir -p $i; touch ${i}/file${i};mksquashfs $i ${i}test.sfs; rm -rf $i; done

The resulting numbered files are all layered to appear under / directory of the merged overlay.
....

Many thanks William, nice way to be able to test loading 100 modules (changed .sfs to .squashfs).
On Bullseye, tested booting with the 100 .squashfs and went without errors for me, so indeed it can not be a limitation of 'overlay':
2021-08-23-150725_897x641_scrot_597x427.png

I tried to make squashfs with wiak script and it also worked for me.
In my tests I made multiple copies of a slightly more complex file ( https://1fichier.com/?f5rhmbuv5mg7itzzjnph ) and it didn't work.
Maybe the problem is when there are folders in the SFSs...

I will try with this modified script (puts the files in a subfolder):

Code: Select all

for i in `seq -w 02 99`;do mkdir -p $i/$i; touch ${i}/${i}/file${i};mksquashfs $i ${i}test.sfs; rm -rf $i; done

EDIT : This also worked

EDIT 2:
I tried loading 120 squashfs (list : https://pastebin.com/fJeHairy ) and it worked!
If I add more copies of add-architecture_i386_v2bullseye.squashfs it won't work...
As you can see it loads with many XXX*.squashfs (made with a modification of wiak script to create more subfolders).

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Still a mystery, trister !
I've made 100 .squashfs with a file of 50MB created inside and it worked OK booting with these.
for i in `seq -w 02 99`;do mkdir -p $i/$i; fallocate -l 50M ${i}/${i}/file${i};mksquashfs $i ${i}test.squashfs; rm -rf $i; done

Btw, For info, it doesn't seem to make any difference if I modify linuxrc inside initrd1.xz to create e.g. 255 loop devices, with the (default) 20 set in linuxrc, booting with 100 .squashfs works OK (maybe it's a feature of overlay that it's done automatically to create these extra loop devices :?: )

EDIT: Just idea, gotta try anything out, I think, see what happens if you rename k-5.10.0-8-amd64.squashfs to 00-k-5.10.0-8-amd64.squashfs (so it becomes first in the order).
(or making it last in order may be worth experimenting with, e.g. zzzzzzzzzzzzz-k-5.10.0-8-amd64.squashfs, or change any other order if you become really desperate ;) )

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

fredx181 wrote: Mon Aug 23, 2021 4:32 pm

Still a mystery, trister !
I've made 100 .squashfs with a file of 50MB created inside and it worked OK booting with these.
for i in `seq -w 02 99`;do mkdir -p $i/$i; fallocate -l 50M ${i}/${i}/file${i};mksquashfs $i ${i}test.squashfs; rm -rf $i; done

Btw, For info, it doesn't seem to make any difference if I modify linuxrc inside initrd1.xz to create e.g. 255 loop devices, with the (default) 20 set in linuxrc, booting with 100 .squashfs works OK (maybe it's a feature of overlay that it's done automatically to create these extra loop devices :?: )

EDIT: Just idea, gotta try anything out, I think, see what happens if you rename k-5.10.0-8-amd64.squashfs to 00-k-5.10.0-8-amd64.squashfs (so it becomes first in the order).
(or making it last in order may be worth experimenting with, e.g. zzzzzzzzzzzzz-k-5.10.0-8-amd64.squashfs, or change any other order if you become really desperate ;) )

I Tried renaming files ( eg 100 files named bb*.squashfs). I dont think the problem is there. Maybe if many folders/files overlay into one of linux folders ( etc/var/usr...) Then the oroblem appears.

Can you try making eg 70 copies of my file https://1fichier.com/?f5rhmbuv5mg7itzzjnph (or maybe any other squashfs you use) and check if it works for you?

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

trister wrote:

Can you try making eg 70 copies of my file https://1fichier.com/?f5rhmbuv5mg7itzzjnph (or maybe any other squashfs you use) and check if it works for you?

Finally, with these 70 modules, yes, I could reproduce the error 'out of memory' you got, tried the same with 50 instead of 70 and then it went well though.
No clue yet how to solve this, I'll think about it, just tell me if I can test more for you.

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

fredx181 wrote: Mon Aug 23, 2021 6:37 pm
trister wrote:

Can you try making eg 70 copies of my file https://1fichier.com/?f5rhmbuv5mg7itzzjnph (or maybe any other squashfs you use) and check if it works for you?

Finally, with these 70 modules, yes, I could reproduce the error 'out of memory' you got, tried the same with 50 instead of 70 and then it went well though.
No clue yet how to solve this, I'll think about it, just tell me if I can test more for you.

Thanks.
I have nothing else to try. The only difference I could find between the auto-generated files and the real-usage files is the folders used (etc , var).
Maybe it has to do with path depths/sizes... I don't know...

{edit}
Also tried with rcrsn51's DebLive_Bullseye-amd64-6.iso ( kernel k-5.10.0-6-amd64). I made 80 copies of my doublecmd squashfs.
Again the same 'out of memory' error.

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

@trister
When I shorten the names of the duplicated files, e.g. 01add-architecture_i386.squashfs 02add-architecture_i386.squashfs etc... it boots OK with 70 modules.
tee <add-architecture_i386_v2bullseye.squashfs {01..70}add-architecture_i386.squashfs >/dev/null
So I'm beginning to suspect that it has to do with long filenames (specially a lot of long filenames, alltogether).
That's probably also why the 100 "test' filenames worked ok.

User avatar
wiak
Posts: 3626
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 993 times
Contact:

Re: Bullseye build script

Post by wiak »

I read about possible limits in search yesterday. Maybe to do with the discussion in the following links:

https://github.com/moby/moby/issues/26380

I assume that restriction comes from the 4 KB mount option size. It is mentioned that the shortened IDs have been implemented because of that.

https://github.com/containerd/containerd/issues/2497

The number of layers is limited by the max size of the mount option buffer in the kernel (1 page/4096bytes in general).

Bit of a pain, if this limitation can't be worked around, for some applications of overlay though...

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

wiak wrote: Tue Aug 24, 2021 5:38 am

I read about possible limits in search yesterday. Maybe to do with the discussion in the following links:

https://github.com/moby/moby/issues/26380

I assume that restriction comes from the 4 KB mount option size. It is mentioned that the shortened IDs have been implemented because of that.

https://github.com/containerd/containerd/issues/2497

The number of layers is limited by the max size of the mount option buffer in the kernel (1 page/4096bytes in general).

Bit of a pain, if this limitation can't be worked around, for some applications of overlay though...

Thanks for your time fred & wiak!
So, I guess we're back in the good old windows days... In older windows I had issues with length of files.

From what I understand this can'tbe solved with different kernel compile options.
Is there an easy way to be solved with modifications in initrd ?

Last edited by trister on Tue Aug 24, 2021 6:33 am, edited 1 time in total.
User avatar
wiak
Posts: 3626
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 993 times
Contact:

Re: Bullseye build script

Post by wiak »

If its a kernel fixed buffer limit, then I'd go with dancytron's suggestion of maybe auto-merging groups of sfs-files in some recoverable way maybe if you are approaching overlay layer limit. Or go with very small filenames??? if that indeed solves the issue...

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

wiak wrote: Tue Aug 24, 2021 6:22 am

If its a kernel fixed buffer limit, then I'd go with dancytron's suggestion of maybe auto-merging groups of sfs-files in some recoverable way maybe if you are approaching overlay layer limit. Or go with very small filenames??? if that indeed solves the issue...

I'm already over this limit :)
It will very very difficult to maintain mega-sfs files. Tried it to the past.

I see 2 options for me here:
1. Smaller filenames . I must find a way to keep versioning. Maybe keep an extra .txt file with the fullfilename

2. Use a script I saw somewhere in this forum that can allow me to load on-demand a whole folder with squashfs files.

The 2nd approach should be good for files with no init script. The problem is that I have another issue : I can't de-activate loaded squashfs .It says 'file not currently activated'. Tried both with right click menu option and SFS-load GUI.

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

trister wrote:

So, I guess we're back in the good old windows days... In older windows I had issues with length of files.

Yeah, I remember, that was very inconvenient.

I see 2 options for me here:
1. Smaller filenames . I must find a way to keep versioning. Maybe keep an extra .txt file with the fullfilename

2. Use a script I saw somewhere in this forum that can allow me to load on-demand a whole folder with squashfs files.

The 2nd approach should be good for files with no init script. The problem is that I have another issue : I can't de-activate loaded squashfs .It says 'file not currently activated'. Tried both with right click menu option and SFS-load GUI.

Yes, you cannot unload on demand a module that's loaded at boot.
3rd option could be to stay with Buster, it's still supported (for several years from now).

I was hoping that some kernel parameter could fix this long names issue, but not sure, doesn't seem to exist. This issue goes beyond my knowledge.
Sometimes I regret having made the switch to 'overlay', but was sort of forced to because Debian doesn't apply the aufs patches anymore on it's kernel (and also "aufs-dkms" is not updated anymore for some time already).

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

@trister Don't know if it's valuable for you, but I found that symlinking the .squashfs modules to a very short filename (e.g. number only) works well to workaround the issue, should be on a Linux filesystem (or maybe NTFS works too), NOT on FAT32:

Say I have all my .squashfs modules placed in a folder named "sfs" inside "live" then from terminal in live I did:

Code: Select all

### from terminal standing in "live", squashfs modules in subfolder "sfs"
a=1
for i in sfs/*.squashfs; do
new=$(printf "%03d.squashfs" "$a")
ln -s "${i}" "$new"
let a=a+1
done

Then all modules are symlinks sequenced e.g. 01.squashfs 02.squashfs etc..

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

fredx181 wrote: Tue Aug 24, 2021 11:05 am

@trister Don't know if it's valuable for you, but I found that symlinking the .squashfs modules to a very short filename (e.g. number only) works well to workaround the issue, should be on a Linux filesystem (or maybe NTFS works too), NOT on FAT32:

Say I have all my .squashfs modules placed in a folder named "sfs" inside "live" then from terminal in live I did:

Code: Select all

### from terminal standing in "live", squashfs modules in subfolder "sfs"
a=1
for i in sfs/*.squashfs; do
new=$(printf "%03d.squashfs" "$a")
ln -s "${i}" "$new"
let a=a+1
done

Then all modules are symlinks sequenced e.g. 01.squashfs 02.squashfs etc..

Amazing!!!
This worked on NTFS!
With the knowledge you gave me for initrd I'm thinking 2 plans:
1.Implementing this directly on initrd (=first linking everything on folder named sfs1 and them load them)
2.I saw how to get parameters like copy2ram in initrd linuxrc (or at least I think I understood). I could try to implement parameters sfs1 ,sfs2 etc for determining during boot which folders to use to make links and then load them. I have created similar scripts soI don't think it will be a problem. (of course I would have to add a way to clear other links when needed eg delsfs1)

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

trister wrote: Tue Aug 24, 2021 11:51 am

With the knowledge you gave me for initrd I'm thinking 2 plans:
1.Implementing this directly on initrd (=first linking everything on folder named sfs1 and them load them)
2.I saw how to get parameters like copy2ram in initrd linuxrc (or at least I think I understood). I could try to implement parameters sfs1 ,sfs2 etc for determining during boot which folders to use to make links and then load them. I have created similar scripts soI don't think it will be a problem. (of course I would have to add a way to clear other links when needed eg delsfs1)

{EDIT} managed to run my script but doesn't link correctly){/edit}
Note: this is not important just for talking :)
menu entry:
title dogbullseye_test -INITRDLNSFS1 sfs1 sfs2 sfs3
find --set-root --ignore-floppies /dogbullseye_test/live/initrdlnsfs1.xz
kernel /dogbullseye_test/live/vmlinuz1 from=/dogbullseye_test linksfs1 linksfs2 linksfs3
initrd /dogbullseye_test/live/initrdlnsfs1.xz

I put this code inside linuxrc :

Code: Select all

# link SFS1
if param linksfs1; then
    echo $i"linking files from folder sfs1, this may take some time..."
    a=1
	for i in sfs1/*.squashfs; do
		new=$(printf "%03d_sfs1.squashfs" "$a")
		ln -s "${i}" "$new"
		let a=a+1
	done
fi
User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Hi trister, hmmm... didn't understand from your above post if your linuxrc edit works properly.

Anyway, meanwhile I've been experimenting with 2 options (modified 'finit', the functions script for linuxrc) both work OK with 100 squashfs modules from what I tested.
Can you try one of the options (or both) by replacing "finit" in the initrd ?

1) Truncates names of the module mountpoints (to 10 chars, change the 10 at NAME="${NAME:0:10}" near the bottom of finit if you like less or more.
One disadvantage may be problem if 2 or more modules begin with the same 10 chars, it might happen, in that case any duplicate will be skipped,
advantage compared to 2) is that you can see a little which module is which, but that is of course the first 10 chars only though)

finit-truncate.gz
rename to finit and replace in initrd
(7.81 KiB) Downloaded 22 times

(rename to finit)

2) Changes the names of the module mountpoints to sequenced number (similar as in above posts, but no symlinks needed)

finit-numbered.gz
rename to finit and replace in initrd
(7.78 KiB) Downloaded 27 times

(rename to finit)

With both ways the modules can be in "live" just as it normally used to be before, and the advantage compared to the symlink method is that it should work on FAT32 too.

Other option may be a combination of the two, truncated names numbered in sequence, didn't try that (yet?)

Fred

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

fredx181 wrote: Tue Aug 24, 2021 2:11 pm

Hi trister, hmmm... didn't understand from your above post if your linuxrc edit works properly.

Anyway, meanwhile I've been experimenting with 2 options (modified 'finit', the functions script for linuxrc) both work OK with 100 squashfs modules from what I tested.
Can you try one of the options (or both) by replacing "finit" in the initrd ?

1) Truncates names of the module mountpoints (to 10 chars, change the 10 at NAME="${NAME:0:10}" near the bottom of finit if you like less or more.
One disadvantage may be problem if 2 or more modules begin with the same 10 chars, it might happen, in that case any duplicate will be skipped,
advantage compared to 2) is that you can see a little which module is which, but that is of course the first 10 chars only though)
finit-truncate.gz (rename to finit)

2) Changes the names of the module mountpoints to sequenced number (similar as in above posts, but no symlinks needed)
finit-numbered.gz (rename to finit)

With both ways the modules can be in "live" just as it normally used to be before, and the advantage compared to the symlink method is that it should work on FAT32 too.

Other option may be a combination of the two, truncated names numbered in sequence, didn't try that (yet?)

Fred

These were both good solutions so, I merged them and it worked. With size 14 +4 I loaded 120 squashfs files.
I attach the modified finit.
full initrd postedd here (just rename it to initrd1.xz) : https://1fichier.com/?qcg5yv88bchwr606rabi

Attachments
finit__jonmod06_truncateAndNumber-OK.txt
(7.83 KiB) Downloaded 32 times
User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Last but not least:
3) Numbered and truncated combined, I think it's the best option, but who am I ? Normally I never load 100+ modules ;)

finit-numbered-truncated.gz
(7.81 KiB) Downloaded 28 times

rename to finit and replace in initrd

edit: ah, posts crossed each other, I'll test your finit.
edit2: Yes, yours works well, difference is that the number is at the end which is fine too.

User avatar
wiak
Posts: 3626
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 993 times
Contact:

Re: Bullseye build script

Post by wiak »

fredx181 wrote: Tue Aug 24, 2021 11:05 am

@trister Don't know if it's valuable for you, but I found that symlinking the .squashfs modules to a very short filename (e.g. number only) works well to workaround the issue, should be on a Linux filesystem (or maybe NTFS works too), NOT on FAT32:

Say I have all my .squashfs modules placed in a folder named "sfs" inside "live" then from terminal in live I did:

Code: Select all

### from terminal standing in "live", squashfs modules in subfolder "sfs"
a=1
for i in sfs/*.squashfs; do
new=$(printf "%03d.squashfs" "$a")
ln -s "${i}" "$new"
let a=a+1
done

Then all modules are symlinks sequenced e.g. 01.squashfs 02.squashfs etc..

That's an excellent idea.

I've slowed down a lot in terms of development work overall during the past year. Not sure why - covid situation depressing - don't feel old, but getting older - can't be bothered - but most of all a general losing of 'focus', which this kind of work needs a lot of. I find my ability to focus comes and goes (throughout my life) so maybe I'll get back into it all again eventually. The other truth remains that until I for some reason or other started firstrib/weedog I had no interest myself in putting together any distro since my own interest was more in system level C programming though less for practical use than just an old interest from my previous engineering life. re: WeeDog: The main items I have left hanging is a save2flash/snapmerge sort of script - I suppose I could take your one, no doubt highly now modified to work with overlayfs, and modify that to work with WeeDog. However, truth to tell, I don't really use RAM mode very often, don't run from usb sticks and basically hope modern SSD drives last as long as my computer is likely to need them anyway (might not of course...) - so I very much doubt I'll get round to that. Instead I tend to not hardly use changes folder at all (and just merge old changes folders into sfs layers (merging them together every so often. So I do run in RAM but don't save changes.

However, one thing I'd really like to get back to is produce a small initrd for WeeDog systems in that Thomas M style you now use for the DebianDogs. But... in practice it remains such a low priority for me (too busy working for actual money nowadays - non-computer-related) that I may never get round to it, and again, I am suffering from this no-focus/lack-of-dev-enthusiasm void. I keep hoping I will snap out of the lost enthusiasm (though sometimes I'm glad I have it since frees up my time for other matters).

Anyway, good to see you are sticking in there and still developing the DebianDogs, which I would agree with Duprate are the number one system from this forum in present day. However, it is neither any accolade of being considered the most popular or considered by anyone as the 'best' that is important in any distro's development. In fact diversity (variety in the form of alternatives) is much more important overall in terms of stimulating continuous improvement (aided by an attitude of cooperation rather than competition, and damaged by closed mindsets who see diversity as threatening or confusing...), and 'best' is of course a relative term since it depends what (and with regards to the context) you want something for.

Of course, I never intended making any polished distro using firstrib/weedog myself. I just wanted a simple lego-style small build script system with an emphasis on busybox/xbps for Void Linux only and really just to play with via simple plugins - and I continue to enjoy WDL for that purpose (be it with Void, or Arch, or Debian-based simple builds like the simplest apt-capable L_GO ones). But overall, I'd recommend DD to most people who aren't interested in too much tinkering - DD distros are long established as working and working well - but even longer term you need a 'team' of other devs (do you have children?) who can take over your work once you reach one hundred years old or whenever you just want to sit in cafes drinking coffee.

wiak

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

So far the modification of fred script work extremelly well.
No issue.

trister wrote: Tue Aug 24, 2021 7:05 am

...The problem is that I have another issue : I can't de-activate loaded squashfs .It says 'file not currently activated'. Tried both with right click menu option and SFS-load GUI.

All the squashfs from the live folder can't be deactivated. The activated ones (after startx ) can be deactivated.
This issue is normal for overlay or this is problem only for my setup?

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

trister wrote: Sun Aug 29, 2021 11:33 am

So far the modification of fred script work extremelly well.
No issue.

trister wrote: Tue Aug 24, 2021 7:05 am

...The problem is that I have another issue : I can't de-activate loaded squashfs .It says 'file not currently activated'. Tried both with right click menu option and SFS-load GUI.

All the squashfs from the live folder can't be deactivated. The activated ones (after startx ) can be deactivated.
This issue is normal for overlay or this is problem only for my setup?

Yes, it's "normal", the way modules are loaded at boot is using overlay, but (de)activate on-the-fly has a very different mechanism, rather than overlay it's using symlinks, from mountpoints in /mnt/live/memory/images/SFS.
This symlink method was the only way I could think of, because AFAIK overlay doesn't allow remounting with added extra modules (and also not removed modules) once booted. It's a disadvantage compared to aufs, which is more flexible, i.e. to be able to add/remove modules from stack.
The on-the-fly symlink method started as experimental viewtopic.php?p=11354#p11354, is now more mature I think, but still not very much tested.
EDIT: Latest changes info: viewtopic.php?p=27403#p27403

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

*** Updated mklive-bullseye ***

New script attached at first post. viewtopic.php?p=14736#p14736

Change:
- Added option to use systemd as init system
When using -gui:

2021-09-12-183840_577x33_scrot.png
2021-09-12-183840_577x33_scrot.png (4.91 KiB) Viewed 1485 times

Or when using -cli:
Set SYSTEMD="TRUE" in config file (default is "FALSE", no systemd)).

For Buster, it was possible to make the change to systemd with a workaround: viewtopic.php?p=208#p208
But for Bullseye it didn't seem possible for me to do similar.
Therefore I thought best to setup a new repository to support that: https://github.com/doglinux/bullseye/raw/master/amd64/ (for "no systemd", the existing repository https://github.com/doglinux/bulldog/raw/master/amd64/ will still be used).
Reason is that I'd like to offer choice and that there are some limitations when not using systemd, see for example here: viewtopic.php?p=36098#p36098
Also, deratives, like SparkyBonsai (using systemd as default) may have profit from this new "systemd friendly" repository viewtopic.php?p=36751#p36751

Fred

gumanzoy
Posts: 36
Joined: Mon May 03, 2021 3:38 pm
Has thanked: 2 times
Been thanked: 6 times

Re: Bullseye build script

Post by gumanzoy »

fredx181 wrote: Sat Sep 04, 2021 4:32 pm

In fact it's very similar to Devuan, and I just found that Devuan has a "banned" list of packages https://pkgmaster.devuan.org/bannedpackages.txt.
So probably (most of) these packages cannot be installed on DebianDog too.

xfce4-power-manager
xfce4-power-manager-plugins

Install in BullseyeDog and work ok, without systemd

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

gumanzoy wrote: Sun Sep 12, 2021 5:04 pm
fredx181 wrote: Sat Sep 04, 2021 4:32 pm

In fact it's very similar to Devuan, and I just found that Devuan has a "banned" list of packages https://pkgmaster.devuan.org/bannedpackages.txt.
So probably (most of) these packages cannot be installed on DebianDog too.

xfce4-power-manager
xfce4-power-manager-plugins

Install in BullseyeDog and work ok, without systemd

It's only excluded where it shows "D" (D = chimaera, which is equivalent to Bullseye), I previously didn't read that well.
edit; it's really a small amount, the "banned/excluded" packages for Bullseye without systemd, I can easily live with that, but for some it may be a problem.

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Re-attached mklive-bullseye at first post.
In case running with systemd viewtopic.php?p=36755#p36755, if a display-manager is installed, fix is that autologin will be disabled then (didn't work earlier).

User avatar
misko_2083
Posts: 196
Joined: Wed Dec 09, 2020 11:59 pm
Has thanked: 10 times
Been thanked: 20 times

Re: Bullseye build script

Post by misko_2083 »

Hey Fredx can you read this script?

Code: Select all

#!/bin/bash

# Menu code adapted from https://askubuntu.com/questions/1705/how-can-i-create-a-select-menu-in-a-shell-script
# Because I'm a good sport
# Misko

#"Openbox" "Openbox with pcmanfm (providing the desktop) and lxpanel, minimal"
#"Xfce4" " Xfce4 with Whisker Menu, minimal"
#"Jwm" " Jwm preconfigured, minimal"
#"Mate" " Mate basic"
#"DDog" " DebianDog Full Openbox_Xfce-Jwm version"
#"ObDog" " DebianDog Full, openbox with pcmanfm, lxpanel - or Jwm, with firefox"
#"ChromeDog" " DebianDog Full, openbox with pcmanfm, lxpanel - or Jwm, with google-chrome (64bit only)"
#"Tint2" " DebianDog Full, openbox with tint2, pcmanfm - or Jwm, with firefox"



      E='echo -e';e='echo -en';trap "R;exit" 2
    ESC=$( $e "\e")
   TPUT(){ $e "\e[${1};${2}H" ;}
  CLEAR(){ $e "\ec";}
  CIVIS(){ $e "\e[?25l";}
   MARK(){ $e "\e[7m";}
 UNMARK(){ $e "\e[27m";}
cursor_blink_on()   { printf "$ESC[?25h"; }
cursor_blink_off()  { printf "$ESC[?25l"; }
      R(){ CLEAR ;stty sane;CLEAR;};
   HEAD(){ for each in $(seq 1 18);do
           $E "   \xE2\x94\x82                                                \xE2\x94\x82"
           done
           MARK;TPUT 1 5
           $E "              Bullseye build script             " ;UNMARK;
           TPUT 2 5
           $E "      CHOOSE A DESKTOP ENVIRONMENT        " ;}
HEAD_II(){ for each in $(seq 1 18);do
           $E "   \xE2\x94\x82                                                \xE2\x94\x82"
           done
           MARK;TPUT 1 5
           $E "              Bullseye build script             " ;UNMARK;
           TPUT 2 5
           $E "           SELECT ADDITIONAL OPTIONS            " ;
           TPUT 4 10
           $E "  Desktop Environment $1" ;}
           i=0; CLEAR; CIVIS;
   FOOT(){ MARK;TPUT 18 5
           $E "    UP \xE2\x86\x91 \xE2\x86\x93 DOWN \xE2\x94\x82 \xe2\x86\xb5 ENTER - NEXT \xE2\x94\x82 EXIT - X     ";UNMARK;}
FOOT_II(){ MARK;TPUT 17 5
           $E "        \xe2\x86\x90  BACK \xE2\x94\x82 SPACE - SELECT \xE2\x94\x82              ";
           TPUT 18 5
           $E "    UP \xE2\x86\x91 \xE2\x86\x93 DOWN \xE2\x94\x82 \xe2\x86\xb5 ENTER - NEXT \xE2\x94\x82 EXIT - X     ";UNMARK;}
  ARROW(){ IFS= read -s -n1 key 2>/dev/null >&2
           if [[ $key = $ESC ]];then 
              read -s -n2 key 2>/dev/null >&2;
              if [[ $key = \[A ]]; then echo up;fi
              if [[ $key = \[B ]]; then echo dn;fi
           fi
           if [[  $key  = [xX]   ]]; then echo exit;fi;
           if [[ "$key" = ""     ]];then echo enter;fi;}
     M0(){ TPUT  4 20; $e "Openbox";
           TPUT  16 5; $e "  Openbox with pcmanfm (providing the desktop)  ";
           TPUT  17 5; $e "  and lxpanel, minimal                          ";}
     M1(){ TPUT  5 20; $e "Xfce4";
           TPUT  16 5; $e "         Xfce4 with Whisker Menu, minimal       ";
           TPUT  17 5; $e "                                                ";}
     M2(){ TPUT  6 20; $e "Jwm";
           TPUT  16 5; $e "          Jwm preconfigured, minimal            ";
           TPUT  17 5; $e "                                                ";}
     M3(){ TPUT  7 20; $e "Mate";
           TPUT  16 5; $e "              Mate basic                        ";
           TPUT  17 5; $e "                                                ";}
     M4(){ TPUT  8 20; $e "DDOG";
           TPUT  16 5; $e "  DebianDog Full Openbox_Xfce-Jwm version       ";
           TPUT  17 5; $e "                                                ";}
     M5(){ TPUT  9 20; $e "ObDog";
           TPUT  16 5; $e "  DebianDog Full, openbox with pcmanfm,         ";
           TPUT  17 5; $e "  lxpanel - or Jwm, with firefox                ";}
     M6(){ TPUT 10 20; $e "ChromeDog";
           TPUT  16 5; $e " DebianDog Full, openbox with pcmanfm, lxpanel  ";
           TPUT  17 5; $e " - or Jwm, with google-chrome (64bit only)      ";}
     M7(){ TPUT 11 20; $e "Tint2";
           TPUT  16 5; $e "  DebianDog Full, openbox with tint2,           ";
           TPUT  17 5; $e "   pcmanfm - or Jwm, with firefox               ";}
     M8(){ TPUT 12 20; $e "Skip";
           TPUT  16 5; $e "   Skip this step, use default, as defined      ";
           TPUT  17 5; $e "   on top of script (Openbox minimal)           ";}
     M9(){ TPUT 14 20; $e "EXIT";
           TPUT  16 5; $e "              Quit                              ";
           TPUT  17 5; $e "                                                ";}
      LM=9
   MENU(){ for each in $(seq 0 $LM);do M${each};done;}
    POS(){ if [[ $cur == up ]];then ((i--));fi
           if [[ $cur == dn ]];then ((i++));fi
           if [[ $i -lt 0   ]];then i=$LM;fi
           if [[ $i -gt $LM ]];then i=0;fi;}
REFRESH(){ after=$((i+1)); before=$((i-1))
           if [[ $before -lt 0  ]];then before=$LM;fi
           if [[ $after -gt $LM ]];then after=0;fi
           if [[ $j -lt $i      ]];then UNMARK;M$before;else UNMARK;M$after;fi
           if [[ $after -eq 0 ]] || [ $before -eq $LM ];then
           UNMARK; M$before; M$after;fi;j=$i;UNMARK;M$before;M$after;}
   INIT(){ R;HEAD;FOOT;MENU;}
     SC(){ REFRESH;MARK;$S;$b;cur=`ARROW`;}
     ES(){ INIT;};INIT
    MSEL() { cursor_blink_on()   { printf "$ESC[?25h"; }
             cursor_blink_off()  { printf "$ESC[?25l"; }
             cursor_to()         { printf "$ESC[$1;${2:-1}H"; }
             print_inactive()    { printf "$2  $1 "; }
             print_active()      { printf "$2  $ESC[7m$1 $ESC[27m"; }
             get_cursor_row()    { IFS=';' read -sdR -p $'\E[6n' ROW COL; echo ${ROW#*[}; }
             key_input()         {
             local key
             IFS= read -rsn1 key 2>/dev/null >&2
             if [[ $key = ""      ]]; then echo enter; fi;
             if [[ $key = [xX]    ]]; then echo exit;  fi;
             if [[ $key = $'\x20' ]]; then echo space; fi;
             if [[ $key = $'\x1b' ]]; then
               read -rsn2 key
               if [[ $key = [A ]]; then echo up;    fi;
               if [[ $key = [B ]]; then echo down;  fi;
               if [[ $key = [D ]]; then echo back;  fi;
             fi;}
             toggle_option()    {
               local arr_name=$1
               eval "local arr=(\"\${${arr_name}[@]}\")"
               local option=$2
               if [[ ${arr[option]} == true ]]; then
                 arr[option]=
               else
                 arr[option]=true
               fi
               eval $arr_name='("${arr[@]}")';}

            local retval=$1
            local options
            local defaults

            IFS=';' read -r -a options <<< "$2"
            if [[ -z $3 ]]; then
              defaults=()
            else
              IFS=';' read -r -a defaults <<< "$3"
            fi
            local selected=()

           for ((i=0; i<${#options[@]}; i++)); do
             selected+=("${defaults[i]}")
             printf "\n"
           done

           # determine current screen position for overwriting the options
           local lastrow=`get_cursor_row`
           local startrow=$(($lastrow - ${#options[@]}))

           # ensure cursor and input echoing back on upon a ctrl+c during read -s
           trap "cursor_blink_on; stty echo; printf '\n'; exit" 2
           cursor_blink_off
           local active=0
           while true; do
             # print options by overwriting the last lines
             local idx=0
             for option in "${options[@]}"; do
               local prefix="[ ]"
               if [[ ${selected[idx]} == true ]]; then
                 prefix="[x]"
               fi

               cursor_to $(($startrow + $idx))
               if [ $idx -eq $active ]; then
                 if [ $option == OPTION1 ]; then
                    TPUT  $((idx+6)) 6
                    print_active "$option" "$prefix"
                    TPUT $((idx+7)) 11
                    $e "Run a setup wizard on the next boot"
                 elif [ $option == OPTION2 ]; then
                    TPUT  $((idx+8)) 6
                    print_active "$option" "$prefix"
                    TPUT $((idx+9)) 11
                    $e "Force desktop package install"
                 fi
               else
                 if [ $option == OPTION1 ]; then
                    TPUT  $((idx+6)) 6
                    print_inactive "$option" "$prefix"
                    TPUT $((idx+7)) 11
                    $e "Run a setup wizard on the next boot"
                 elif [ $option == OPTION2 ]; then
                    TPUT  $((idx+8)) 6
                    print_inactive "$option" "$prefix"
                    TPUT $((idx+9)) 11
                    $e "Force desktop package install"
                 fi
               fi
               ((idx++))
             done

            # user key control
            case `key_input` in
              space)  toggle_option selected $active;;
              enter)  break;;
                 up)  ((active--));
                      if [ $active -lt 0 ]; then active=$((${#options[@]} - 1)); fi;;
               down)  ((active++));
                      if [ $active -ge ${#options[@]} ]; then active=0; fi;;
               back)  CLEAR; exec "$0";;
               exit)  CLEAR;exit 0;;
            esac
           done

           # cursor position back to normal
           cursor_to $lastrow
           printf "\n"
           cursor_blink_on
           eval $retval='("${selected[@]}")'
       }

  RUN(){
         if [[ $cur != back ]];then 
          R;HEAD_II "$1"
          FOOT_II;
           
          MSEL result "OPTION1;OPTION2" "false;;false"
          CLEAR
          ARG=
          if [[ ${result[0]} == true ]]; then
            ARG="option1"
          fi
          if [[ ${result[1]} == true ]]; then
            ARG="$ARG option2"
          fi

          $E "Selected:"
          $E "DE - $1"
          $E "Extra Options:"
          $E "arg - $ARG"
          exit
         fi
       }

  # ensure cursor and input echoing back on upon a ctrl+c during read -s
  trap "cursor_blink_on; stty echo; printf '\n'; exit" 2
  cursor_blink_off
  while [[ "$O" != " " ]] && [[ $cur != exit ]]; do case $i in
        0) S=M0;SC;if [[ $cur == enter ]];then RUN Openbox; fi;;
        1) S=M1;SC;if [[ $cur == enter ]];then RUN Xfce4; fi;;
        2) S=M2;SC;if [[ $cur == enter ]];then RUN Jwm; fi;;
        3) S=M3;SC;if [[ $cur == enter ]];then RUN Mate; fi;;
        4) S=M4;SC;if [[ $cur == enter ]];then RUN DDOG; fi;;
        5) S=M5;SC;if [[ $cur == enter ]];then RUN ObDog; fi;;
        6) S=M6;SC;if [[ $cur == enter ]];then RUN ChromeDog; fi;;
        7) S=M7;SC;if [[ $cur == enter ]];then RUN Tint2; fi;;
        8) S=M8;SC;if [[ $cur == enter ]];then RUN Not_Picked; fi;;
        9) S=M9;SC;if [[ $cur == enter ]];then R;exit 0;fi;;
 esac;POS;done

 CLEAR
 cursor_blink_on
fredx.gif

Fancy thought it is hard(er) to maintain.

Do you want to exit the Circus? The Harsh Truth
https://www.youtube.com/watch?v=ZJwQicZHp_c

User avatar
wiak
Posts: 3626
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 993 times
Contact:

Re: Bullseye build script

Post by wiak »

fredx181 wrote: Sun Sep 12, 2021 5:08 pm

but for some it may be a problem.

I can live with or without, but I prefer systemd for many reasons including keeping familiar with its operation - like coding generally, if I don't work with it regularly I soon forget... That's why I say 'cherrytree' is my brain - I rely on it at times (and then I discover the thing I once remembered, but forgot, was not afterall documented in my very disorganised cherrytree notes)...

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

misko_2083 wrote: Sun Sep 12, 2021 7:22 pm

Hey Fredx can you read this script?
......
......

Thanks Misko ! Almost unbelievable that this is done with bash only. Very good!
I'll think about if (and how) to implement this in the build script, hard for me to understand most of the code, so probably will take a while (struggling with it right now ;) )

Fred

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

Hello again.
I am posting about an issue I also had in BusterDog (but the fixes doesn't seem to work now).
In Bullseye 2 desktop enviroments are loaded. The desktop I use is the one that open with Ctrl+Alt+F1 and the second desktop is visible with Ctrl+Alt+F7.
I don't have any issue with speed/ram etc in my PC but It is not pleasing to the eye to see one desktop to load and then over this to see a second desktop load almost immidiatelly. Also it seems a waste of resources.
Fredx had posted a fix named lxmount in the past for BusterDog (but it doesn't solve this issue in bulleye).

I have attached an image from lxtask to see that almost everything is loaded 2 times (eg 2 fbxkb , 2 libwhiskermenu ,2 /usr/local/bin/start-up etc...).

Also I'm p[osting here the result of pstree in case it helps:

Code: Select all

root@live:~ $ pstree
init─┬─acpid
     ├─cron
     ├─cupsd
     ├─3*[dbus-daemon]
     ├─2*[dbus-launch]
     ├─dhcpcd
     ├─dhcpcd-run-hook───netmon_wce
     ├─elogind-daemon
     ├─2*[exec_desktopfil───firewallstatus]
     ├─2*[fbxkb.sh───fbxkb]
     ├─2*[freechk───sleep]
     ├─getty
     ├─login───bash───startx───xinit─┬─Xorg───9*[{Xorg}]
     │                               └─openbox───openbox-autosta───sh─┬─Thunar───6*[{Thunar}]
     │                                                                ├─conky───13*[{conky}]
     │                                                                ├─xfce4-clipman───2*[{xfce4-clipman}]
     │                                                                ├─xfce4-panel─┬─panel-1-whisker───2*[{panel-1-whisker}]
     │                                                                │             ├─panel-6-systray───2*[{panel-6-systray}]
     │                                                                │             ├─panel-9-places───2*[{panel-9-places}]
     │                                                                │             ├─sakura─┬─bash───pstree
     │                                                                │             │        └─{sakura}
     │                                                                │             └─6*[{xfce4-panel}]
     │                                                                └─xfdesktop───6*[{xfdesktop}]
     ├─5*[ntfs-3g]
     ├─pup-volume-moni───{pup-volume-moni}
     ├─2*[rshift-gui-lite───yad]
     ├─rsyslogd───3*[{rsyslogd}]
     ├─slim─┬─Xorg───9*[{Xorg}]
     │      └─openbox───openbox-autosta───sh─┬─Thunar───6*[{Thunar}]
     │                                       ├─conky───13*[{conky}]
     │                                       ├─xfce4-clipman───2*[{xfce4-clipman}]
     │                                       ├─xfce4-panel─┬─panel-1-whisker───2*[{panel-1-whisker}]
     │                                       │             ├─panel-6-systray───2*[{panel-6-systray}]
     │                                       │             ├─panel-9-places───2*[{panel-9-places}]
     │                                       │             ├─sakura─┬─bash
     │                                       │             │        └─{sakura}
     │                                       │             └─6*[{xfce4-panel}]
     │                                       └─xfdesktop───6*[{xfdesktop}]
     ├─2*[start-up───volumeicon]
     ├─udevd
     └─2*[xfconfd───2*[{xfconfd}]]

Any ideas where or how everything is loaded twice?

Attachments
Duplicates Desktop &amp; programs
Duplicates Desktop & programs
lxtask_bulleye__for_puppyforum.jpg (204.02 KiB) Viewed 1283 times
User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: Bullseye build script

Post by fredx181 »

Hi trister, yes, 2 Desktops loaded shouldn't happen.
I can only reproduce this if I have a display-manager (e.g. slim) running AND if auto-login through /etc/inittab is enabled.
I see that you have slim running.
But the build script should detect that and disable autologin through inittab when it finds that a display-manager e.g. slim is installed:
(EDIT: could it be that you installed slim afterwards ? (not at the build stage, but later, from the running system)

build script output wrote:

Unmounting mount binds in chroot
It looks like you have a display-manager installed
/usr/bin/slim
This probably will conflict with the default login method (through /etc/inittab)
Disabled autologin, using display-manager for login

So... I don't understand why it's loading twice for you, anyway, to see if autologin through inittab is enabled check in /etc/inittab if this line is uncommented, as this:
1:2345:respawn:/bin/login -f root tty6 </dev/tty1 >/dev/tty1 2>&1
If that's the case, autologin is enabled, then it should be disabled by doing:
cp -af /etc/inittab-noauto /etc/inittab
(or keep it how it is and uninstall slim if you don't need it)

If the problem is not caused by this "double login", I need to know more about your setup, how you did build Bullseye, to be able to reproduce.

Fredx had posted a fix named lxmount in the past for BusterDog

I can't remember, what was that exactly ?

Fred

trister
Posts: 89
Joined: Mon Sep 28, 2020 6:52 am
Has thanked: 18 times
Been thanked: 15 times

Re: Bullseye build script

Post by trister »

fredx181 wrote: Sun Sep 19, 2021 3:31 pm

...
cp -af /etc/inittab-noauto /etc/inittab
...

Fred

That was it! Problem fixed

Thanks :)

Post Reply

Return to “DebianDogs”