Remastering Debian 10 with remastersys/respin + Calamares

Share your own howto's etc. Not for support questions!

Remastering Debian 10 with remastersys/respin + Calamares

Postby Len E. » 2020-11-04 04:25

(Background: In this category, I posted a topic entitled "Remastering
Debian 10 with systemback" on 2020-05-18, which described a
workable but untidy solution because of the extensive use of
Bullseye/Testing packages in the installation. The alternative solution
described herein initially appeared to be a cleaner approach, but
ended up with several untidy aspects as well).

I found that remastersys/respin will not install on Debian 10 as
it comes out-of-the box, because Debian 10 uses systemd exclusively,
rather than the hybrid sysvinit/systemd arrangement Debian 9
uses to accomodate remastersys/respin.

However, MX19 uses this hybrid arrangement, and by utilizing
selected packages, such as systemd-shim, libpam-systemd, and
libsystemd0 from MX19 installed on Debian 10, remastersys dist/
respin dist work just fine. (I've tested on both the
remastersys modules I've held over from Debian 6 days, and
the latest respin issue, respin_4.0.0-2_all.deb).

SYSVINIT/SYSTEMD HYBRID ENVIRONMENT
The following modules were collected in a
MX19.2sysvinit directory:

initscripts_2.93-8_i386.deb
insserv_1.18.0-2_i386.deb
libpam-systemd_1%3a241-7~deb10u4+mx19_i386.deb
libsystemd0_1%3a241-7~deb10u4+mx19_i386.deb
startpar_0.61-1_i386.deb
systemd_1%3a241-7~deb10u4+mx19_i386.deb
systemd-shim_10-4_i386.deb
systemd-sysv_1%3a241-7~deb10u4+mx19_i386.deb
sysvinit-core_2.93-8_i386.deb
sysv-rc_2.93-8_all.deb



-note that in the MX19.2.sysvinit directory, 4 packages are from
the MX19 repository, with 'MX19' part of the version number.
(the systemd-shim package is from the MX19 repository also.)

The following installation sequence was used:

-from MX19.2sysvinit directory,
sudo dpkg -i libpam-systemd*.deb libsystemd0*.deb systemd_1*.deb
systemd-sysv*.deb
-with synaptic, install initscripts and its 3 dependencies, insserv,
startpar, sysv-rc, and additionally, cgmanager, dbus-x11 and bootlogd.

-from MX19.2sysvinit directory,
sudo dpkg --auto-deconfigure -i sysvinit-core*.deb systemd-shim*.deb

-reboot
****************************************************************************
REMASTERSYS INSTALLATION

The following modules were collected in a Deb10remastersys directory:

gksu_2.0.2-9+b1_i386.deb
libgtop-2.0-10_2.34.2-1_i386.deb
libgksu2-0_2.0.13~pre1-9+b1_i386.deb
remastersys_3.0.0-1_all.deb
libgnome-keyring0_3.12.0-1+b2_i386.deb
remastersys-gui_3.0.0-1_all.deb
libgnome-keyring-common_3.12.0-1_all.deb
xresprobe_0.4.23debian1-1_i386.deb

On Debian 10, the remasterys-gui installation is complicated by the
fact that, unlike Debian 9, gksu is not pre-installed.

The following installation sequence was used:

-with synaptic, install libgtop2-common

-from Deb10remastersys directory,
sudo dpkg -i xresprobe*.deb libgnome*.deb libgtop*.deb

-from Deb10remastersys directory, with gdebi, install in order,
libgksu2, gksu, remastersys, remastersys-gui

(In retrospect, after working with respin, I wouldn't bother with
remastersys-gui: as with respin, invocation from /usr/bin
from the command line is simple enough:
-create remastered .iso ----> sudo remastersys dist
or sudo respin dist)
*********************************************************************
Respin is installed simply with gdebi after downloading the latest
.deb file, respin_4.0.0-2_all.deb

***********************************************************************
The live installer associated with the remastersys or respin live-dvd
would not work because it could not find the system hard disk drive.

The workaround was, prior to creating the remastersys or respin .iso,
to install the calamares and calamares-settings-debian packages
with synaptic, and then use calamares as the installer from the live-dvd.
(The buster-backports version of calamares supports some advanced
disk partitioning features such as UEFI and a 8GB GPT table; the
buster version is the simpler, pedestrian version); both worked fine).

Len E.
Len E.
 
Posts: 25
Joined: 2018-02-12 18:48

Remastering Debian 10 with remastersys/respin + Calamares

Postby Len E. » 2020-11-04 14:17

One important characterisitic of the Calamares installer is that it
requires the designation of a /home paritition in addition to the
/ (root) partition.

Len E.
Len E.
 
Posts: 25
Joined: 2018-02-12 18:48

