Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2003 11:52:16 +0100 (CET)
From:      Michal Mertl <mime@traveller.cz>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        current@FreeBSD.org
Subject:   Re: potential for foot-shooting with KLD's
Message-ID:  <20030304112111.Y16501@prg.traveller.cz>
In-Reply-To: <20030304020632.GA681@gothmog.gr>
References:  <20030302153608.P44831@prg.traveller.cz> <20030303171905.GC56386@gothmog.gr> <20030304004124.B68258@prg.traveller.cz> <20030304020632.GA681@gothmog.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Mar 2003, Giorgos Keramidas wrote:

> On 2003-03-02 17:34, Michal Mertl <mime@traveller.cz> wrote:
> : Imagine you decided to go with modular kernel. You comment out 'device
> : random' in your kernel-config and place 'random_load="YES"' in
> : /boot/loader.conf. When you reboot and don't rebuild the kernel first, you
> : have your machine unbootable - at least in case you previously had acpi in
> : your kernel and acpi doesn't work without OS supplied dsdt (as in my
> : case) or you need acpi as a module or any other module.
> :
> : The way out is to boot from install CDROM, have fixit floppy, mount the
> : old root and remove the random.ko module. Which is pretty inconvenient,
> : when you don't have the medias handy.
> :
> : The problem is that I can't ask loader not to load some module. It doesn't
> : understand 'unset XX_load'. It doesn't work to say 'set XX_load="NO"'
> : either. The only way I found to make it not load the modules is to 'load
> : /boot/kernel/kernel;set module_path="";boot'. Unfortunately it doesn't
> : help me either because I need to load special acpi_dsdt.aml which isn't
> : then loaded either.
>
> On 2003-03-03 17:19:05, Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:
> :
> : How about `unset XX_load' ?
> :
> : - Giorgos
>
> On 2003-03-04 00:41, Michal Mertl <mime@traveller.cz> wrote:
> : > How about `unset XX_load' ?
> :
> : It works only for acpi.
>
> I just tried editing my /boot/loader.conf to make sure you haven't hit
> upon a bug.  I added this line:
>
> 	ipfw_load="YES"
>
> and rebooted.  The loader loaded both /boot/kernel/kernel and ipfw.ko
> as you'd expect.  I then used the `unload' command and loaded only my
> kernel afterwards:
>
> 	OK unload
> 	OK load /boot/kernel/kernel
> 	OK boot -s
>
> Voila!  Only my kernel and acpi.ko were loaded.  Then, without editing
> my /boot/loader.conf I rebooted and inteerrupted the loader after
> ipfw.ko and the kernel were loaded.  I disabled ACPI with:
>
> 	OK unset acpi_load
> 	OK boot -s
>
> Only the kernel and ipfw.ko were loaded.  Then, I tried yet another
> way of disabling ipfw.ko at load time, and set ipfw_load to "NO" in
> my loader.conf.  Only the kernel and acpi.ko were loaded.
>
> What is it that troubles you?  I'm not sure I can reproduce it.

The problem is that you may need to load some module and disable loading
of some other.

The problem I hit was that I had 'device acpi' in the static kernel. When
the ACPI is active on my notebook I need to supply fixed dsdt otherwise it
won't find PCI or something and doesn't boot. It may have been possible to
set hint.acpi.0.disable=1 and it will boot, but I didn't think of it.
Using hints one may be able to escape from the problem.

Other situation could be that you have SCSI adapter from which you boot as
a module. Then you add say random_load="YES" to loader.conf. And try to
boot the kernel with random compiled in. You either load both modules (and
panic on boot with 'random mutex already initialized' or something)
or unload them both (and don't find your root fs).

-- 
Michal Mertl
mime@traveller.cz

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030304112111.Y16501>