From owner-freebsd-questions@FreeBSD.ORG Sat Jun 2 18:55:22 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A57FF16A480 for ; Sat, 2 Jun 2007 18:55:22 +0000 (UTC) (envelope-from fredbsdavidson@yahoo.com) Received: from n9a.bullet.mail.re3.yahoo.com (n9a.bullet.mail.re3.yahoo.com [68.142.236.47]) by mx1.freebsd.org (Postfix) with SMTP id 6903413C480 for ; Sat, 2 Jun 2007 18:55:22 +0000 (UTC) (envelope-from fredbsdavidson@yahoo.com) Received: from [68.142.237.89] by n9.bullet.re3.yahoo.com with NNFMP; 02 Jun 2007 18:41:31 -0000 Received: from [66.196.101.131] by t5.bullet.re3.yahoo.com with NNFMP; 02 Jun 2007 18:41:31 -0000 Received: from [127.0.0.1] by rrr2.mail.re1.yahoo.com with NNFMP; 02 Jun 2007 18:41:31 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 513348.78348.bm@rrr2.mail.re1.yahoo.com Received: (qmail 19187 invoked by uid 60001); 2 Jun 2007 18:41:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=hLG+8/pMBAXm/CRURI7RGJrAq3oMU6+jrE0JG6V4bC9CdYcZyVOpHfHd1KJoAcgpm2e14HxdNO3+6GanJCotTtt7E7w0yM77Osrkm48RmFcWHKb91W5FjNTDFRKLtaO1185V+lci+Zhmpu9bfQvhwF0SdiscJ7Q5K/OaYezsI0g=; X-YMail-OSG: veuk9nQVM1nT6u_qQGmrpPMIkEOcuboiBEAfca.D6JUZLHCmGWYPQsEFJK.fyQETE8vug71x1GK45z2rxkCj4fPDBg-- Received: from [213.246.63.134] by web57405.mail.re1.yahoo.com via HTTP; Sat, 02 Jun 2007 11:41:31 PDT Date: Sat, 2 Jun 2007 11:41:31 -0700 (PDT) From: Fred Davidson To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <440897.18155.qm@web57405.mail.re1.yahoo.com> Subject: GRUB / boot easy problems w / USB stick X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jun 2007 18:55:22 -0000 ******************************************************** I am looking for some help to enable booting from a USB stick. After weeks of reading, and attempting I am at a total loss. This all began while I was trying to follow the many excellent tutorials on encrypting whole laptop disks with GELI[1]. These tutorials were great except they didn't really cover how to make the sticks bootable. Here is some of the many things I have tried. Background: My laptop BIOS allows me to pick the boot order from 7 devices, I set them as follows: (1) USB Key (2) USB HDD (3) USB CDROM (4) USB FDC (5) IDE CD (6) IDE HDD (7) PCI BEV Attempt 1: FreeBSD Boot Manager # created a dedicated slice on my 512MB stick with a #UFS2 filesystem. (after fdisk) bsdlabel -Brw /dev/da0s1 newfs /dev/da0s1 # Copied over boot files to usb filesystem. mount /dev/da0s1 /usb mkdir /usb/boot cd /boot cp -Rpv * /usb/boot # Placed FreeBSD boot manager on MBR of USB stick. boot0cfg -B -s 1 -t -v 182 /dev/da0 Problem: When I reboot the laptop keyboard won't allow me to select a partition with the F keys. Attempt 2: GRUB # make install grub from the ports collection. copy #over the files from #/usr/local/share/grub/i386-freebsd/* to /boot/grub. #My understanding was that Grub can read write UFS2 #because of patches since version 0.94. So on my first #attempt I made a single UFS2 partition. mount /dev/da0s1 /usb mkdir -p /usb/boot/grub cd /boot cp -Rpv * /usb/boot cd /boot/grub cp -Rpv * /usb/boot/grub #I invoke the grub shell. There are two devices in my #device map: (hd0) /dev/ad0 (hd1) /dev/da0 # Now if I try to set root in the following ways I'll #get the following: grub> root (hd0,0,a) Filesystem type is ufs2, partition type 0xa5 grub> root (hd1,0) Filesystem type is unknown, partition type 0xa5 # now before you say it, I also tried (hd1,0,a) but #this is even worse in some situations. Basically I #can't get grub to read or write to the USB stick with #a UFS2 filesystem. Yet it will read write to the #UFS2 filesystem of the native disk. Does anyone know #why? I have tried grub-install which apparently is #successful, but once I attempt to reboot, it hangs #with the word, "GRUB" printed. Attempt 3: Chainloading GRUB #This time I though I had it. I created S1 FAT #partition and S2 UFS2 partition on the stick. I # was able to use setup from the grub shell to setup #the FAT slice as the location for stage2. On the #ufs2 partition I set up the proper /boot setup above. #I read on an old post and someone mentioned that #boot2 does "something stupid," and won't work with a #chainload scenario. I tried it anyways, and it didn't #work. I had heard that it might work if you bounce #boot0 to the beginning of the slice instead of the #disk MBR so I did. boot0cfg -B -s 2 -t 182 -v /dev/da0s2 #seemed to go well. I rebooted, and got as far as #the F key menu, but again nothing worked, and I #couldn't boot. Just to add, I also tried the whole booting FreeBSD from a FAT partition but that just plain doesn't work [2]. Well that's where I am. I can't tell you how much you will rock my world if you can show me how to fix this. These are some ideas I have, but don't know enough to do anything about: (1) BIOS issues; from what I understand each computer manufacturer takes a base bios (phoenix in my case) and proprietories it up. I'm dreading that maybe my BIOS will prevent any of this from working. Doesn't seem to be documentation anywhere on my manufac's site. (2) Bootblocks; Maybe there's some easy modifications or config files for boot blocks I don't know about? Maybe there are some alternatives? (3) GRUB patches; I've been downloading ports from another PC (no network yet)burning to CD, then making. done it twice now. Is there some wonderful patch to GRUB that makes it work with FreeBSD I don't know about? Do any of you have it working? if so , can I copy how you built exactly? Alright, that's all. I'm sorry for the length of this post, it's my first one, and I have seriously dredged pretty hard on my own for a solution. Thanks again. Fred [1] [2] ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC