From owner-freebsd-current Tue Mar 4 2:53:47 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C935D37B401 for ; Tue, 4 Mar 2003 02:53:44 -0800 (PST) Received: from prg.traveller.cz (prg.traveller.cz [193.85.2.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CE1143F3F for ; Tue, 4 Mar 2003 02:53:43 -0800 (PST) (envelope-from mime@traveller.cz) Received: from prg.traveller.cz (localhost [127.0.0.1]) by prg.traveller.cz (8.12.2[KQ/pukvis]/8.12.2-prg) with ESMTP id h24AqH9t044440; Tue, 4 Mar 2003 11:52:17 +0100 (CET) Received: from localhost (mime@localhost) by prg.traveller.cz (8.12.2[KQ/pukvis]/8.12.2-prg/submit) with ESMTP id h24AqGkb044437; Tue, 4 Mar 2003 11:52:17 +0100 (CET) Date: Tue, 4 Mar 2003 11:52:16 +0100 (CET) From: Michal Mertl To: Giorgos Keramidas Cc: current@FreeBSD.org Subject: Re: potential for foot-shooting with KLD's In-Reply-To: <20030304020632.GA681@gothmog.gr> Message-ID: <20030304112111.Y16501@prg.traveller.cz> References: <20030302153608.P44831@prg.traveller.cz> <20030303171905.GC56386@gothmog.gr> <20030304004124.B68258@prg.traveller.cz> <20030304020632.GA681@gothmog.gr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 4 Mar 2003, Giorgos Keramidas wrote: > On 2003-03-02 17:34, Michal Mertl 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 wrote: > : > : How about `unset XX_load' ? > : > : - Giorgos > > On 2003-03-04 00:41, Michal Mertl 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