From owner-freebsd-questions@FreeBSD.ORG Sun Jun 3 14:28:42 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 A735216A41F for ; Sun, 3 Jun 2007 14:28:42 +0000 (UTC) (envelope-from fredbsdavidson@yahoo.com) Received: from n6a.bullet.mail.re3.yahoo.com (n6a.bullet.mail.re3.yahoo.com [68.142.236.44]) by mx1.freebsd.org (Postfix) with SMTP id 6AFE713C458 for ; Sun, 3 Jun 2007 14:28:42 +0000 (UTC) (envelope-from fredbsdavidson@yahoo.com) Received: from [68.142.230.29] by n6.bullet.re3.yahoo.com with NNFMP; 03 Jun 2007 14:28:42 -0000 Received: from [66.196.101.131] by t2.bullet.re2.yahoo.com with NNFMP; 03 Jun 2007 14:28:42 -0000 Received: from [127.0.0.1] by rrr2.mail.re1.yahoo.com with NNFMP; 03 Jun 2007 14:28:42 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 29092.98218.bm@rrr2.mail.re1.yahoo.com Received: (qmail 99912 invoked by uid 60001); 3 Jun 2007 14:28:41 -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=DLtRQ4yLN6G5sr8xqMI0QNlWjAm0/wFhk8ebeQmkzs0i/4vL+/CYnAPM5l4c7sBILXQE4+1vWAreU4/AzdrIxlqWg0V25Ocwg4x3HeeCOTtIy2AE0d3aouaS1D/ek7IoELESMwGL8KY0zQm8XC88wfyFRiUV/lg36jGlo/J4iTU=; X-YMail-OSG: 5rodQF8VM1k_uh5aVoKrxUqa0XXdOPBV5b7oS9jPORn_FEUytF4q1S6gcyybglMB65xfrIkkT1J0gp.9yQDNGs_OiASJxVhVlCTL Received: from [212.42.236.140] by web57405.mail.re1.yahoo.com via HTTP; Sun, 03 Jun 2007 07:28:41 PDT Date: Sun, 3 Jun 2007 07:28:41 -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: <948346.97779.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: Sun, 03 Jun 2007 14:28:42 -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? :) ____________________________________________________________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC