Date: Mon, 03 Mar 2008 22:49:37 +0100 From: Charlie Svahnberg <Charlie.Svahnberg@bth.se> To: freebsd-usb@freebsd.org Subject: Installing freebsd from USB memory (solution for HP Proliant dl145) Message-ID: <47CC7271.6070305@bth.se>
next in thread | raw e-mail | index | archive | help
Background ---------- We wanted to install freebsd from usb, to start with, on a HP ProLiant DL145 G3 (Opteron, SATA). This machine is delivered without cd-drive or floppy, and we did not have the energy to a) temporarily install a cd-drive b) configure our DHCP-server installation via PXEboot. Initial Approach ---------------- Tools used: - Host computer: i386 (Intel(R) Pentium(R) 4 CPU 1.60GHz) with FreeBSD 6.3-RELEASE - Target computer: HP ProLiant DL145 G3 (Opteron, SATA) with Phoenix TrustedCore as BIOS - 4Gb Sandisk Cruzer Micro U3 (with U3 uninstalled) - iso2usb script by Kernel Saunders, to "transform" an iso install image to a bootable disk image. (The script can be found at bsdforums.org) - Iso images: -- 6.3-RELEASE-amd64-bootonly.iso -- 7.0-RELEASE-amd64-bootonly.iso Procedure: - Insert usb memory on host computer, turns up as da0 # iso2usb 6.3-RELEASE-amd64-bootonly.iso # dd if=usbimg.xyz123 of=/dev/da0 bs=1m - Move usb memory to target computer - Reboot/start (BIOS identifies USB memory as the first harddisk (note: NOT "removable device") Result: - "error 128 lba 0" is printed - boot2 seems to run, but fails to load loader or kernel with an error something like: "no /boot/kernel/kernel error 128" Guess1: - The image written to the usb memory was bad, or we did a misstake in the procedure. -- Tested successfully to boot from the USB on another machine with Intel Quad-Core (MB: MSI P35 NEO2-FIR). - Conclusion: Image and procedure is ok. Guess2: - Using bootstrap code for i386 (installed by bsdlabel in iso2usb) for an amd64 image. -- Modified the iso2usb script to use the bootstrap code from the iso-image. # diff iso2usb_orig.sh iso2usb_mod.sh < bsdlabel -w -B ${usbmd} || exit 1 -- > bsdlabel -w -B -b ${iso2usbtmp}/iso/boot/boot ${usbmd} || exit 1 # -- Same result as earlier, i.e. boot2 can not find loader or kernel. Guess3: - BIOS and Freebsd do not agree on how the disks are numbered. - Freebsd identifies the usb memory as a SCSI disk, and according to the freebsd handbook boot2 is depending on BIOS support in order to continue. - No support in BIOS for SCSI -> Not possible to load kernel from usb memory. - (We did not investigate further why the Quad core machine worked) Solution -------- - Burned cd with netbsd (amd64cd-4.0.iso) - Booted from cd on the Quad core machine. -- Performed standard installation of netbsd to the usb memory (sd0) - Mounted usb memory on the host computer: -- Copy the usbimg.xyz123 files to the usb memory - Insert usb memory on target computer. -- Reboot (from usb memory) --- Netbsd boots fine --- We copied the images created earlier to the SATA disk. # dd if=usbimg.xyz123 of=/dev/wd0 bs=1m -- Reboot (and remove usb memory) --- Freebsd7.0 install boots fine from the SATA disk. --- In sysinstall we did the normal installation operations... --- ...including (re)partitioning of the SATA-disk. --- (Since root is mfs-mounted, this should not be a problem) --- Installed via FTP. -- After sysinstall completed we did a final reboot and... -- ...it worked! We now have freebsd7.0 installed from usb on our HP ProLiant DL145 G3 Post-note --------- We tried the same approach for another machine, a HP ProLiant DL140 G2 (Xeon, SATA), but this time netbsd does not boot properly. On this machine another BIOS from Phoenix is used, the usb memory is listed under "removable devices" and not under "hard disks". Maybe we will play around more to get this machine to boot netbsd/freebsd from usb memory (but this machine has a cd-drive and PXE-boot configured, so it is not so likely that we will spend very much time on this issue). Regards, /Charlie Svahnberg & Johan Zackrisson -- +----------------------= School of Engineering =----------------------+ |Blekinge Institute of Technology, Box 520, SE-372 25 Ronneby, Sweden | |Telephone: +46 457 385835 Telefax: +46 457 271 25 | |Charlie.Svahnberg@bth.se http://www.tek.bth.se | +---------------------------------------------------------------------+
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47CC7271.6070305>