Jump to content

Debian Jessie with custom installation (without systemd)


Recommended Posts

Posted

Hi,

 

I would like to get a Debian Jessie version without systemd.

 

I already tried to reconfigure an armbian image to remove systemd (There are several topics about this like this one or this discussion). This worked for me except for one important thing: initramfs.

 

When I tried to configure and run my system using initramfs, I get always an error and system stop booting.

 

I would like to know if it is possible to configure the build-tool (compile.sh) to directly create a Jessie image without systemd and with sysvinit.

 

Something like this (as described here):

preseed/late_command="in-target apt-get install -y sysvinit-core"

Is it possible and what part of the armbian build tool is to be hacked to do this ?

 

Posted

If you don't want ram disk, this is the only needed change to boot script:

 

from

bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

to

bootz ${kernel_addr_r} - ${fdt_addr_r}

This is for sunxi kernel, but similar goes for others.

Posted

Thanks,

 

Actually I want ramdisk (initramfs and so on) but with sysvinit (and not systemd).

 

I removed systemd, but initramfs configuration seems to be broken for now.

 

I have an error like :

/scripts/init-premount/devpts: line 21: mountpoint: not found

So I guess that removing systemd broke something. So I would like to have an initial ram disk correctly configured at system install just for sysvinit.

 

A pre-install parameter could allow Debian to be initially installed without systemd if it is possible to include it in the build process.

Posted

I have an error like :

/scripts/init-premount/devpts: line 21: mountpoint: not found

So I guess that removing systemd broke something. So I would like to have an initial ram disk correctly configured at system install just for sysvinit.

mountpoint is a part of util-linux package:

➜  ~  % dpkg -S $(which mountpoint)
util-linux: /bin/mountpoint

which depends on libsystemd0:

➜  ~  % apt-cache depends util-linux | grep systemd
  PreDepends: libsystemd0

so you may have removed too much. You need only to replace systemd-sysv with sysvinit-core, nothing more.

Posted

I do'nt want any systemd dependencies.
 
However, util-linux depends on systemd only if systemd is the default init system. Which is not the case on my system since I disabled systemd:

root@lime2:~# apt-cache depends util-linux
util-linux
  Depends: initscripts
  Depends: lsb-base
  Depends: tzdata
  PreDepends: libblkid1
  PreDepends: libc6
  PreDepends: libmount1
  PreDepends: libncurses5
  PreDepends: libpam0g
  PreDepends: libselinux1
  PreDepends: libslang2
  PreDepends: libsmartcols1
  PreDepends: libtinfo5
  PreDepends: libuuid1
  PreDepends: zlib1g
  Suggests: dosfstools
 |Suggests: kbd
  Suggests: <console-tools>
  Suggests: util-linux-locales
  Breaks: bash-completion
  Breaks: grml-debootstrap
  Replaces: bash-completion

What I would like is to create a Debian with sysvinit as the initial init system (to be sure to avoid the side effects due to disabling systemd afterwards). Because I would like the /boot/ initramdisk files to be completely independent from systemd too (which is not the case)

 

Apparently this allows to use sysvinit during first boot:

preseed/late_command="in-target apt-get install -y sysvinit-core"

Where should I set this in the armbian build process ?

Posted

Apparently this allows to use sysvinit during first boot:

preseed/late_command="in-target apt-get install -y sysvinit-core"

Where should I set this in the armbian build process ?

We don't use debian-installer mechanism, instead we are using debootstrap to create images and provide list of default packages. You need to either adjust PACKAGE_LIST and PACKAGE_LIST_EXCLUDE variables in userpatches/lib.config and clean rootfs cache, or add something like "apt-get install -y sysvinit-core" to userpatches/customize-image.sh

Posted (edited)

OK, thanks, I was not fully aware of this

 

That's not good for me :( but I'll have to deal with it :)

 

However, I found this page (I am a little bit stubborn when I have something in mind  ;)  ) which explain how to debootstrap without systemd

 

Can I change/modify the debootstrap process (I believe it is in lib/debootstrap-ng.sh) in order to achieve my aim ?

 

Or is there some configuration file that would allow to do this ?

 

I believe not since I do not see where to put a command like the following one after first stage and before second stage:

# sed -i -e 's/systemd systemd-sysv //g' system/debootstrap/required
Edited by lauhub
Posted

I have already moved my Debian systems to systemd in jessie/sid. As far as I can tell it works with existing sysvinit scripts. So I assume when the transition is ready for the default, it will work quite well.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines