From owner-freebsd-geom@FreeBSD.ORG Wed Dec 29 10:21:57 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FD4916A4CE for ; Wed, 29 Dec 2004 10:21:57 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1579E43D46 for ; Wed, 29 Dec 2004 10:21:57 +0000 (GMT) (envelope-from abelousov@gmail.com) Received: by rproxy.gmail.com with SMTP id c16so388345rne for ; Wed, 29 Dec 2004 02:21:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=G4sBW6uEoQrda1pWf8rYsJ65j3+6toq86WNjyNq8L0QNc+PQE1QcC83XgrmMo7a+a/n+cLnjwm/g7N71Drqs0cvqPdWzFzdsGiaDU3t9Kt8KtgTfLIdpVUyerZg3x1ldBffbyL67BqARGfAAQ5UhGVSa0T48hlHB8kT4GxL9RXw= Received: by 10.38.86.65 with SMTP id j65mr85715rnb; Wed, 29 Dec 2004 02:21:56 -0800 (PST) Received: by 10.38.151.70 with HTTP; Wed, 29 Dec 2004 02:21:56 -0800 (PST) Message-ID: <2ff9b55d04122902217c620769@mail.gmail.com> Date: Wed, 29 Dec 2004 15:21:56 +0500 From: Alexey Belousov To: Doug White In-Reply-To: <20041228202524.M49504@carver.gumbysoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <2ff9b55d0412270234634d2e96@mail.gmail.com> <20041228202524.M49504@carver.gumbysoft.com> cc: freebsd-qa@freebsd.org cc: freebsd-geom@freebsd.org Subject: Re: 5.3 LiveCD fixit shell geom(8) environment broken? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: c0x@daemon.pp.ru List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 10:21:57 -0000 On Tue, 28 Dec 2004 20:30:10 -0800 (PST), Doug White wrote: > On Mon, 27 Dec 2004, Alexey Belousov wrote: > > > hi All, > > > > recently, I played with geom in fixit shell and found some oddity: > > > > Fixit# geom mirror load > > Command 'load' not available. > > Fixit# sysctl kern.module_path > > kern.module_path: /boot/kernel;/boot/modules > > Fixit# ls -la /boot/kernel/ > > ls: /boot/kernel/: No such file or directory > > Fixit# ln -s /mnt2/boot/kernel /boot/ > > Fixit# geom mirror load -v > > Module available. > > Done. > > This is making a rather dangerous assumption -- that the installed kernel > in /mnt2/boot/kernel is binary-compatible with the GENERIC kernel from the > CD you started the fixit enviornment from. Its not something that could > be enabled in the general case. > > Of course if you know they are compatible (i.e., 5.3-RELEASE CD for a > 5.3-RELEASE system) you could have just loaded the module manually: > > kldload /mnt2/boot/kernel/geom_mirror.ko diagnostic message "Command 'load' not available." ugly, it should be "Module not available." isn't it? > > instead of the symlink fiddling. Or updated the module path even. > > > Fixit# geom mirror dump da0 > > Unknown command: dump > > usage: geom mirror help > > geom mirror list > > geom mirror load [-v] > > geom mirror unload [-v] > > Fixit# ldd `which geom` > > /mnt2/sbin/geom: > > libgeom.so.2 => /mnt2/lib/libgeom.so.2 (0x28078000) > > libsbuf.so.2 => /mnt2/lib/libsbuf.so.2 (0x2807c000) > > libbsdxml.so.1 => /mnt2/lib/libbsdxml.so.1 (0x2807e000) > > libutil.so.4 => /mnt2/lib/libutil.so.4 (0x2809d000) > > libc.so.5 => /mnt2/lib/libc.so.5 (0x280a9000) > > Fixit# ln -s /mnt2/lib / > > Fixit# geom mirror dump da0 > > Metadata on da0: > > magic: GEOM::MIRROR > > version: 1 > > <---snip---> > > Fixit# > > > > Summary: > > 1. missing geom_*.ko / invalid kern.module_path > > fix: sysctl kern.module_path=`sysctl -n kern.module_path`\;/mnt2/boot/kernel > > or simply ln -s /mnt2/boot/kernel /boot/ > > The sysctl change is preferred. yes, but symlink more handy for me in this situation. Anyway, at least, kern.module_path must contain /mnt2/boot/kernel by default, IMHO. > > > 2. missing necessary libs in /lib (hardcoded path?) > > fix: ln -s /mnt2/lib / > > or preferably 'ldconfig -m /mnt2/lib'. Again there is a compatibility > issue that would make this unsafe to do automatically. ldd `which geom` says no problem with libs (see my first posting), and 'ldconfig -m /mnt2/lib' not working for me too. > > Were you able to test if the geom command works properly, without any > sysctl or symlink fiddling, if you choose to mount disc #2? That should > provide all the necessary pieces without having to pick them out of the > installed system. disk #2, 5.3-RELEASE-i386-disc2.iso - the "LiveCD" I boot from and mount by standart way: 'sysinstall Main Menu' -> 'Fixit' -> '2 CDROM/DVD Use the "live" filesystem CDROM/DVD' -> 'OK' -> go vty4 to 'fixit' shell. Finally, why I can't start my repair job immediately after boot and mount "LiveCD" without doing some nasty tricks&tweaks? ;) > > -- > Doug White | FreeBSD: The Power to Serve > dwhite@gumbysoft.com | www.FreeBSD.org > _______________________________________________ > freebsd-geom@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-geom > To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org" >