<?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=3771&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / how to install kernel source]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=3771</link>
		<description><![CDATA[The most recent posts in how to install kernel source.]]></description>
		<lastBuildDate>Mon, 07 Sep 2020 08:56:17 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: how to install kernel source]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=24507#p24507</link>
			<description><![CDATA[<p>It seems that module-assistant does the trick, but at least for me there remains a problem.</p><p>My ultimate goal is to be able to work with module source code on machines which are not connected to the Internet. Unfortunately, module-assistant requires an Internet connection. The question arises: is there a workaround?&#160; Can I do the same thing without an Internet connection, and therefore without module-assistant?</p><p>In theory, module-assistant does only two things: install some packages; and place the appropriate symbolic link at <span class="bbc">/usr/src/linux</span>.&#160; The trick is to discover whether this is ALL that module-assistant does.&#160; If so, we can get along without it, and install without access to the Internet.</p><p>So I did some before-and-after comparisons for two sequences.&#160; The first sequence, with access to the Internet:</p><p>-- do a stock install of devuan from DVD<br />-- run <span class="bbc">dhclient</span><br />-- add <span class="bbc">deb <a href="http://deb.devuan.org/merged" rel="nofollow">http://deb.devuan.org/merged</a> beowulf contrib main nonfree</span> to <span class="bbc">/etc/apt/sources.list</span><br />-- in that same file, comment out the cdrom line<br />-- run <span class="bbc">apt-get update</span><br />-- run <span class="bbc">apt install module-assistant</span><br />-- run <span class="bbc">m-a prepare</span></p><p>Preparation for the second sequence:</p><p>-- download all packages installed in the previous <span class="bbc">ma-prepare</span></p><p>Now the second sequence, on a host without access to the Internet:</p><p>-- do a stock install of devuan from DVD<br />-- do NOT run <span class="bbc">dhclient</span><br />-- download from the mothership host a directory containing packages downloaded from the Internet<br />-- run <span class="bbc">dpkg --recursive --install that-directory</span><br />-- run </p><div class="codebox"><pre><code>ln -s $(ls /usr/src | grep linux-headers | grep -v common) /usr/src/linux</code></pre></div><p>Before-and-after comparisons were made by gathering the following data before, and then after, each sequence:</p><p>-- the names of all installed packages, found by running <span class="bbc">dpkg-query --list</span><br />-- the names of all files, basically a <span class="bbc">find / | sort</span><br />-- for each regular file less than 64k in length, the length and checksum</p><p>So, did the second sequence do as well as the first?&#160; Yes, and actually a little better.&#160; The only significant differences were that the second sequence created links in <span class="bbc">/etc/alternatives</span> that the first did not (and, of course, package module-assistant itself wasn&#039;t installed).</p><p>It seems that module-assistant, when installing a package, did pretty much everything, but the output to the console looks different, as though module-assistant installed packages slightly different from how <span class="bbc">dpkg --install</span> would. Indeed, that&#039;s so: links in <span class="bbc">/etc/alternatives</span> are missing from the <span class="bbc">m-a prepare</span> results.</p><p>Most importantly, <span class="bbc">m-a prepare</span> didn&#039;t do anything other than what was advertised. So the second sequence is adequate, and solves the original &quot;no Internet&quot; problem.</p><p>Except:</p><p>One host of interest is older, a 32-bit machine.&#160; I haven&#039;t tested this solution for 32 bits, but of course I will.&#160; If I have any difficulty, I&#039;ll report it in this thread (unless the thread is closed at that point, or something).</p>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Mon, 07 Sep 2020 08:56:17 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=24507#p24507</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to install kernel source]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=24181#p24181</link>
			<description><![CDATA[<p>The module-assistant package is probably the best way to set up a build environment for custom kernel modules:</p><div class="codebox"><pre><code># apt install module-assistant
# m-a prepare
# apt install dahdi{,-dkms}</code></pre></div><p>Then reboot, ensure that the dahdi service is started and then use the various user space utilities to set things up.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Wed, 19 Aug 2020 11:59:38 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=24181#p24181</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to install kernel source]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=24180#p24180</link>
			<description><![CDATA[<div class="codebox"><pre><code>apt install build-essential linux-headers-$(uname -r)</code></pre></div><p>is what you normally need to compile anything other than a full kernel.</p>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Wed, 19 Aug 2020 11:34:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=24180#p24180</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to install kernel source]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=24179#p24179</link>
			<description><![CDATA[<p>The dahdi drivers (for Asterisk, though I don&#039;t use Asterisk itself).&#160; I install those packages and can find the compiled drivers nowhere, having done:</p><div class="codebox"><pre><code>find / | sort</code></pre></div><p>I assume that the names of the files containing the drivers would end with &quot;.ko&quot;.</p>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Wed, 19 Aug 2020 11:30:49 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=24179#p24179</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to install kernel source]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=24176#p24176</link>
			<description><![CDATA[<p>Which drivers are these? It is highly unusual to have to compile your own drivers in Linux, the kernel should already include drivers for just about everything.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Wed, 19 Aug 2020 10:18:25 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=24176#p24176</guid>
		</item>
		<item>
			<title><![CDATA[how to install kernel source]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=24171#p24171</link>
			<description><![CDATA[<p>When I install package kernel-source (which I need so I can compile downloaded drivers), I see two files:</p><div class="codebox"><pre><code>/usr/src/linux-patch-4.19-rt.patch.xz
/usr/src/linux-source-4.19.tar.xz</code></pre></div><p>When I explode the source, I guess that&#039;s the, um, source. When I explode the patch file, it doesn&#039;t look like any diff output I&#039;ve ever seen, and it doesn&#039;t look like a shell script of any sort. But I imagine I&#039;m supposed to apply it to the source tree somehow. How do I do that?</p><p>EDIT: The drivers I&#039;m compiling seem to be looking for a file named &quot;.config&quot; in the kernel source tree, but I don&#039;t see such a file in the expanded source tree. What would generate a &quot;.config&quot; file?</p>]]></description>
			<author><![CDATA[dummy@example.com (Bill Evans)]]></author>
			<pubDate>Wed, 19 Aug 2020 09:10:23 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=24171#p24171</guid>
		</item>
	</channel>
</rss>
