You are not logged in.
Pages: 1
Greetings All,
If I chose runit as a system init during installation, and would like to switch to sysvinit, is it a simple matter of installing sysvinit-core and sysvinit packages?
I tested this in a VM and it seemed to work.
Thanks.
Offline
It worked on my desktop, too. The only problem is that I could not reboot afterwards and had to power cycle the machine.
Offline
I don't recommend you to change the init system from a running system next time. The already running init, whether runit-init or sysvinit, will be removed and the system won't shutdown properly. For example, it won't be able to determine the current runlevel. For this reason, I suggest you to use a live system instead.
From the live session, run the following command to determine the partitions. One sample:
liveuser@devuan:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 756.3M 1 loop /lib/live/mount/rootfs/filesystem.squashfs
loop1 7:1 0 4.9M 0 loop /dev/metadata/hwdb
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 93.2G 0 part
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 368.8G 0 part /mnt
└─sda6 8:6 0 3.7G 0 part
sdb 8:16 1 7.2G 0 disk
├─sdb1 8:17 1 877M 0 part /lib/live/mount/medium
└─sdb2 8:18 1 1.4M 0 part
sr0 11:0 1 1024M 0 rom
In this concrete case /dev/sda1 is the root partition (/) in the attached internal disk, /dev/sda5 the home partition and /dev/sda6 the swap. Mount the root partition (i.e. the system) in /mnt with the command:
# mount --rw /dev/sda1 /mnt
bind /sys, /proc and /dev and chroot the mounted system:
# mount -o bind /sys /mnt/sys
# mount -t proc proc /mnt/proc
# mount -o bind /dev /mnt/dev
# mount -o bind /dev/pts /mnt/dev/pts
# chroot /mnt
Now you're in a chroot jail and you'll be able to use apt within the mounted system. Install sysvinit-core and runit-init will be removed automatically. In addition, you an also purge other superfluous packages like runit and getty-run:
# apt-get update
# apt-get install sysvinit-core
# dpkg --purge runit getty-run
# apt-get clean
Exit the jail and unmount the partitions:
# exit
# umount /mnt/dev/pts
# umount /mnt/dev
# umount /mnt/proc
# umount /mnt/sys
# umount /mnt
Done.
If you work systematically, things will come by itself (Lev D. Landau)
Offline
It worked on my desktop, too. The only problem is that I could not reboot afterwards and had to power cycle the machine.
Next time do the following:
1. install sysvinit-core (it will remove runit-init package), but don't remove the runit package (yet);
2. tell runit to reboot the system with
# /lib/runit/runit-init 6
(see man runit-init for details)
After you reboot into sysvinit you can safely remove the runit package too
Lorenzo
Offline
Offline
Could you also just install it from grub?
- when grub menu comes up at boot press e
- on the boot line (w/vmlinuz) add init=/bin/sh to the end
- ctrl-x will boot to a shell
- uninstall/install inits
- hard restart
I've done this to get to a shell, but didn't try the init uninstall/install
Last edited by mweishaar (2023-07-01 14:35:03)
Offline
Pages: 1