<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=3020&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Installing sinit on devuan [alpha]]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=3020</link>
		<description><![CDATA[The most recent posts in Installing sinit on devuan [alpha].]]></description>
		<lastBuildDate>Sat, 24 Aug 2019 15:03:25 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Installing sinit on devuan [alpha]]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=17505#p17505</link>
			<description><![CDATA[<p>This post should offer some pointers if you want to try out suckless.org&#039;s init on a devuan system.&#160; It is the first step in a larger overhaul with my project spin.&#160; This alpha-quality documentation, and I intend to provide updates when I can.&#160; Please post your wisdom to help expand it.</p><p>I find sinit attractive becuase it&#039;s quick and builds quickly.&#160; For a nonpersistent live system, this is very desirable.&#160; I also don&#039;t care about having a service manager on a drive-by operating system.</p><p>I&#039;m going to proceed with a yet-unverified claim: that this will work for any devuan system.&#160; If anyone wants to prove this right or wrong, please post your results.&#160; Unfortunately, my bandwidth and time are limited at the time of writing.</p><p><strong>Requirements</strong></p><ul><li><p>* A devuan image with sysvinit preinstalled (I used thomos, which is built from an ascii debootstrap)<br />* Suckless.org&#039;s init<br />* A test environment or virtual machine (I used virtualbox)<br />* sysvinit scripts in rcS.d<br />* <span class="bbc">gcc</span> and <span class="bbc">make</span> installed<br />* <span class="bbc">git</span> (optional)</p></li></ul><p><strong>Installing the base system</strong></p><p>This is probably the sloppiest (but easiest) way to test the init&#039;s functionality.</p><p>- Install devuan or devuan-like image in your test environment.<br />- Chroot into your system.<br />- Set up your network.&#160; In virtualbox: <span class="bbc">dhclient eth0</span><br />- If needed, update packages and install gcc, make, and git (if that&#039;s how you&#039;re getting the source): <span class="bbc">apt-get update &amp;&amp; apt-get install gcc make git</span><br />- Grab the sinit source: <span class="bbc">git clone git://git.suckless.org/sinit</span><br />- Build the package: <span class="bbc">cd sinit &amp;&amp; make &amp;&amp; make install</span> (by default, it installs to /usr/local/bin)<br />- Replace sysv&#039;s init: <span class="bbc">cp /sbin/init /sbin/init.sysvinit &amp;&amp; cp /usr/local/bin/sinit /sbin/init</span><br />- At this point, you can remove sysv packages if you want.<br />- Use an editor to create the file <span class="bbc">/bin/rc.init</span> (My example is used below):</p><div class="codebox"><pre><code>#!/bin/sh
echo &quot;Loading devuan with sinit.&quot;
# At bare minimum, boot to a shell.
/bin/bash
exit 0</code></pre></div><p>- I made it executable, but I&#039;m not sure if it&#039;s necessary to do so: <span class="bbc">chmod +x /bin/rc.init</span><br />- Exit the chroot and reboot the test system<br />- At boot, you should see the &quot;Loading devuan with sinit&quot; message, and a bash prompt should appear.</p><p><strong>Getting Xorg</strong></p><p>Using the <span class="bbc">rc.init</span> file we created, you should boot to a root console.&#160; Your system is read only.</p><p>The scripts in <span class="bbc">rcS.d</span> have some missing links to getting Xorg up and running.&#160; Right now, I could not tell you what they are doing.</p><p>- Make sure <span class="bbc">/tmp</span> has write premissions.&#160; One way to accomplish this is to remount the filesystem as read/write: <span class="bbc">mount -o remount,rw /</span><br />- Open <span class="bbc">/bin/rc.init</span> in an editor.<br />- Add the following code before <span class="bbc">/bin/bash</span>:</p><div class="codebox"><pre><code># Borrowing lingering SysV scripts.
# This method is sloppy and pays no mind to what each script is doing.
for script in /etc/rcS.d/*; do 
    sh $script start;
done</code></pre></div><p>- To run Xorg as a user (example, the user &quot;thomos&quot;): <span class="bbc">su thomos</span><br />- Make sure .xinitrc executes an environment (example, &quot;exec openbox-session&quot;)<br />- Run <span class="bbc">startx</span></p><p><strong>Screenshot</strong></p><p>Final product, based on 2019-08-24 procedures:<br /><a href="https://ibb.co/yfFF1wD" rel="nofollow"><span class="postimg"><img src="https://i.ibb.co/yfFF1wD/2019-08-24-142501-1021x633-scrot.png" alt="2019-08-24-142501-1021x633-scrot.png" /></span></a></p>]]></description>
			<author><![CDATA[dummy@example.com (siva)]]></author>
			<pubDate>Sat, 24 Aug 2019 15:03:25 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=17505#p17505</guid>
		</item>
	</channel>
</rss>
