Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2008, 08:26 AM
LucaToni LucaToni is offline
Junior Member
 
Join Date: Jul 2008
Location: Germany
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default [solved]: GRUB installation: Error 29: Disk write error
Hello,

I've been using pcbsd for a while.

Now I'd like to install and use GRUB.

This is the error message I get, when performing a GRUB installation with grub-install /dev/... or doing the installation "nativeley".

Code:
pcbsd# grub-install /dev/ad0

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]
grub> root (hd0,1,a)
 Filesystem type is ufs2, partition type 0xa5
grub> setup  --stage2=/boot/grub/stage2 --prefix=/boot/grub (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,1,a)"... failed (this is not fatal                                                           )
 Running "install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0) /boot/grub/                                                           stage2 p /boot/grub/menu.lst "... failed

Error 29: Disk write error
grub> quit


pcbsd# grub
Probing devices to guess BIOS drives. This may take a long time.

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

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

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

Error 29: Disk write error

grub>
My hard disk partitions:
/dev/ad0s1 = 90 GB/reiserfs without any OS for Backup and storage tasks
/dev/ad0s2 = 10 GB/ufs2 with PC-BSD 1.5.1
/dev/ad0s3 = 01 GB/linux-swap
/dev/ad0s4 = 10 GB/reiserfs with PC LinuxOS 2008

BTW, the optional bootlader GAG is able to start PC-BSD without problems, but starting the Linux-System there is an eror message: "bootsector not found (korrupt)"

Any ideas?
All help is highly appreciated! :-)

Thanks a lot! + Kind Regards,

LucaToni
Reply With Quote
  #2  
Old 07-08-2008, 09:29 AM
putu putu is offline
Senior Member
 
Join Date: Mar 2007
Location: DENPASAR - BALI
Posts: 548
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to putu
Default Re: GRUB installation: Error 29: Disk write error
I never use GRUB before, cause GAG doing the job very well

It's easy, without a headache
Reply With Quote
  #3  
Old 07-08-2008, 11:14 AM
LucaToni LucaToni is offline
Junior Member
 
Join Date: Jul 2008
Location: Germany
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: GRUB installation: Error 29: Disk write error
Originally Posted by putu
... GAG doing the job very well ...
Hello,

GAG returns regularly an error message, if Linux is called up. Like: "bootsector not found (korrupt)"

This Linux-System is a Mandriva derivate: PC Linux OS 2008. From the PC-BSD partition I can mount the Linux-System (reiserfs) without problems. PC Linux OS had been installed with the distribution's bootmanager GRUB. With this GRUB installation I'm able to start Linux and PC-BSD. However, this is not the favored solution I'm looking for. I'd like to be completely independent from Linux ;-)

GAG would be fine, if it would work ...

Best Regards,
LucaToni
Reply With Quote
  #4  
Old 07-08-2008, 10:20 PM
TerryP TerryP is offline
Senior Member
 
Join Date: Nov 2005
Location: Ga. USofA
Posts: 7,906
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to TerryP Send a message via AIM to TerryP Send a message via Yahoo to TerryP
Default Re: GRUB installation: Error 29: Disk write error
It sounds like something is being accessed read only when it needs to be read+write.

What is the value of the kern.geom.debugflags sysctl?

you can check with:

Code:
# sysctl kern.geom.debugflags
The value should be 16 to make the MBR writable.



For you menu.lst file, you will want an entry like:

Code:
title PC-BSD
root (hd0,1,a)
kernel /boot/loader

Originally Posted by LucaToni
GAG returns regularly an error message, if Linux is called up. Like: "bootsector not found (korrupt)"

Things may have changed with more recent versions of GAG but the only times I've had booting problems with Linux on my GAG system, is when there is no boot loader in the linux / partition to use for chain loading linux.


e.g. install GRUB or LILO into Linux /
Reply With Quote
  #5  
Old 07-09-2008, 11:01 AM
LucaToni LucaToni is offline
Junior Member
 
Join Date: Jul 2008
Location: Germany
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: GRUB installation: Error 29: Disk write error
Originally Posted by TerryP
...
Code:
# sysctl kern.geom.debugflags
The value should be 16 to make the MBR writable.
...
Hello TerryP,

Thanks for your answer!
This is the current value:

Code:
pcbsd# sysctl kern.geom.debugflags
kern.geom.debugflags: 0

UPDATE 2008/07/09: the problem is solved ! :-)


There is the solution:

1) If the command

Code:
pcbsd# sysctl kern.geom.debugflags
returns a value like this:

Code:
pcbsd# kern.geom.debugflags: 0
then type the following:

Code:
pcbsd# sysctl kern.geom.debugflags=16
This command will unlock the current protection mechanism of the Master Boot Record (MBR)! Now the MBR is writable.


2) Perform the GRUB installation into the MBR with:

Code:
pcbsd# grub-install <device>
in my example the <device> is: /dev/ad0


3) Edit the /boot/grub/menu.lst

in my example like this:

Code:
timeout 10
color black/white white/black

title PC_BSD 1.5.1
rootnoverify (hd0,1)
chainloader +1
boot

title PCLinuxOS 2008-2
kernel (hd0,3)/boot/vmlinuz BOOT_IMAGE=PCLinuxOS root=/dev/sda4 acpi=on resume=/dev/sda3 #splash=silent vga=788
initrd (hd0,3)/boot/initrd.img

And now you are ready to start your Operating Systems with the GRUB of FreeBSD ! :-)

Best Regards,
LucaToni
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updated my multiboot system to PC-BSD 8.0 - Grub error 17 Mr. Lumberg Installing PC-BSD 19 03-24-2010 01:24 PM
GRUB error: The file /boot/grub/stage1 not read correctly LucaToni FreeBSD Help 0 06-16-2009 09:29 PM
Out of disk space error should stop the installation garotosopa PC-BSD Installer 2 10-05-2008 05:39 PM
Grub Error 17 Can't mount partition at boot hpypenguin Installing PC-BSD 3 09-20-2008 05:07 PM
Grub error 17 work-around richard.a Drives 0 07-07-2006 06:28 AM


All times are GMT. The time now is 07:16 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.