79MB WDL_Void core build (easily expandable)

Instructional HowTo section


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

79MB WDL_Void core build (easily expandable)

Post by wiak »

This howto allows you to construct a very small Void Linux compatible WDL_Void commandline desktop core distro, which can easily be expanded to full-on X graphical desktop WDL_Void distro. For convenience, and small size out-of-the-box, for this example I've used a FossaPup kernel/modules combination, but this is a fully Void Linux repo compatible distro and not a Puppy hybrid - any kernel/modules combination could be used including (probably best overall) official ones from Void Linux repo.

1. Create empty bootdir in boot partition of choice naming it WDL_Void (or whatever).
Into that WDL_Void directory put the following:
a. The main build_firstrib_rootfs script via the get_WDL_build_firstrib_rootfs_XXXrcX.sh script from here: viewtopic.php?p=37093#p37093
Remove the dummy tar and make it executable with chmod +x prior to running it.
Once you've fetched build_firstrib_rootfs script make it executable with chmod +x
b. The build plugin "f_00_Void_generic_NoX_WDLteam_vXXXrcX.plug" also from: viewtopic.php?p=37093#p37093
(Use the actual filename version_release numbers and not the XXX...X of course...). This plugin is a modified version of rockedge's original.

2. Now build the WDL_Void firstrib_rootfs by entering the following two commands at a terminal opened at that WDL_Void directory (choosing a suitable Void Linux repo near you):

Code: Select all

export CONNECTION_TIMEOUT=-1
./build_firstrib_rootfs-XXX.sh void default amd64 f_00_Void_generic_NoX_WDLteam_vXXXrcX.plug

The above will take a while as it downloads the Void Linux packages and builds the firstrib_rootfs ready to make bootable via WDL skeleton initrd.gz.

3. Into the WDL_Void directory now also put the following:
a. The Fossapup kernel (renamed to vmlinuz-linuz), and zdrXXX.sfs).
IMPORTANT: Now rename zdrvXXX.sfs to 00zdrvXXX.sh (i.e. two zeros at front of its filename since it is needed at overlayfs layer 00 to work correctly).
b. The get_WDLskelinitrdXXXrcX.sh script (NOT the kmod one), which you can obtain from here: https://weedoglinux.rockedge.org/viewto ... p=355#p355
(remove the dummy tar)
NOTE WELL!!! Use the latest 401 version only.
Make that executable with

Code: Select all

chmod +x get_WDLskelinitrdXXXrcX.sh

and
run it with command:
./get_WDLskelinitrdXXXrcX.sh
to fetch the standard WDL skeleton intrdXXXXX.gz (IMPORTANT: also now version 401), the modify_initrd_gz.sh script, and the external w_initXXXX code file.

4. Rename that initrdXXXXX.gz to initrd.gz

5. You now need to enter suitable firmware for your system into firstrib_rootfs at location firstrib_rootfs/usr/lib/firmware
If you wish, you can mount FossaPups fdrvXXX.sfs and extract all of its lib/firmware contents and put that in firstrib_rootfs/usr/lib/firmware EDIT IMPORTANT: No, can't use Fossapup fdrv firmware - you should use official Void Linux firmware even if using Puppy kernel and zdrv (see my NOTE WELL at foot of this post).
Alternatively, only take the (e.g. internet connect) firmware you need. I simply took the appropriate iwlwifi firmware for my system. Others may want ethernet firmware or bluetooth or whatever you definitely want to include for your specific system).

6. Now rename firstrib_rootfs directory to 08firstrib_rootfs, so that it occupies that overlayfs layer 08 position on booting - the 08 is just my preference to allow space above and below for other sfs addons such as 10gtkdialogGTK3_filemnt64.sfs.

7. You should now be able to boot it with a typical WDL menu.lst (or grub.cfg alternative format) such as:

Code: Select all

title WDL_Void
find --set-root uuid () b812c597-8099-4bee-9bb3-8b9c10f1e902
kernel /WDL_Void/vmlinuz-linux w_bootfrom=UUID=b812c597-8099-4bee-9bb3-8b9c10f1e902=/WDL_Void
initrd /WDL_Void/initrd.gz

8. By default, login is user=root passwd=root

NOTE: As long as you've installed suitable firmware for either ethernet or wlan into your firstrib_rootfs/usr/lib/firmware directory, you should usually be able to connect to the internet by simply entering the command:

Code: Select all

wiakwifi

Later if you lose connection, you can re-establish it with the command: wiakwifi reconnect
Also, you can mount filesystems with the command: wd_mount (for example: wd_mount sda4)
Consult Void Linux documentation for how to use xbps package manager to install other packages (or package templates).

9. Once you are satisfied WDL_Void is booting and working successfully, from your build distro you can compress the 08firstrib_rootfs/ directory with command such as:

