From owner-freebsd-questions@FreeBSD.ORG Fri Sep 24 22:52:15 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 422D8106564A for ; Fri, 24 Sep 2010 22:52:15 +0000 (UTC) (envelope-from eoakes@comcast.net) Received: from qmta15.emeryville.ca.mail.comcast.net (qmta15.emeryville.ca.mail.comcast.net [76.96.27.228]) by mx1.freebsd.org (Postfix) with ESMTP id 2E1888FC13 for ; Fri, 24 Sep 2010 22:52:15 +0000 (UTC) Received: from omta17.emeryville.ca.mail.comcast.net ([76.96.30.73]) by qmta15.emeryville.ca.mail.comcast.net with comcast id AfA61f0061afHeLAFmf5uj; Fri, 24 Sep 2010 22:39:05 +0000 Received: from abbyBSD7.workgroup ([76.18.90.79]) by omta17.emeryville.ca.mail.comcast.net with comcast id Amf41f0031ijSP88dmf4HE; Fri, 24 Sep 2010 22:39:04 +0000 Message-ID: <4C9D19E3.4040004@comcast.net> Date: Fri, 24 Sep 2010 15:36:35 -0600 From: tom oakes User-Agent: Thunderbird 2.0.0.9 (X11/20080213) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Writing to MBR 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: Fri, 24 Sep 2010 22:52:15 -0000 Hello, I have done a clean install of freebsd 8.1 on /dev/ad4s1a with the following: # Intel Core 2 Duo Dual-Core E6300 2.8GHz 1066MHz 2MB Cache Processor # ASRock G31M-S R2.0 Core 2 Quad/ Intel G31/ FSB 1600(OC)/ DDR2/ A&V&L/ MATX Motherboard # 4GB (2X2GB) DDR2-1066 PC2 8500 Dual Channel # Hitachi / WD 1TB 7200 RPM 32MB CACHE SATA 3.0Gb/s # kern.geom.debugflags=15160 Gb Disk on IDE Slave I added X11, KDE3, emacs, and BASH from ports or packages. /dev/ad4 has 4 slices of about 240GB. Freebsd is installed on the entire first slice. File system is ufs2 on /dev/ad4s1 and /dev/ad4s2. the other 2 slices do not have a filesystem installed. I did a tar of the / to an external usbdisk. I decided to install GRUB. (I really didn't need it, the bsd boot loader is working. But like the way it looks and it is easy to modify) I installed grub from the port and copied the required files to /boot/grub. I created a menu.lst in /boot/grub. I created a bootable grub cd which boots the operating system. I then tried to copy stage1 to the MBR with: fdisk -B -b /boot/grub/stage1 ad4 2 prompts: one to write to MBR, which I answered 'y', and the other to modify the partition table that I answered 'n'. I tried this from the hard disk boot, my grub bootable cd, and the freebsd livecd. None wrote to the MBR. The freebsd bootloader was still loaded. I found a post that said to do a sysctl kern.geom.debugflag=16 I tried again. Still didn't work. I found a post that said for version 8.0 or 8.1 it needed to be 17. I tried that and it still didn't work. I found a post that said to do a gpart -bootcode -B /boot/grub/stage1 ad4 and got a message "ad4 has bootcode" I did this both before and after doing the sysctl with 16 and 17. It seems to me that writing the stage1 file to the MBR should be straight forward, so I must be missing something simple. I don't have a critical problem, I can still boot from the freebsd bootloader or from my grub cd. After chasing my tail for a couple of days trying to get grub working, I hate to just give up. Thanks in advance for any help you can give me Tom