Difference between revisions of "Howto make BSD-style init SysV-compatible"

From Linux-VServer

Jump to: navigation, search
(catspec)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
to make archlinux boot nicely, there are some modifications on the init scripts needet.<br>
+
To make archlinux boot nicely, some modifications to the init scripts are needed.<br />
first create a /etc/init.d dir and add a new file /etc/init.d/rc with content:<br>
+
First create a /etc/init.d dir and add a new file /etc/init.d/rc with content:<br />
<pre>
+
 
if [ $1 -eq 3 ]; then
+
if [ $1 -eq 3 ]; then
echo "entering runlevel 3:multi";
+
echo "entering runlevel 3:multi";
/etc/rc.multi
+
/etc/rc.multi
fi
+
fi
if [ $1 -eq 6 ]; then
+
if [ $1 -eq 6 ]; then
echo "entering runlevel 6:reboot";
+
echo "entering runlevel 6:reboot";
/etc/rc.shutdown
+
/etc/rc.shutdown
fi
+
fi
if [ $1 -eq 0 ]; then
+
if [ $1 -eq 0 ]; then
echo "entering runlevel 0: shutdown";
+
echo "entering runlevel 0: shutdown";
/etc/rc.shutdown
+
/etc/rc.shutdown
fi
+
fi
if [ $1 -eq 4 ]; then
+
if [ $1 -eq 4 ]; then
echo "entering runlevel 4";
+
echo "entering runlevel 4";  
fi
+
fi
if [ $1 -eq 5 ]; then
+
if [ $1 -eq 5 ]; then
echo "entering runlevel 5";
+
echo "entering runlevel 5";
fi
+
fi
if [ $1 -eq 1 ]; then
+
if [ $1 -eq 1 ]; then
echo "entering runlevel 1:single";
+
echo "entering runlevel 1:single";
/etc/rc.single
+
/etc/rc.single
fi
+
fi
if [ $1 -eq 2 ]; then
+
if [ $1 -eq 2 ]; then
echo "entering runlevel 2:multi";
+
echo "entering runlevel 2:multi";
/etc/rc.multi
+
/etc/rc.multi
fi
+
fi
</pre>
+
 
this script starts the right init-scripts for the runlevels. you now should be able to boot up your archlinux guest system. but there are some more work to get around all these warning and error messages on bootup.<br>
+
This script starts the right init-scripts for the runlevels. you now should be able to boot up your archlinux guest system. but there is some more work to get around all these warning and error messages on bootup.<br />
you need to remove all that has to do with kernel, driver and networking. on archlinux edit
+
You need to remove all that has to do with kernel, driver and networking. Edit the /etc/rc.conf file and remove networking from DAEMONS.<br />
/etc/rc.conf and remove networking and syslog-ng (syslog-ng will not work) from DAEMONS.<br>
+
 
edit /etc/rc.shutdown and comment out below and including <b>stat_busy "Saving Random Seed"</b>
+
to make syslog-ng work edit /etc/syslog-ng.conf and comment out the line: <b>pipe("/proc/kmsg")</b>
<br><br>
+
 
have fun with you archlinux guest and feel free to improve the rc script :)
+
Edit /etc/rc.shutdown and comment out all below and including <b>stat_busy "Saving Random Seed"</b> to <b># Power off or reboot</b>
 +
<br /><br />
 +
Have fun with your archlinux guest and feel free to improve the rc script :)
 +
 
 +
[[Category:OS guest under linux-vserver]]

Latest revision as of 21:53, 21 October 2011

To make archlinux boot nicely, some modifications to the init scripts are needed.
First create a /etc/init.d dir and add a new file /etc/init.d/rc with content:

if [ $1 -eq 3 ]; then
echo "entering runlevel 3:multi";
/etc/rc.multi
fi
if [ $1 -eq 6 ]; then
echo "entering runlevel 6:reboot";
/etc/rc.shutdown
fi
if [ $1 -eq 0 ]; then
echo "entering runlevel 0: shutdown";
/etc/rc.shutdown
fi
if [ $1 -eq 4 ]; then
echo "entering runlevel 4"; 
fi
if [ $1 -eq 5 ]; then
echo "entering runlevel 5";
fi
if [ $1 -eq 1 ]; then
echo "entering runlevel 1:single";
/etc/rc.single
fi
if [ $1 -eq 2 ]; then
echo "entering runlevel 2:multi";
/etc/rc.multi
fi

This script starts the right init-scripts for the runlevels. you now should be able to boot up your archlinux guest system. but there is some more work to get around all these warning and error messages on bootup.
You need to remove all that has to do with kernel, driver and networking. Edit the /etc/rc.conf file and remove networking from DAEMONS.

to make syslog-ng work edit /etc/syslog-ng.conf and comment out the line: pipe("/proc/kmsg")

Edit /etc/rc.shutdown and comment out all below and including stat_busy "Saving Random Seed" to # Power off or reboot

Have fun with your archlinux guest and feel free to improve the rc script :)

Personal tools