Code: Select all

mksquashfs 08firstrib_rootfs/ 08firstrib_rootfs.sfs

Then you need to either delete directory 08firstrib_rootfs/ or make it inactive via renaming it to say, D08firstrib_rootfs/ prior to rebooting
You can always reactivate (rename) it back to 08firstrib_rootfs later, if you wish, in which case you would need to deactivate the sfs version by renaming to, for example, D08firstrib_rootfs.sfs.

Using only iwlwifi firmware, and Fossapup huge kernel and associated zdrv, and xz-compressed 08firstrib_rootfs.sfs, my own WDL_Void directory ended up being only 79MB in size (including bash/midnight-commander/wpa_supplicant/busybox/runit commandline-only full PAM/multi-user desktop including the excellent official Void Linux xbps package manager giving full Void Linux repo access) so there is plenty of scope for making very small WDL distros even with added X and GUI window manager and so on.

It's very easy to expand. Just look at the contents of f_00_Void_generic_NoX_WDLteam_vXXXrcX.plug in geany and you'll see how to do it...
In practice the firstrib_rootfs can alternatively also be easily added to from the build host via some optional WeeDogLinux utilities: mount_chrootXXX.sh and umount_chrootXXX.sh, which I'll explain usage of later.

rockedge can no doubt suggest the extra commandlines to add to the f_00_Void_generic_NoX_WDLteam_vXXXrcX.plug file if you want X and JWM manager and Puppy look and feel... Alternative, you can use the same extra xbps-install commands and configs from the booted system (or via mount_chroot/umount_chroot WDL utilities to be explained later). By the way, yes, you can use 10gtkdialogGTK3_filemnt64.sfs with this for the likes of filemount fullpathto/anyfile.iso to open up in Midnight Commander filemanager, but obviously that addon will be more useful once you've installed X, gtk+, a window manager such as JWM, and a file manager such as pcmanfm (or Rox if you so prefer). Note that Void Linux is a particular efficient and rock-solid distro, with an excellent 'xbps' package manager and repos, and thus so is this frugally installed WDL_Void.

wiak

Attachments
WDL_Void_cmdline_desktop_79MBtotal.png
WDL_Void_cmdline_desktop_79MBtotal.png (45.61 KiB) Viewed 3690 times

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

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

I'd be happy to receive WDL_Void full GUI desktop additions for that core f_00 plugin in this thread, and for now will likely store them here for user convenience.

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

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

I have built a WDL_Void core and successfully booted and logged in as root. Connected with wiakwifi on the command line.

The WDL_Void is using a Puppy Linux huge full real time kernel 5.4.70-rt40 with the firstrib_rootfs around 438 M so I used xz compression to squash the rootfs.

Code: Select all

mksquashfs firstrib_rootfs 07firstrib_rootfs.sfs  -b 1048576 -comp xz -Xdict-size 100% -noappend
2021-09-22-210247_674x187_scrot.png
2021-09-22-210247_674x187_scrot.png (35.24 KiB) Viewed 3621 times
User avatar
wiak
Posts: 4082
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1208 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

rockedge wrote: Thu Sep 23, 2021 12:46 am

I have built a WDL_Void core and successfully booted and logged in as root. Connected with wiakwifi on the command line.

The WDL_Void is using a Puppy Linux huge full real time kernel 5.4.70-rt40 with the firstrib_rootfs around 438 M so I used xz compression to squash the rootfs.

Code: Select all

mksquashfs firstrib_rootfs 08firstrib_rootfs.sfs  -b 1048576 -comp xz -Xdict-size 100% -noappend

Remember that /var/cache/xbps/ contains the installation xbps files so it's large contents can be removed rockedge. Also /boot may contain an unneeded Void-created initrd and maybe a copy of the kernel, so these can be removed to prior to your mksquashfs. I say this because I have a feeling my build was not so large as the figure you state prior to mksquashfs. Having said that, I can't remember the size for sure, and I've just built one but with minimum X additions by temporarily adding to the build plugin the following extras (I put this second line to last in the build plugin):

Code: Select all

xbps-install -y xorg-minimal xorg-fonts xf86-video-intel xf86-input-synaptics xterm

and nothing ended in /boot and after deleting contents of /var/cache/xbps uncompressed firstrib_rootfs is around 900MiB; going out now, but will mksquashfs that later to see final small X build size. EDIT: but X not starting for me - perhaps firmware issue. I'm trying to use fossapup fdrv lib/firmware transplanted into 08firstrib_rootfs - that didn't work - see my NOTE WELL below:

Above X install needs some further configuration but I won't be covering that here. NOTE WELL: my tests suggest it is important to use official Void Linux firmware even if using Fossapup kernel and zdrv (for the modules) - that combination appears to work fine and can slim down the Void Linux firmware to whatever works for you...

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

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

