Eugene M. Zheganin
2011-May-11 09:43 UTC
a bunch of dumb questions about freebsd installing
Hi. 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. 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. 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) ? Thanks. Eugene.
Eugene M. Zheganin
2011-May-11 09:50 UTC
a bunch of dumb questions about freebsd installing
On 11.05.2011 15:14, Eugene M. Zheganin wrote:> Hi. > > 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. > > 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 ?* " and what is exactly an USB-HDD ?" ATM I've read that these are different mass-storage classes.> 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. > > 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) ? >Please ignore two last questions. Seems like FreeBSD tracker is seeding a corrupted memstick image - some of the first megabytes are plain zeroes, and the md5 is not the md5 from ftp. Thanks. Eugene.
On Wed, May 11, 2011 at 03:14:28PM +0600, Eugene M. Zheganin wrote:> Hi. > > 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.Try using Options -> Re-scan Devices, helped here with USB CD drive. [...] Yuri
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 |