Remastering Debian 10 with remastersys/respin + Calamares

Postby Len E. » 2021-03-03 04:08

I've belatedly uncovered 2 problem areas with this remastering approach.

LOGOUT, SHUTDOWN, REBOOT ANOMALIES

I didn't notice these difficulties until recently trying to incorporate 2
alternate desktop environments, e16 and icewm into the remastered build.
I haven't resolved the problems with the alternate desktop environments
in this area.

In the Advanced Options on bootup, the hybrid sysvinit/systemd environment
is the first choice, and systemd itself is a 2nd choice.
With the hybrid environment, after the remastering, both the XFCE and LXDE desktops
won't logout, freeze up in the attempt. A CNTRL-ALT_F2 sequence is required to
enable a command line login and sudo reboot to recover. On both, shutdown and
reboot options work o.k.

If the systemd (2nd) option on bootup is utilized, the XFCE desktop works ok
on shutdown, reboot and logout as well. LXDE still won't logout properly.

To borrow a phrase from another post in this category, unless/until these difficulties
can be eliminated, this approach will continue to have a "frankendebian" aura about it.
****************************************************************************************************
The user.conf file that is inherent in the /etc/calamares/modules directory when calamares
is installed is a sample file not likely to be inclusive of the user group ID's (GIDS) actually
included in the remastering process. The screen output generated when sudo remastersys dist
or sudo respin dist is executed list the GIDS that were involved. The following is the contents
of the user.conf file which I now employ for subject purposes:

---
userGroup: users
defaultGroups:
# Group Name GID # Identified From
# tty 5 respin output
- tty
# mail 8 respin output
- mail
# man 12 respin output
- man
# cdrom 24 Calamares sample file
- cdrom
# floppy 25 Calamares sample file
- floppy
# sudo 27 Calamares sample file
- sudo
# audio 29 Calamares sample file
- audio
# dip 30 Calamares sample file
- dip
# shadow 42 respin output
- shadow
# utmp 43 respin output
- utmp
# video 44 Calamares sample file
- video
# plugdev 46 Calamares sample file
- plugdev
# staff 50 respin output
- staff
# systemd-timesync 102 respin output
- systemd-timesync
# crontab 108 respin output
- crontab
# netdev 109 Calamares sample file
- netdev
# messagebus 110 respin output
- messagebus
# bluetooth 112 Calamares sample file
- bluetooth
# avahi-autopid 113 respin output
- avahi-autopid
# ssh 115 respin output
- ssh
# scanner 116 Calamares sample file
- scanner
# lpadmin 119 Calamares sample file
- lpadmin
# geoclue 122 respin output
- geoclue
# lightdm 123 respin output
- lightdm
# ssl-cert 124 respin output
- ssl-cert
# colord 125 respin output
- colord
autologinGroup: autologin
sudoersGroup: sudo
setRootPassword: false

*******************************************************************************
Len Jarvis
Len E.
 
Posts: 25
Joined: 2018-02-12 18:48

Re: Remastering Debian 10 with remastersys/respin + Calamare

Postby Bulkley » 2021-03-03 17:55

Maybe I missed it but how did you get files from the MX19.2sysvinit directory?
Bulkley
 
Posts: 6094
Joined: 2006-02-11 18:35

Remastering Debian 10 with remastersys/respin + Calamares

Postby Len E. » 2021-03-04 14:42

Hi Bulkley:

Of the 10 modules in the MX19.2sysvinit directory, 5 are standard
Debian 10 packages, and 5 are from the MX19.n repository.

I keep a current copy of MX19.n on a test machine. On MX19.n,
"sudo apt-get download package-name" downloads the .deb file
into the /var/cache/apt/archives directory. From there, a USB flash
drive transfer gets the required 5 packages to the Debian 10 environment.

Len E.
Len E.
 
Posts: 25
Joined: 2018-02-12 18:48

Re: Remastering Debian 10 with remastersys/respin + Calamare

Postby Bulkley » 2021-03-04 17:44

Len E. wrote:I keep a current copy of MX19.n on a test machine. On MX19.n,
"sudo apt-get download package-name" downloads the .deb file
into the /var/cache/apt/archives directory. From there, a USB flash
drive transfer gets the required 5 packages to the Debian 10 environment.


Interesting. Would it not work better adding deb http://mxrepo.com/mx/repo/ buster main to your sources.list? Yes you need the MX keyring for that.

The problem I have with all of this is that of mixing distros. Yes, the moment you brought in those packages you mixed two different distros. If you try the MX repo and use it to install your packages you will see additional dependencies brought in. At that point you are functionally committed to using MX LInux for all your updates. The developers over at MX and Antix have done a superb job of engineering a unique distro that is able to use Debian as a source for packages but it doesn't work as well in the other direction, ie: Debian using MX packages. If you want to use MX, by all means do so; it's very well put together.
Bulkley
 