boots into 65 M of RAM using free -h to report

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

rockedge wrote: Thu Sep 23, 2021 1:12 am

boots into 65 M of RAM using free -h

I've tried installing small X above, but startx not getting me in - as I say in above post about it, I suspect issue with fossapup firmware not liked by Void X components (?), but I'm not sure. If worst comes to the worst I'll just use official Void firmware (slimmed down) if that is the issue. EDIT: Yes, my tests suggest it is important to use official Void Linux firmware (even if using Fossapup kernel and zdrv (for the modules) - that combination appears to work fine and can slim down the Void Linux firmware to whatever works for you...

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

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

I've updated mount_chroot.sh and umount_chroot.sh scripts so they also work with root filesystems not named firstrib_rootfs and uploaded them along with modify_initrd.sh and build_firstrib_rootfs scripts as attachments here: viewtopic.php?p=37093#p37093

Code: Select all

For usage:   ./<program> --help
For version: ./<program> --version

Difference is you can now run mount_chroot.sh (and similarly umount_chroot.sh like this:

Code: Select all

./mount_chroot.sh whatever

where the supplied argument 'whatever' is the name of the root filesystem directory. If no 'whatever' given then firstrib_rootfs is assumed.

So now you could, for example do the likes of:

Code: Select all

./mount_chroot.sh 08firstrib_rootfs  # the root filesystem directory name can be anything

and thereafter, once 'exit' out of the chroot prompt, (IMPORTANT TO DO) clean up the chroot mounts with:

Code: Select all

./umount_chroot.sh 08firstrib_rootfs

I was fed up having to rename firstrib_rootfs out of numbered form and back again when wanting to modify its contents via mount_chroot, so can now just leave in numbered name form.

wiak

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

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

I was fed up having to rename firstrib_rootfs out of numbered form and back again when wanting to modify its contents via mount_chroot

I also!! So I tried out a symlink for 08firstrib_rootfs called firstrib_rootfs which works as well with the mount / umount scripts

Now to try to add Xorg with:

Code: Select all

xbps-install -y xorg adwaita-icon-theme

then I will add:

Code: Select all

xbps-install -y xfce4 xfce4-panel

I am using upper_changes to do these installations in case I want (need) to delete it due to insurmountable errors. If does work I will go back and mount the firstrib_rootfs and then install the above packages.

status report to follow......

gabtech
Posts: 62
Joined: Sun Jul 19, 2020 12:29 pm
Been thanked: 2 times

Re: 79MB WDL_Void core build (easily expandable)

Post by gabtech »

@wiak

I successfully built and booted the core WDL_Void system and tried to connect to wifi network using wiakwifi. I do not have void firmware so the connection attempt was just a test to see if system is functional. Could you point me to void firmware download, thanks.

gabtech :thumbup2:

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

@gabtech I am using the huge kernel 5.4.70-rt40 and I mounted the fdrv.sfs that matches the kernel and copied the /lib/firmware contents of the directory to WDL_Void /lib/firmware ( will add a screenshot soon). I also had to add the modules from the zdrv.sfs to firstrib_rootfs in /lib/modules to get wiakwifi to see the system ethernet devices.

/lib

2021-09-23-104800_793x172_scrot.png
2021-09-23-104800_793x172_scrot.png (32.49 KiB) Viewed 3565 times

this is after installing Xorg and XFCE4 ->

2021-09-23-103535_1024x768_scrot.png
2021-09-23-103535_1024x768_scrot.png (32.87 KiB) Viewed 3562 times

The xfce-panel is not active in the screenshot and there is only the default configuration so far

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

@rockedge do you have that huge kernel, zdrv, and fdrv you are using available for download somewhere. I see you have X working with it and would like to try it. I couldn't get X to work if using Puppy fdrv firmware (a bit odd I thought).

I would have thought, by the way, that though you could take the modules out of your zdrv and put them in /usr/lib/modules of firstrib_rootfs, you could instead have simply renamed the zdrv sfs to 00zdrv_whatever.sfs? Not that it matters except the initrd also needs to find overlayfs module so would pick that up from a 00zdrvXXX.sfs (or do you have that compiled into your huge kernel?)

I must say, I've enjoying playing around with small Void Linux WDL system builds - been a long time since I've worked with that (aside from simply testing out your iso builds).

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

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

@gabtech. Rockedge's huge kernel, zdrv and firmware may be better solution since he has that working. However, if you want to try Void Linux official firmware it is installed automatically if you install meta-package (template) 'linux' - that's the official Void kernel so also installs the official Void modules related to that so pretty big. An alternative way of getting official Void Linux firmware only might be to:

Code: Select all

xbps-install -Suy linux-base

since I note that that depends on firmware packages including linux-firmware-network (though I haven't tried that method and I don't know which network firmware that contains at present - would have to download it and look inside...). Here is the template url for linux-base:

https://github.com/void-linux/void-pack ... e/template

You can tell what that installs for a particular architecture by looking for the word 'depends'.

There are several other so-called 'meta-packages' or 'templates' (and of course packages more generally) available, such as 'base-minimal':

https://github.com/void-linux/void-pack ... l/template

and 'xorg':

https://github.com/void-linux/void-pack ... g/template

and the related 'xorg-video-drivers'

https://github.com/void-linux/void-pack ... s/template

and more besides...

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

gabtech
Posts: 62
Joined: Sun Jul 19, 2020 12:29 pm
Been thanked: 2 times

Re: 79MB WDL_Void core build (easily expandable)

Post by gabtech »

@rockedge
I copied the firmware from fossapup's fdrv.sfs into first_rib directory but firmware not working, as @wiak pointed out in the above post.

Attachments
20210923_171313.jpg
20210923_171313.jpg (158.06 KiB) Viewed 3538 times

gabtech :thumbup2:

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

@wiak the Puppy Linux kernel is here : https://rockedge.org/kernels
Kernels->64Bit->5.4.70-rt40-full-rt_x64

I tried first just to load the 00zdrv.sfs but failed to boot cleanly.
I tried to just use 00zdrv.sfs and copied the firmware from the fdrv.sfs to /08firstrib_rootfs/lib/firmware, booted quickly and logged in, but I was unable to "see" the ethernet devices.
Once I copied both the firmware and modules into the 08firstrib_rootfs did wiakwifi find the ethernet cards and the system connect to the net successfully.

This I must test further though because I know I was able to do just 00zdrv.sfs and it connected with another version of the core build. BUT this one I built with the Void Linux kernel included so the firmware from Void was present. The above system I built with NO Void Linux kernel or modules and firmware. So it appears that mixing a huge Puppy Linux kernel and modules with Void Linux firmware works well.

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

wiak wrote: Thu Sep 23, 2021 3:18 pm

I must say, I've enjoying playing around with small Void Linux WDL system builds - been a long time since I've worked with that (aside from simply testing out your iso builds).

The WDL_Void-core is an excellent start point for a Zoneminder server setup. Don't need a GUI since using a web interface control panel makes it ideal to run remotely. Super stable and FAST.

Put ZM in it's own 75upper_changes (or SFS file) and all the recorded events are saved in the layer upper_changes. Making the total removal of recorded data easy and thereby resetting Zoneminder, without any direct interaction with the ZM installation.

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

I have discovered it's much easier to get jwm and rox going than xfce4. At the moment I have the systems mixed with rox --pinboard and jwm running.

EDIT I was able to start xfce4-session which correctly launched the xfce4 desktop, without the jwm - rox combination onboard.

2021-09-23-195528_600x480_scrot.png
2021-09-23-195528_600x480_scrot.png (191.99 KiB) Viewed 3507 times
User avatar
wiak
Posts: 4082
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1208 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

I guess you are currently doing some X-related install stuff manually. If you have derived any working recipes for that would be great to know - saves a lot of time and I'm only myself familiar with basic openbox/tint2 install and that's on the basis of X itself already working

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

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

rockedge wrote: Thu Sep 23, 2021 5:23 pm

The WDL_Void-core is an excellent start point for a Zoneminder server setup. Don't need a GUI since using a web interface control panel makes it ideal to run remotely. Super stable and FAST.

Put ZM in it's own 75upper_changes (or SFS file) and all the recorded events are saved in the layer upper_changes. Making the total removal of recorded data easy and thereby resetting Zoneminder, without any direct interaction with the ZM installation.

Yes, I also feel that this is a particularly useful start point for many variations. WDLs easy rollback ability and also ability to use either sfs or uncompressed dirs in multilayers makes it really nice to experiment/develop with

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

gabtech
Posts: 62
Joined: Sun Jul 19, 2020 12:29 pm
Been thanked: 2 times

Re: 79MB WDL_Void core build (easily expandable)

Post by gabtech »

@rockedge

Thanks! I downloaded the 5.4.70-rt40-full-rt_x64 huge kernel and now wifi works. Will now try to install desktop environment and windows manager.

gabtech :thumbup2:

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

gabtech wrote: Fri Sep 24, 2021 10:07 am

@rockedge

Thanks! I downloaded the 5.4.70-rt40-full-rt_x64 huge kernel and now wifi works. Will now try to install desktop environment and windows manager.

@rockedge

I have also downloaded your rt40 kernel, modules, firmware fossapup64 set with an interesting idea in my head.

The modules in that rt40 sfs are in /lib/modules, and the firmware in /lib/firmware.

As you know, WDL requires these to appear in /usr/lib hierarchy, but as you also know, the recent WDL init (w_init) has been specially crafted such that an external 00modules.sfs with its modules in /lib is automatically mounted to /usr/lib (no longer needing use of zdrv_convert.sh).
So by simply renaming your kernel-modules-5.4.70-fossapup64-rt40.sfs to 00kernel-modules-5.4.70-fossapup64-rt40.sfs absolutely NO modules need to be copied over into the initrd OR the firstrib_rootfs...

Firmware is a different matter. That also does not need to be copied into either the initrd structure OR the firstrib_rootfs. Instead it can simply be loaded as an overlayfs layer (I used layer 01 for my test). However... the fdrv-5.4.70-fossapup64-rt40.sfs DOES need to be converted to use /usr/lib/firmware rather than that fossapup /lib/firmware arrangement. Great thing is the zdrv_convert.sh utility will do the conversion simply be entering the command:

Code: Select all

./zdrv_convert.sh fdrv-5.4.70-fossapup64-rt40.sfs

(I'll more appropriately rename that utility later since it's obviously more general purpose than the name I gave it).

The output from that conversion is a file called 00firstrib_firmware_modules.sfs, but all it contains in this case is /usr/lib/firmware (for the rt40). As I said, I needed that at another layer than layer 00 (which is already being used for modules) so simply renamed 00firstrib_firmware_modules.sfs to 01firstrib_firmware.sfs. Actually could have named it to anything as long as name starts with 01.

Net result is that neither modules nor firmware are included in either the initrd.gz OR in the 08firstrib_rootfs I am booting with, but are instead simply provided as external sfs files! Which is the basically the way Puppy itself does it, but with more flexibility in WDL since can be uncompressed and many layers available.

And it booted fine with both modules and firmware provided only as external sfs addons. This is great, and especially since the firmware could be unsquashed and experimented with to slim down the firmware required for a particular system. That's one of the several great advantages of WDL design - the overlay layers can be provided as either numbered sfs files, OR as uncompressed numbered normal directories.

One difference compared to way Puppy does similar (an addition in WDL) is that Puppy huge kernel is compiled for aufs not overlayfs..., which would be a problem for WDL since it needs overlay.ko module during boot, but that special 00modules use allow overlayfs to appear to the initrd via a mount --bind and be used by it (even though not compiled into the Puppy huge kernel itself) - in fact that specially mount --bind overlay.ko is the only module actually used by the initrd when a Puppy huge kernel is used for the boot. NOTE that when NOT using a huge kernel though, you do need to include modules actually inside the initrd (but not in firstrib_rootfs) since some of them are needed/accessed by initrd (during boot) to detect the bootpartition for different drive types (huge kernel includes all such drivers already hence no such modules needed by the initrd itself in that special case).

The contents of my WDL_Void now is thus per the attached screenshot of the directory contents. I was using rockedge JWM_X f_plugin this time by the way and system auto-booted straight into that JWM desktop without any issue.

THIS is really going to be a fantastic way to make a really small distro specially tailored to any specific system - full multi-user, official upstream distro package manager, but could be significantly smaller than any Pup.

Wow... Void Linux running as WDL_Void is really frugal in RAM and CPU use - very nice and efficient! No wonder you like this WDL Void Linux creation flavour rockedge.

EDIT: Of course another way to build the WDL distro is to use official repo kernel, but only install the firmware into upper_changes and thereafter rename that upper_changes as a firmware layer. Then you'd be mounting firmware to a higher layer since important to keep in correct rollback order since official xbps-installs also contain the xbps database changes involved.

Later, I'll likely improve zdrv_convert.sh, not only rename it, to include possibiity to convert the other way round (i.e. /usr/lib/xxx to /lib/xxx format) but more importantly to only include files required in modules and firmware addons for WDL (current zdrv contains some other small bits and pieces/dirs, which may or may not cause a problem sometimes - but probably fine most of the time since at lowest overlay layer anyway so overwritten by any higher layer stuff).

wiak

Attachments
WDL_Void_no_internal_firmwareORmodules.png
WDL_Void_no_internal_firmwareORmodules.png (20.11 KiB) Viewed 3489 times

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

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

So for a pretty minimum X GUI WDL_Void system, I built the commandline core, used rockedges rt kernel, and 00modules and 01fdrv as external numbered sfs modules only (as explained in my immediately previous post), and once booted, simply did the following:

Code: Select all

xbps-install -Suy xorg-minimal xf86-video-intel xterm twm

Followed by entering the command:

Code: Select all

startx

I didn't even bother at that stage doing:

Code: Select all

cp -a /etc/X11/xinit/xinitrc /root/.xinitrc

Result in anycase, at this stage, is a simple twm GUI desktop with a few xterms open per the pre-configured by Void Linux /etc/X11/xinit/xinitrc.

Note that xorg-minimal pulls in the following dependencies automatically on installation:

https://github.com/void-linux/void-pack ... l/template
depends="xorg-server xauth xinit xf86-input-libinput"

These depends, bring in further dependencies of their own of course...

For a more sophisticated xorg install, you can use package 'xorg' rather than 'xorg-minimal'. That 'xorg' is a meta-package with the following dependencies (that it will automatically pull in on installation):

https://github.com/void-linux/void-pack ... g/template
depends="xorg-fonts xorg-server xorg-apps xorg-input-drivers xorg-video-drivers"

May not look more sophisticated, but the dependencies of these dependencies is quite complex. For example, xorg-apps auto-pulls in the following dependencies if they are not already installed:

https://github.com/void-linux/void-pack ... s/template
# xinit is not in xorg-7.5 app directory?!!
depends="iceauth>=1.0.4 oclock>=1.0.3 sessreg>=1.0.6 setxkbmap>=1.2.0
smproxy>=1.0.4 transset>=1.0.1 x11perf>=1.5.2 xauth>=1.0.5
xbacklight>=1.1 xcalc>=1.0.6 xclipboard>=1.1.3 xclock>=1.0.7
xcmsdb>=1.0.3 xconsole>=1.0.6 xcursorgen>=1.0.4 xdpyinfo>=1.2.0
xev>=1.1.0 xeyes>=1.1.1 xfontsel>=1.0.5 xgamma>=1.0.4 xhost>=1.0.4
xinit>=1.1.1 xinput>=1.5.3 xkbcomp>=1.2.0 xkbevd>=1.1.2 xkbutils>=1.0.3
xkill>=1.0.3 xload>=1.1.2 xlogo>=1.0.4 xlsatoms>=1.1.0 xlsclients>=1.1.1
xmessage>=1.0.4 xmodmap>=1.0.5 xpr>=1.0.3 xprop>=1.2.0 xrandr>=1.3.4
xrdb>=1.0.7 xrefresh>=1.0.4 xset>=1.2.1 xsetroot>=1.1.0 xvinfo>=1.1.1
xwd>=1.0.4 xwininfo>=1.1.1 xwud>=1.0.3"

As you can see, building a custom system with WDL is a simple and refreshing and instructive job, especially with Void Linux flavour I'd say. I doubt there is a better distro for learning about Linux and distro-building than provided by WDL. One disadvantage of WDL_Void is that Void Linux uses runit so you do not learn how to configure systemd (which is pretty important in the Linux world nowadays). However, you can build a similar WDL_Arch Linux variant instead, which does use systemd if you want to learn that (or a WDL_Debian, or a WDL_Ubuntu instead if you wish). Nothing wrong with runit mind you - very nice - way better than old SysVinit and similar in many ways to systemd in flexibility.

EDIT: per earlier post by rockedge, you could, for example xbps-install rox jwm, or perhaps xfce instead:

Code: Select all

xbps-install xorg-fonts jwm rox

and do:

Code: Select all

cp -a /etc/X11/xinit/xinitrc /root/.xinitrc

and edit /root/.xinitrc

(I used vi /root/.xinitrc, but you might prefer to use nano, so first you'd: xbps-install nano)

changing:

twm &

to

jwm &

or, alternatively, a more complete xorg plug xfce components:

rockedge wrote: Thu Sep 23, 2021 1:25 pm

Now to try to add Xorg with:

Code: Select all

xbps-install -y xorg adwaita-icon-theme

then I will add:

Code: Select all

xbps-install -y xfce4

NOTE xfce4 template already includes xfce4-panel.

Some extras may be required to get that xfce working apparently. Hopefully rockedge will fill us in on that one... ;-)

wiak

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

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

Setting up a WDL_Void-core build and adding a XFCE4 desktop. Start with the build script and a plug file inside of a "frugal" directory.

Important to adjust the connection timeout value! In a terminal:

Code: Select all

export CONNECTION_TIMEOUT=-1

plug file -> f_00_Void_generic_NoX_WDL_no-kernel.plug

Code: Select all

# f_00_Void_generic_NoX_WDL_team_no-kernel.plug
# version="1.0.0"; revision="-rc1"
# WeeDog Void outfitted with a basic commandline desktop and no kernel
# Creation date 24Sep2021; Revision date: 24Sep2021
# Copyright WeeDogLinux team; Licence MIT

# build this via terminal commands:
# export CONNECTION_TIMEOUT=-1
# ./build_firstrib_rootfs-XXX.sh void default amd64 f_00_Void_generic_NoX_WDLteam.plug
# Architecture i386 will probably successfully build too as an alternative to amd64

# login is user=root passwd=root

# All the parameters/commandlines can be appropriately changed:
# Simply comment in or comment out till you have what you desire
# or add new packages to the xbps-install lists.
# You can add as many valid commandlines as you want in here.
#
xbps-install -y base-minimal ncurses-base bash eudev
xbps-install -y file mc 

# set up passwd system
pwconv
grpconv
printf "root\nroot\n" | passwd >/dev/null 2>&1 # Quietly set default root passwd to "root"

# set root to use /bin/bash
usermod --shell /bin/bash root

# Set locale to en_US.UTF-8 
sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/default/libc-locales
xbps-reconfigure -f glibc-locales

# Set Bash as shell
xbps-alternatives --set bash

echo "desktop build process finished"

Code: Select all

./build_firstrib_rootfs_400rc1.sh void roll amd64 f_00_Void_generic_NoX_WDL_no-kernel.plug
2021-09-24-162024_406x208_scrot.png
2021-09-24-162024_406x208_scrot.png (16.71 KiB) Viewed 3949 times

This system will use the Puppy Linux huge kernel 5.4.70-rt40 so download the components. Run the zdrv_convert.sh script, and rename the files.

Code: Select all

./zdrv_convert.sh fdrv-5.4.70-rt40-fossapup64.sfs
2021-09-24-163746_406x208_scrot.png
2021-09-24-163746_406x208_scrot.png (22.09 KiB) Viewed 3943 times

Code: Select all

mksquashfs firstrib_rootfs 07firstrib_rootfs.sfs  -b 1048576 -comp xz -Xdict-size 100% -noappend

After the beginning steps the final arrangement of the files are:

2021-09-24-164537_699x209_scrot.png
2021-09-24-164537_699x209_scrot.png (41.46 KiB) Viewed 3941 times

For the install of the xfce4 desktop I am using the uncompressed firstrib_rootfs named 07firstrib_rootfs.

GRUB4DOS boot stanza:

Code: Select all

title WDL-Void-xfce(uuid)
  uuid 8a8ea99d-a1b0-4c43-b1a0-d4ce5c9c7dfa
  kernel /WDL-Void-xfce/vmlinuz-5.4.70-rt40 w_bootfrom=UUID=8a8ea99d-a1b0-4c43-b1a0-d4ce5c9c7dfa=/WDL-Void-xfce net.ifnames=0
  initrd /WDL-Void-xfce/initrd_v401rc1.gz

The system should boot to a login prompt which will be root with root as the password.
Once the command prompt is reached use wiakwifi to set up the network connection.
Update the repo lists:

Code: Select all

xbps-install -Suy

Install Xorg and the xfce4 desktop components: (I am using the full version of Xorg in this example)

Code: Select all

xbps-install -y xorg xfce4 xfce4-panel xfce4-plugins compton

Automatic Login On TTY1. Create a new autologin service:

Code: Select all

 cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1

At this point I started mc navigated too and edited /etc/sv/agetty-autologin-tty1/conf

Code: Select all

if [ -x /sbin/agetty -o -x /bin/agetty ]; then
	# util-linux specific settings
	if [ "${tty}" = "tty1" ]; then
		GETTY_ARGS=" --autologin root --noclear"
	fi
fi

GETTY_ARGS="--autologin root --noclear"
BAUD_RATE=38400
TERM_NAME=linux

still using mc and it's editor create a file /etc/profile.d/autologin.sh and add in the auto login block of code

Code: Select all

# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
    startx
fi

Now switch to tty2 (with CTRL+ALT+F2) and re-login there as root

Disable the regular tty1 service and enable autologin:

Code: Select all

rm /var/service/agetty-tty1
ln -s /etc/sv/agetty-autologin-tty1 /var/service

Reboot the system and one should see something similar to this screenshot:

2021-09-25-221849_1024x768_scrot.png
2021-09-25-221849_1024x768_scrot.png (203.33 KiB) Viewed 3885 times

I made some additions like Palemoon, mtpaint, geany , htop and because I work with it best, rox-filer

To build this desktop simply use the plug file
(remove the fake ".tar")

instead of the NoX version.

__

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

rockedge wrote: Fri Sep 24, 2021 5:13 pm

Setting up a WDL_Void-core build and adding a XFCE4 desktop. Start with the build script and a plug file inside of a "frugal" directory.

Looking very good. I presume you are currently working on the XFCE4 part of this howto for adding once you are happy with it?

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

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

@wiak Yes! I am about to add to the how to. I finally have xfce4 under control, and set up auto login to root user and start of xfce4-session during boot as root.

It is easier to accomplish when using the 07firstrib_rootfs uncompressed for the changes that need to be made manually. This is where the plug file will come in handy! All the steps to create the desktop can be done automatically.

Also found out the xfce-screensaver freezes the system via the compositor. After some trials and scouring the web it was easy to fix. Disabled the xfce4 compositor, installed compton and enabled it for startup at boot. Now the desktop display is working very well

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

rockedge wrote: Sat Sep 25, 2021 11:48 pm

@wiak Yes! I am about to add to the how to. I finally have xfce4 under control, and set up auto login to root user and start of xfce4-session during boot as root.

I see you have now documented the xfce installation and so. Excellent! Will also be easy to customise it, especially if developing with uncompressed firstrib_rootfs and can then modify easily via mount_chroot from any suitable host system, and can also tailor the fdrv (after first unsquashing it and also booting with it uncompressed) to include only the firmware my system needs. Late here, but I'm excited to try this one tomorrow. Very useful, specially xfce with Void Linux.

cheers.

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

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

This is a desktop unrefined and still in need of tweaks, improvements and further customization.

I still am encountering a problem after the screen saver is active for longer periods of time. Where I have to use CTRL-ALT-F2 to login into tty2 and use htop to kill the screensaver instance which brings the system back in order. With compton (picom) enabled as the compositor the problem seems to be solved but at the moment I am unsure if I have compton starting at boot time.

2021-09-26-095233_1024x768_scrot.png
2021-09-26-095233_1024x768_scrot.png (209.57 KiB) Viewed 3859 times

The JWM - ROX desktop is overall lighter but needs more "building" since there are almost no utilities or accessories included in the installation. XFCE4 desktop comes with lots of tools and MIME settings during the install and is a pretty complete and usable desktop from the start. I prefer the JWM-ROX setup with WeeDog even though it has more to do setting it up, it is much more customizable from the start and has proven to be rock solid stable.

Though once the XFCE4 version is tweaked right should also be quite a powerful desktop OS.

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

Next set of instructions will be how to build a WDL_Void-core build and add a LXDE desktop. Basically the same instructions as installing XFCE4 but instead of using xfce4-session, replace it with startlxde

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

Re: 79MB WDL_Void core build (easily expandable)

Post by wiak »

rockedge wrote: Fri Sep 24, 2021 5:13 pm

Setting up a WDL_Void-core build and adding a XFCE4 desktop. Start with the build script and a plug file inside of a "frugal" directory.

Hi @rockedge,

I had a quick try of scripting the xfce4 parts into the plugin. However, I'm rusty with runit (though think I again see how all its multiple symlinks cause things to happen). However, though my first run autologins to X as root user, it didn't start xfce. Rather than mess around to find out why I thought I'd check with you if you missed any step or if when xbps installs xfce4 it automatically arranges for xfce to start? I would have imagined startxfce4 would need to be called rather than startx unless xinitrc was modified or auto-modified to try to load something other than window manager twm (in other words I imagined I would have to exec startxfce4 as a replacement for twm in xinitrc or the user copy of that being: ~/.xinitrc). I haven't tried it with your manual (after no-X plugin build) procedure because I was short of time so just built whole thing in one script so my scripted version may have done something different.

wiak

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

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

@wiak unfortunately both installation procedures for XFCE4 and LXDE do not do the configurations for either to start on boot and or login. In my WDL-Void-JWM_ROX plug files that are the same steps I am doing manually for the XFCE4 experiments.

The script it is performing

Code: Select all

cp -a /etc/X11/xinit/xinitrc  /root/.xinitrc

and modifying it (or in the script just create a new file and write to it or copy in an existing version)
by removing the default entries for twm and the xterm instances and replacing that with xfce4-session

The /root/.initrc will over ride /etc/X11/xinit/xinitrc

startx is configured to be called in the file /etc/profile by adding this block:

Code: Select all

# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
    startx
fi

check what I found worked with jwm-rox plug file commands. In the end though there are more ways than one to start the Xserver and login.

User avatar
rockedge
Site Admin
Posts: 6547
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2749 times
Been thanked: 2626 times
Contact:

Re: 79MB WDL_Void core build (easily expandable)

Post by rockedge »

Also I built a WDL_Void-core and ran my build_ZM.sh script directly and found out it ran perfectly. At the end appeared the text indicating "finished" and after

Code: Select all

hiawatha
zmpkg.pl start

I was able to go into the web console from a Bionic64-8 using palemoon!

Screenshot(139).png
Screenshot(139).png (66.48 KiB) Viewed 3774 times

The WDL_Void-NoX is running with the Puppy Linux huge kernel 5.4.70-rt40 and is very fast and responsive running on a DELL PowerEdge R210 II. I used the build_rootfs script and the no X server plug file as the other versions.

I squashed a firstrib_rootfs which is 43 M and have just been copying that into a new directory like /WDL_Void-ZM and others. I can really quickly set up various versions and boot into them.

Locked

Return to “HowTo”