From owner-freebsd-usb@FreeBSD.ORG Mon Mar 3 22:22:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD2351065672 for ; Mon, 3 Mar 2008 22:22:47 +0000 (UTC) (envelope-from Charlie.Svahnberg@bth.se) Received: from stafffront1.bth.se (stafffront1.bth.se [194.47.129.28]) by mx1.freebsd.org (Postfix) with ESMTP id 5E5B98FC22 for ; Mon, 3 Mar 2008 22:22:47 +0000 (UTC) (envelope-from Charlie.Svahnberg@bth.se) Received: by stafffront1.bth.se (Postfix, from userid 102) id C05541C519; Mon, 3 Mar 2008 23:00:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on stafffront1.bth.se X-Spam-Level: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.2.3 Received: from localhost (localhost [127.0.0.1]) by stafffront1.bth.se (Postfix) with ESMTP id 2D3C91C522 for ; Mon, 3 Mar 2008 23:00:48 +0100 (CET) Received: from stafffront1.bth.se ([127.0.0.1]) by localhost (stafffront1.bth.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XlV7x22BH7kU for ; Mon, 3 Mar 2008 23:00:48 +0100 (CET) Received: from paris.bth.se (paris.bth.se [194.47.129.25]) by stafffront1.bth.se (Postfix) with ESMTP id 0871F1C520 for ; Mon, 3 Mar 2008 23:00:48 +0100 (CET) Received: from [194.47.135.27] ([194.47.135.27]) by paris.bth.se (Lotus Domino Release 7.0.3) with ESMTP id 2008030323004681-3082 ; Mon, 3 Mar 2008 23:00:46 +0100 Message-ID: <47CC7271.6070305@bth.se> Date: Mon, 03 Mar 2008 22:49:37 +0100 From: Charlie Svahnberg User-Agent: Thunderbird 2.0.0.9 (X11/20071119) MIME-Version: 1.0 To: freebsd-usb@freebsd.org X-MIMETrack: Itemize by SMTP Server on Paris/Server/BTH(Release 7.0.3|September 26, 2007) at 2008-03-03 23:00:46, Serialize by Router on Paris/Server/BTH(Release 7.0.3|September 26, 2007) at 2008-03-03 23:00:48, Serialize complete at 2008-03-03 23:00:48 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Subject: Installing freebsd from USB memory (solution for HP Proliant dl145) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 22:22:47 -0000 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 | +---------------------------------------------------------------------+