Posts: 6094
Joined: 2006-02-11 18:35

Re: Remastering Debian 10 with remastersys/respin + Calamare

Postby Head_on_a_Stick » 2021-03-04 18:01

Bulkley wrote:Would it not work better adding deb http://mxrepo.com/mx/repo/ buster main to your sources.list?

MX have their own versions of systemd & GRUB to which they have added an epoch so that APT will prefer them over the stock Debian buster versions. Pinning will be needed for the MX repositories to prevent those packages being pulled from MX. See my guide in the HowTo section for details. Installing the required .deb packages directly is probably the safest method but those packages will then have to be updated manually.

@OP: any chance of using code tags for the terminal stuff? It would make the thread much more readable.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Remastering Debian 10 with remastersys/respin + Calamare

Postby Bulkley » 2021-03-04 19:59

Head_on_a_Stick wrote:MX have their own versions of systemd & GRUB to which they have added an epoch so that APT will prefer them over the stock Debian buster versions. Pinning will be needed . . .


Yes, I know. What I have come to appreciate is just how well crafted MX is. Every experiment I have done mixing MX packages with pure Debian (mostly about getting rid of Systemd) has ultimately failed. These have mostly been on a VM platform. They all started out as good ideas (mine, yours, other contributors here and wherever) and most worked at first. They worked until they didn't. If we add package xxx.deb to our system and something fails immediately we know what is wrong. If everything works until we do an update six months hence it can be an absolute bugger to diagnose and fix. I enjoy these experiments and learn a lot about how things work but I would never use one as my daily driver.

So, I applaud Len E. for his experiment but toss in my caution.
Bulkley
 
Posts: 6094
Joined: 2006-02-11 18:35

Re: Remastering Debian 10 with remastersys/respin + Calamare

Postby sunrat » 2021-03-04 21:17

I tried adding MX repos as per Head_on_a_Stick's thread in Tips and Tricks and posted about it there. I installed MXSnapshot and its dependencies from there and used it to make a bootable .iso from an installed Debian system. As Bulkley predicted, it worked until it didn't. It booted extremely slowly and had several glitches which I don't recall as it was many months ago. Experiment abandoned.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 3470
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Remastering Debian 10 with remastersys/respin + Calamares

Postby Len E. » 2021-03-30 14:59

A PROMISING DEVELOPMENT:

A new version of remastersys,
remastersys-debian_3.10.19-3_all.deb, is available
from SourceForge. It installs on a vanilla copy of
Debian 10.

I downloaded the software a few days ago,
installed a fresh copy of Debian-10.8.0-xfce from
the 32-bit debian-10.8.0-xfce-cd-1 distro, and tried out
the software on it. (I selected the LXDE desktop).

After the installation with remastersys-installer,
I encountered 2 significant problems, for which
I was able to come up with work-arounds.

1) Could not log in as an ordinary user.

(I'll use the full name John Doe, login name jdoe
to illustrate).

It turns out that after installation, the group jdoe
was present but the user jdoe was not.

Fortunately, login on the root account worked fine.
When logged in as root, from the command line, I
ran delgroup jdoe, followed by adduser jdoe, which
allowed password entry.

After reboot, the ordinary user jdoe worked fine.
*******************************************************
(2) Internet connection doesn't work.

On Debian 10, I've noticed that the directory
/etc/network/interfaces.d commonly contains no setup file.

This can cause a non-functional internet connection
after remastering, especially if the target machine
for the remastered distro is different than the
machine on which the distro is originally remastered.

A common fix for this problem, on the target machine, is

first, run sudo lshw -C network or sudo inxi -n to find out
what the logical name for the internet connection
should be.

and then, create a setup file in /etc/network/interfaces.d of
the form:

auto lo
iface lo inet loopback

auto enp0s7
iface enp0s7 inet dhcp

where enp0s7 is the logical name of the connection.
***************************************************************
After finding some relevant problem discussion articles on
the web, I've learned that over-and-above the setup file I've
described above, what is also required is a file /etc/network/interfaces
of the form:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp0s7
iface enp0s7 inet dhcp

********************************************************

The file present on my fresh copy of
Debian-10.8.0-lxde was exactly in this form.

However, the file on my remastersys-installed
distro, contained only the first 2 commands.
I added the latter 2 commands from the original
file to it, rebooted, and the internet connection
worked.

*********************************************************
I confirmed that for all 3 of the desktop environments I’m
using (LXDE, e16, icewm), shutdown/reboot/logout all work
properly, thereby overcoming the problems I could not
resolve with Calamares.

Len E.
Len E.
 
Posts: 25
Joined: 2018-02-12 18:48


Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable