LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 07-22-2005, 09:18 PM   #1
danielanson
Member
 
Registered: May 2005
Location: San Antonio, TX
Distribution: OpenBSD 3.7
Posts: 76

Rep: Reputation: 15
FreeBSD and GRUB


I am having a terrible time with GRUB and it is very frustrating. I will give a description of what I am doing and what happens.

1) I installed GRUB. cd /usr/ports/sysutils/grub && make install clean

Result: GRUB 0.97 installed on system

1a) I copied all the grub files into a dir called /boot/grub

cp -Rf /usr/local/share/grub/i386-freebsd /boot/grub

1b) I created a menu.lst file which looks like this:

timeout 10
title FreeBSD
root (hd0,0,a)
kernel /boot/loader

2) I started grub

result: started fine

3) From the grub prompt, I tried to install grub on the first slice of the primary master.


grub> root (hd0,0,a)
Filesystem type is ufs2, partition type 0xa5

grub> setup (hd0)
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 (hd0)"... failed (this is not fatal)
Running "embed /boot/grub/ufs2_stage1_5 (hd0,0,a)"... failed (this is not fata
l)
Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.l
st "... failed

Error 29: Disk write error

grub>

You can see the error I get. I am doing this as root and the version of grub is 0.97. I am no newb to BSD I have just never have the need to dual boot a box before yesterday. On a side note, the boot loader currently used is the FreeBSD boot loader that comes with the install. Do I need to erase the MBR before installing grub. It almost seems as if the boot sector is somehow protected. I have read the BSD and Grub manuals amd Googled and performed several different how-tos to no avail. I am desparate. I have been forced to use a Windows box at work and it keeps blue-screening. I need BSD.

The website I used is

http://lists.freebsd.org/pipermail/f...ay/006944.html

However, this page is very cryptic.

Please help
 
Old 07-22-2005, 11:36 PM   #2
detpenguin
Senior Member
 
Registered: Oct 2003
Location: lost in the midwest...
Distribution: Slackware
Posts: 1,098

Rep: Reputation: 54
is there any reason you're not installing it to the MBR? i've never had a problem with grub when i installed it to the MBR...
 
Old 07-22-2005, 11:51 PM   #3
danielanson
Member
 
Registered: May 2005
Location: San Antonio, TX
Distribution: OpenBSD 3.7
Posts: 76

Original Poster
Rep: Reputation: 15
I was under the impression that this did write it to the MBR. Am I mistaken?

Thx for responding

D
 
Old 07-23-2005, 02:53 AM   #4
danielanson
Member
 
Registered: May 2005
Location: San Antonio, TX
Distribution: OpenBSD 3.7
Posts: 76

Original Poster
Rep: Reputation: 15
Smile

I fixed it, so here's how I did it:

1) boot system normally, get root, and put in a floppy disk
2) >dd if=stage1 of=/dev/fd0 bs=512 count=1
>dd if=stage2 of=/dev/fd0 bs=512 seek=1
3) >shutdown -r now
4) When the machine boots to the grub prompt, do the aforementioned [ root (hd0,0,a) then setup (hd0) ] but this time it will work
5) Now from the grub prompt grub>kernel /boot/loader (load kernel)
grub>boot /boot/loader (boot kernel)
6) Now that you can get into your machine, rewrite the menu.lst file and voila, YOU ARE DONE.

Remember that if you use a different kernel, load the one you use in fact you could compile many kernels and load any which one you like or Windows or Linux or my fave OpenBSD.

BSD ROCKS!!!

Daniel Anson
 
Old 07-24-2005, 12:04 PM   #5
jm0624
LQ Newbie
 
Registered: Jul 2005
Posts: 12

Rep: Reputation: 0
timeout 10
title FreeBSD
root (hd0,0,a)
kernel /boot/loader

i am no so familiar with GRUB,but i think there is a problem in your GRUB in my opinion,you should use:
root(hd0,0a)
just have a try,i am no sure......
cccc..................
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't load FreeBSD in Grub of FC4 jm0624 General 3 07-28-2005 02:06 PM
Booting FreeBSD with Grub offaxis Linux - Newbie 3 09-21-2004 11:21 AM
Grub Bootloader not seeing FreeBSD cmf5150 Linux - Newbie 3 01-29-2004 08:59 PM
GRUB can't boot FreeBSD 5.1 bhaskie *BSD 4 01-17-2004 03:31 PM
Booting FreeBSD from GRUB KungFuHamster *BSD 1 04-06-2003 03:06 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration