From owner-freebsd-stable@FreeBSD.ORG Wed May 11 10:30:57 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20203106564A for ; Wed, 11 May 2011 10:30:57 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta06.westchester.pa.mail.comcast.net (qmta06.westchester.pa.mail.comcast.net [76.96.62.56]) by mx1.freebsd.org (Postfix) with ESMTP id C14928FC23 for ; Wed, 11 May 2011 10:30:56 +0000 (UTC) Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87]) by qmta06.westchester.pa.mail.comcast.net with comcast id iAUD1g0031swQuc56AWxhi; Wed, 11 May 2011 10:30:57 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta15.westchester.pa.mail.comcast.net with comcast id iAWv1g00E1t3BNj3bAWvmB; Wed, 11 May 2011 10:30:56 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id D8260102C36; Wed, 11 May 2011 03:30:53 -0700 (PDT) Date: Wed, 11 May 2011 03:30:53 -0700 From: Jeremy Chadwick To: "Eugene M. Zheganin" Message-ID: <20110511103053.GA36021@icarus.home.lan> References: <4DCA5374.2020306@zhegan.in> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DCA5374.2020306@zhegan.in> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: a bunch of dumb questions about freebsd installing X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2011 10:30:57 -0000 On Wed, May 11, 2011 at 03:14:28PM +0600, Eugene M. Zheganin wrote: > I have an IBM xSeries server, its ip-kvm and different FreeBSD images. > The goal is to perform a remote installation of FreeBSD using server > ip-kvm and USB devices it emulates. > I can perform a non-remote installation in a wariety of ways but > this post is about a remote one. > > 1) Since USB gives an cd(4) device, it's possible to boot from > installation media, but impossible to use it for installation, > because sysinstall wants acd0. Is there any way ? I cannot figure > one, except using NFS or FTP install, which is not quite acceptable. > Pure fixit sheel seems to be missing everything needed, at least I > didn't succeeded at guessing where is mount for cd9660 and ls. The FreeBSD installer can in fact detect this situation. USB CDROM drives are emulated via SCSI, so they show up under the cd(4) driver. /dev/cd* is indeed examined during the "CDROM" installation medium detection phase of sysinstall(8). The problem almost certainly stems from how the IP KVM "virtual media" feature works or how it implements support for its "virtual CD" media, or in some cases "translation media" (e.g. you burn a FreeBSD ISO to a physical CD, insert the CD into your laptop, then use the IP KVM software (via Java or a native client) to "connect" the USB CDROM IP KVM layer to your laptop's CDROM drive). The issue is not specific to USB CD drives either: the same has happened to people using classic ATA CDROM drives who have burnt an ISO using unreliable or "strange" burning software. This then gets into a discussion about how the CD devices are "probed" during sysinstall. It's been a while since I've looked at that code, but I remember explicitly that very specific "slices" have to exist for the installation to be detected correctly, e.g. some systems will show a /dev/da0 but not a /dev/da0a, which is what the installer may look for. Please keep reading for further comments about IP KVM "virtual media". > 2) I downloaded a usb-key media, which is an .img file. This > question does sound silly, and it really makes me look like a newbie > and firsttimer (which, by the way, I am not, I'm installing FreeBSD > for the second time :)) - but - anyway - what is exactly this .img > and what is exactly an USB-key ? I used to think that, aside from > it's internal design, this is the same think, but it appears that > I'm wrong. Google didn't help much. A USB key is a USB flash drive, sometimes known as "pen drive" or "memory stick". The .img file is something that you can literally dd directly to the USB flash drive as so: dd if=FreeBSD-8.2-RELEASE-amd64-memstick.img of=/dev/da0 bs=64k The .img file is fully bootable when installed on a USB flash-based medium. I have read on some forums that people seem to think it's an ISO image, but to my knowledge it isn't. > 3) Why dd, reading an .img file and writing it to some /dev/da0 (as > it's explained in handbook), which means it's not neither sliced nor > partitioned (it also means that both loaders are presemt in image), > makes a bootable media, and .img itself is not, because giving an > .img file directly to the ip-kvm (and telling server to boot from > it) produces 'No operating system installed' message ? Is there a > way to produce a bootable image from such .img, without actual > writing to the physical media, or at least using md(4) ? The .img file **is** bootable. Think of it as a "raw hard disk" image, so it includes the bootloader located at LBA 0 (sector 0), etc... You can boot directly from it. I can absolutely assure you of this with 100% reliability, because all of our servers get built/installed via USB flash drives. If your "IP KVM" virtual media cannot boot from it, that is a separate problem and likely pertains to "USB device emulation" issues. There are numerous "emulation modes" available (floppy, hard disk, flash drive, ZIP drive, JAZ drive, and many others). Which your vendor chose to implement, or how to make it work how you need it to, is unknown to me; please discuss this with your IP KVM vendor. Bottom line: IP KVM's "virtual media" feature sounds great on paper, but every time I've seen it implemented it's wonky. I've seen it work, and it's pretty awesome when it does, but I'm not surprised at the complexities you're going through. I have the same opinion of IPMI. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |