https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082010-08-31T06:11:46ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #1813: booting kernel.old uses /boot/modules, not modules.oldhttps://bugs.dragonflybsd.org/issues/1813?journal_id=88212010-08-31T06:11:46Zalexh
<ul></ul><p>This is not a bug, this is the normal behaviour. You can set<br />module_path=/boot;/boot/modules.old;/;/modules.old to work around that :)</p>
<p>Cheers,<br />Alex Hornung</p>
<p>On 30/08/10 23:30, <a class="email" href="mailto:elekktretterr@exemail.com.au">elekktretterr@exemail.com.au</a> wrote:</p>
<blockquote>
<p>Hi,<br />When I enter into the boot prompt and run "boot kernel.old", i can see<br />modules being loaded from /boot/modules, instead of /boot/modules.old. Its<br />not very intuitive. Is this a bug?</p>
<p>Petr</p>
</blockquote> DragonFlyBSD - Bug #1813: booting kernel.old uses /boot/modules, not modules.oldhttps://bugs.dragonflybsd.org/issues/1813?journal_id=88272010-08-31T23:24:49Zdillon
<ul></ul><p>:<br />:Hi,<br />:When I enter into the boot prompt and run "boot kernel.old", i can see<br />:modules being loaded from /boot/modules, instead of /boot/modules.old. Its<br />:not very intuitive. Is this a bug?<br />:<br />:Petr</p>
<pre><code>It isn't really a bug, its just a lack of implementation in the<br /> loader.</code></pre>
<pre><code>Hmm. I've been wanting to go to a /boot/&lt;directory&gt;/{kernel + modules}<br /> setup for a while, I'm glad you brought this up. I will mess around a<br /> bit today and see if I can implement the model I want. It will be a<br /> nice break from the kernel work.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #1813: booting kernel.old uses /boot/modules, not modules.oldhttps://bugs.dragonflybsd.org/issues/1813?journal_id=88282010-09-01T05:34:01Zqhwt+dfly
<ul></ul><p>On Tue, Aug 31, 2010 at 09:23:04AM -0700, Matthew Dillon wrote:</p>
<blockquote>
<p>Hmm. I've been wanting to go to a /boot/<directory>/{kernel + modules}<br />setup for a while, I'm glad you brought this up. I will mess around a<br />bit today and see if I can implement the model I want. It will be a<br />nice break from the kernel work.</p>
</blockquote>
<p>We have DESTLABEL variable (see build(7)); with which, If specified, things<br />go to<br /> ${DESTDIR}/boot/kernel.${DESTLABEL} and<br /> ${DESTDIR}/boot/modules.${DESTLABEL},<br />respectively. I believe that the idea was to be able to specify this<br />${DESTLABEL} in the boot loader, for example,</p>
<pre><code>OK boot ${DESTLABEL} # or maybe .${DESTLABEL}</code></pre>
<p>and $kernel and $module_path are set up to point to those locations.<br />I'm not sure how to do this in Forth, though.</p>
<p>/boot/<directory> is fine as well, but it could be useful if we have<br />some make variables for installkernel target to point to where old<br />kernel/modules should go or where new kernel/modules should be installed.</p> DragonFlyBSD - Bug #1813: booting kernel.old uses /boot/modules, not modules.oldhttps://bugs.dragonflybsd.org/issues/1813?journal_id=88302010-09-01T15:04:54Zdillon
<ul></ul><p>:go to<br />: ${DESTDIR}/boot/kernel.${DESTLABEL} and<br />: ${DESTDIR}/boot/modules.${DESTLABEL},<br />:respectively. I believe that the idea was to be able to specify this<br />:${DESTLABEL} in the boot loader, for example,<br />:<br />: OK boot ${DESTLABEL} # or maybe .${DESTLABEL}<br />:<br />:and $kernel and $module_path are set up to point to those locations.<br />:I'm not sure how to do this in Forth, though.<br />:<br />:/boot/<directory> is fine as well, but it could be useful if we have<br />:some make variables for installkernel target to point to where old<br />:kernel/modules should go or where new kernel/modules should be installed.</p>
<pre><code>I managed to the whole thing in one day, including ripping out the<br /> 4th loader and putting in a saner C-based menu system.</code></pre>
<pre><code>Not only can we now boot from directories/{kernel+modules}, but<br /> I got directories/loader.conf localization working so it is possible<br /> to have different root mounts, and thus possible to boot 32 or 64 bits<br /> (though of course root, bins, usr bins, etc have to be different),<br /> as well as keeping around backup kernels+modules and such.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #1813: booting kernel.old uses /boot/modules, not modules.oldhttps://bugs.dragonflybsd.org/issues/1813?journal_id=88362010-09-01T19:32:04Zqhwt+dfly
<ul></ul><p>On Wed, Sep 01, 2010 at 01:03:04AM -0700, Matthew Dillon wrote:</p>
<blockquote>
<p>:go to<br />: ${DESTDIR}/boot/kernel.${DESTLABEL} and<br />: ${DESTDIR}/boot/modules.${DESTLABEL},<br />:respectively. I believe that the idea was to be able to specify this<br />:${DESTLABEL} in the boot loader, for example,<br />:<br />: OK boot ${DESTLABEL} # or maybe .${DESTLABEL}<br />:<br />:and $kernel and $module_path are set up to point to those locations.<br />:I'm not sure how to do this in Forth, though.<br />:<br />:/boot/<directory> is fine as well, but it could be useful if we have<br />:some make variables for installkernel target to point to where old<br />:kernel/modules should go or where new kernel/modules should be installed.</p>
<p>I managed to the whole thing in one day, including ripping out the<br />4th loader and putting in a saner C-based menu system.</p>
</blockquote>
<p>That's cool!</p>
<blockquote>
<p>Not only can we now boot from directories/{kernel+modules}, but<br />I got directories/loader.conf localization working so it is possible<br />to have different root mounts, and thus possible to boot 32 or 64 bits<br />(though of course root, bins, usr bins, etc have to be different),<br />as well as keeping around backup kernels+modules and such.</p>
</blockquote>
<p>If you try to install a module from e.g. /sys/dev/acpica5, the KLD goes<br />to right under /boot, is this intended? $modules_path contains /boot,<br />so KLDs installed that way should just work, but it also affects the<br />traditional method:</p>
<pre><code>$ cd /sys/config<br /> $ config -d /path/to/writable MYKERNEL<br /> $ make depend && make<br /> $ sudo make install</code></pre>
<p>This will install the kernel to /boot/kernel/kernel but all KLDs under /boot.<br />This is because KLDs are now installed to ${DESTKERNDIR}, which defaults to<br />/boot/${KERNEL}, but no .mk files included from within a module directory<br />supplies the default value for ${KERNEL}.</p> DragonFlyBSD - Bug #1813: booting kernel.old uses /boot/modules, not modules.oldhttps://bugs.dragonflybsd.org/issues/1813?journal_id=88372010-09-01T22:13:03Zdillon
<ul></ul><p>:<br />:If you try to install a module from e.g. /sys/dev/acpica5, the KLD goes<br />:to right under /boot, is this intended? $modules_path contains /boot,<br />:so KLDs installed that way should just work, but it also affects the<br />:traditional method:<br />:..<br />: $ cd /sys/config<br />: $ config -d /path/to/writable MYKERNEL<br />: $ make depend && make<br />: $ sudo make install<br />:<br />:This will install the kernel to /boot/kernel/kernel but all KLDs under /boot.<br />:This is because KLDs are now installed to ${DESTKERNDIR}, which defaults to<br />:/boot/${KERNEL}, but no .mk files included from within a module directory<br />:supplies the default value for ${KERNEL}.</p>
<pre><code>No, that's a bug. It's supposed to install to a directory. Without<br /> knowledge of which kernel the module is related to it winds up stuffing<br /> it in /boot.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #1813: booting kernel.old uses /boot/modules, not modules.oldhttps://bugs.dragonflybsd.org/issues/1813?journal_id=88382010-09-01T23:12:03Zdillon
<ul></ul><p>Ok, I've committed a change to kmod.mk to set the KERNEL default<br /> when it isn't provided by installkernel. Lets see if that has closed<br /> this install hole.</p>
<pre><code>-Matt</code></pre>