From owner-freebsd-questions@FreeBSD.ORG Tue Jun 5 09:47:10 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 5D82D16A41F for ; Tue, 5 Jun 2007 09:47:10 +0000 (UTC) (envelope-from fredbsdavidson@yahoo.com) Received: from n21b.bullet.mail.sp1.yahoo.com (n21b.bullet.mail.sp1.yahoo.com [69.147.65.253]) by mx1.freebsd.org (Postfix) with SMTP id 4114713C487 for ; Tue, 5 Jun 2007 09:47:10 +0000 (UTC) (envelope-from fredbsdavidson@yahoo.com) Received: from [216.252.122.218] by n21.bullet.sp1.yahoo.com with NNFMP; 05 Jun 2007 09:47:10 -0000 Received: from [68.142.237.87] by t3.bullet.sp1.yahoo.com with NNFMP; 05 Jun 2007 09:47:10 -0000 Received: from [66.196.101.133] by t3.bullet.re3.yahoo.com with NNFMP; 05 Jun 2007 09:47:09 -0000 Received: from [127.0.0.1] by rrr4.mail.re1.yahoo.com with NNFMP; 05 Jun 2007 09:47:09 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 973091.35270.bm@rrr4.mail.re1.yahoo.com Received: (qmail 84748 invoked by uid 60001); 5 Jun 2007 09:47:09 -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=lqbKQEEAmVSqHQ6DPl+8VzpMNEjx6sypOxtu/c/fStBrg0bWcaUetrcuLO4HNO3cKFgJupLpLqIBlp/8O7B4YGeRQdUbg/oi/eC++LGXH5642xSzxHQA6eEOjDO/CzXEZCIw0iiefUa65dgClS/TnvNVp541I1RD9hEZ2Ulf374=; X-YMail-OSG: fpNvFfsVM1lpVkHhW3Sc99uEzRd9XtLHdQu_e7DeeSa0wkMhLX9vJdzEKdo7fuBj4A2Kua1h5IeyXcTqqoyCoiWjTaxy3.2wXbP5 Received: from [166.70.207.2] by web57415.mail.re1.yahoo.com via HTTP; Tue, 05 Jun 2007 02:47:09 PDT Date: Tue, 5 Jun 2007 02:47:09 -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: <876339.84554.qm@web57415.mail.re1.yahoo.com> Subject: Re: 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: Tue, 05 Jun 2007 09:47:10 -0000 >Some thoughts: >1. bsdlabel -Brw /dev/da0s1 >- What is the option "r"? >- bsdlabel is supposed to create standard label >which probably >means creating da0s1a partition (can you call >"bsdlabel /dev/da0s1" to >see what was created?) So your next command should be >"newfs >/dev/da0s1a" rather than "newfs /dev/da0s1". And >commands after that >will need to be adjusted as well. >2. boot0cfg -B -s 1 -t -v 182 /dev/da0 >It should be "-v -t 182" rather than "-t -v 182". >Not sure if it >matters though. >Hope this helps. >Andrey Thanks Andrey, great news! placing newfs on /dev/da0s1a instead of /dev/da0s1 really helped. Now GRUB recognizes the filesystem on my usb partition. Here's what's new. #I placed 1 UFS2 partition on my USB key at #/dev/da0s1a. mount /dev/da0s1a /usb mkdir -p /usb/boot/grub #copied all files from /boot to /usb/boot and all files #from /boot/grub to /usb/boot/grub (I know I can make #it smaller but just copying all for now). Next I #invoked the grub shell and did the following: grub> root (hd1,0,a) Filesystem type is ufs2, partition type is 0xa5. grub> setup (hd1) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/ufs2_stage1_5" exists... yes Running "embed /boot/grub/ufs2_stage1_5 (hd1)"... 16 sectors are embedded. Succeeded Running "install /boot/grub/stage1 (hd1) (hd1)1+16 p (hd1,0,a)/boot/grub/stage2 /boot/grub/menu.lst"... Succeeded Done. #I reboot, and am excited to see the grub menu I've set #up. Here is my menu.lst: default=0 timeout=30 title NewOS root (hd0,0,a) kernel /boot/loader #You might notice I made root hd0. This is actually #helpful for anyone setting GRUB up for the first time. #You see when setting up grub from the shell within #your computer, your first hard drive is always hd0, #and your usb stick can be anything after that (in my #case hd1). You can test this by placing an oddly #named text file in each of your grub directories (1 in #hard drive, 1 in usb stick), then using find from the #grub shell to indicate where that oddly named file is #located: grub> find /boot/grub/weirdfile (hd0,0,a) #The main point is that when you reboot to your USB #key, because it's now the first drive, it's probably #going to be hd0, instead of hdx, thus my menu.lst. # Anyway, back to the menu selection. When I choose the 'NewOS', this is what I get: Booting 'NewOS' root (hd0,0,a) Filesystem type is ufs2, partition type is 0xa5 kernel /boot/loader [FreeBSD-a.out, loadaddr=0x200000, text=0x1000, data=0x32000, bss=0x0, entry=0x200000] BTX loader 1.00 BTX version is 1.01 Consoles: internal video/keyboard BIOS drive C: is disk0 BIOS drive D: is disk1 BIOS 631kB/980480kB available memory FreeBSD/i386 bootstrap loader, Revision 1.1 (root @barney.msu.edu, Sun May 8 03:20:03 UTC 2006) #This is the last line, and if I wait about five #minutes it prints these additional lines: can't load 'kernel' Type '?' for a list of commands, 'help' for more detailed help. OK _ #Again I'm pretty sure I must have the right 'hd' #addressing. I tested this by changing the root #location to (hd1,0,a) which found the boot loader off #of my hard drive and booted. I tested this by moving #the loader from my hard drive out of /boot, and #rebooting, where upon it couldn't find loader anymore. Alright I'll leave it there. (Starving for that little morsel of knowledge out there that will unlock this!) -Fred (p.s. I'm new to the mailing lists, and can't find the charter for any of the groups, anyone have a link? :) ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091