SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying Slackware on qemu/kvm to learn the distribution before to install it on the real hardware as daily driver.
I was be able to fully replace sysvinit with Runit using the Void Linux init scripts.
It works like a charm except single user mode which just run sulogin.
For some reason the service goes in loop not showing the su login prompt.
This is the service:
openat(AT_FDCWD, "-p", O_RDWR) = -1 ENOENT (No such file or directory)
But it appears that program `sulogin` failed when it tried to open a file called '-p'
HTH
-- kjh
Yeah, I already fixed it....I didn't know that sulogin can be different between the distributions.
Now, after I enter the root password , i get the following errors:
Code:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
-bash: no job control in this shell
Probably It is related to setsid which is different on Slackware as well
I only have this error. Just fixed it, i'll share these scripts. It's fast as thunderbolt and fully independent by sysvinit.
I also uninstalled sysvinit.
Since I have unistalled sysvinit, can you search in /etc/rc.d how sulogin is invoked?
(portion of) /etc/rc.d/rc.S:
Code:
# Check the root filesystem:
if [ -z "$container" ]; then
# If we're using F2FS for the root filesystem, don't check it as it doesn't
# allow checking a read-only filesystem:
if grep -q ' / f2fs ' /proc/mounts ; then
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
elif [ ! $READWRITE = yes ]; then
# Check the root filesystem:
RETVAL=0
if [ ! -r /etc/fastboot ]; then
echo "Checking root filesystem:"
/sbin/fsck $FORCEFSCK -C -a /
RETVAL=$?
fi
# An error code of 2 or higher will require a reboot.
if [ $RETVAL -ge 2 ]; then
# An error code equal to or greater than 4 means that some errors
# could not be corrected. This requires manual attention, so we
# offer a chance to try to fix the problem in single-user mode:
if [ $RETVAL -ge 4 ]; then
echo
echo "***********************************************************"
echo "*** An error occurred during the root filesystem check. ***"
echo "*** You will now be given a chance to log into the ***"
echo "*** system in single-user mode to fix the problem. ***"
echo "*** ***"
echo "*** If you are using the ext2 filesystem, running ***"
echo "*** 'e2fsck -v -y <partition>' might help. ***"
echo "***********************************************************"
echo
echo "Once you exit the single-user shell, the system will reboot."
echo
PS1="(Repair filesystem) \#"; export PS1
sulogin
else # With an error code of 2 or 3, reboot the machine automatically:
echo
echo "***********************************"
echo "*** The filesystem was changed. ***"
echo "*** The system will now reboot. ***"
echo "***********************************"
echo
fi
echo "Unmounting file systems."
/sbin/umount -a -r
/sbin/mount -n -o remount,ro /
echo "Rebooting system."
reboot -f
fi
# Remount the root filesystem in read-write mode
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
if [ $? -gt 0 ] ; then
echo "FATAL: Attempt to remount root device as read-write failed! This is going to"
echo "cause serious problems."
fi
else
echo "Testing root filesystem status: read-write filesystem"
echo
echo "ERROR: Root partition has already been mounted read-write. Cannot check!"
echo
echo "For filesystem checking to work properly, your system must initially mount"
echo "the root partition as read only. If you're booting with LILO, add a line:"
echo
echo " read-only"
echo
echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
fi # Done checking root filesystem
fi
Since I have unistalled sysvinit, can you search in /etc/rc.d how sulogin is invoked?
It's easy to just untar the package anywhere to look at it's contents. Or just open it directly in an archive browser - i use emacs for this. There's a bit more setup before the sulogin so it's probably worth having a look.
You probably know but rc.S is in sysvinit-scripts-15.0-noarch-7.txz
I was be able to fully replace sysvinit with Runit using the Void Linux init scripts.
I'd question the wisdom of replacing a critical system component without fully understanding what it is that you're doing.
What is the reason you want to do this? Having used it for >20 years, I feel confident enough to say that Slackware's init is 'rock solid' reliable, infinitely extensible and easily modified. It is regularly tweaked and tuned by Patrick to get the best results. The default 'rc' files are quite well commented. It's one of Slackware's best features. IMNSHO, any replacement would have to be for a very good reason.
# Check the root filesystem:
if [ -z "$container" ]; then
# If we're using F2FS for the root filesystem, don't check it as it doesn't
# allow checking a read-only filesystem:
if grep -q ' / f2fs ' /proc/mounts ; then
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
elif [ ! $READWRITE = yes ]; then
# Check the root filesystem:
RETVAL=0
if [ ! -r /etc/fastboot ]; then
echo "Checking root filesystem:"
/sbin/fsck $FORCEFSCK -C -a /
RETVAL=$?
fi
# An error code of 2 or higher will require a reboot.
if [ $RETVAL -ge 2 ]; then
# An error code equal to or greater than 4 means that some errors
# could not be corrected. This requires manual attention, so we
# offer a chance to try to fix the problem in single-user mode:
if [ $RETVAL -ge 4 ]; then
echo
echo "***********************************************************"
echo "*** An error occurred during the root filesystem check. ***"
echo "*** You will now be given a chance to log into the ***"
echo "*** system in single-user mode to fix the problem. ***"
echo "*** ***"
echo "*** If you are using the ext2 filesystem, running ***"
echo "*** 'e2fsck -v -y <partition>' might help. ***"
echo "***********************************************************"
echo
echo "Once you exit the single-user shell, the system will reboot."
echo
PS1="(Repair filesystem) \#"; export PS1
sulogin
else # With an error code of 2 or 3, reboot the machine automatically:
echo
echo "***********************************"
echo "*** The filesystem was changed. ***"
echo "*** The system will now reboot. ***"
echo "***********************************"
echo
fi
echo "Unmounting file systems."
/sbin/umount -a -r
/sbin/mount -n -o remount,ro /
echo "Rebooting system."
reboot -f
fi
# Remount the root filesystem in read-write mode
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
if [ $? -gt 0 ] ; then
echo "FATAL: Attempt to remount root device as read-write failed! This is going to"
echo "cause serious problems."
fi
else
echo "Testing root filesystem status: read-write filesystem"
echo
echo "ERROR: Root partition has already been mounted read-write. Cannot check!"
echo
echo "For filesystem checking to work properly, your system must initially mount"
echo "the root partition as read only. If you're booting with LILO, add a line:"
echo
echo " read-only"
echo
echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
fi # Done checking root filesystem
fi
IMNSHO, any replacement would have to be for a very good reason.
Curious myself. Why replace sysvinit?
If you run into problems down the line it might be difficult to diagnose things. If you do have problems later be sure to mention that you're using runit if you post here about problems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.