Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Grub Boot Problems (Corrupting MBR)

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Tsynergy
n00b
n00b
Posts: 5
Joined: Sun Nov 09, 2003 3:15 am

Grub Boot Problems (Corrupting MBR)

  • Quote

Post by Tsynergy » Sun Nov 09, 2003 3:54 am

Hello,

I'm installing Gentoo and am having problems getting the Grub boot loader to work correctly. I've read quite a few posts already and attempted some of the common fixes to no avail. When booting Grub it gives me a Error 21 notice on boot.

The following is my system setup:

Code: Select all

 hda: WindowsXP (NTFS)
 hdb: CD-R/RW
 hdc: Linux Partitions
My linux partitions in depth:

Code: Select all

   Device  Boot  Start   End   Blocks    Id    System 
/dev/hdc1   *        1     9    72261    83   Linux
/dev/hdc2          606  1582 7847752+     f   Win95 Ext'd (LBA)
/dev/hdc3           10   605  4787370    83   Linux 
/dev/hdc5          606  1186  4666851    83   Linux 
/dev/hdc6         1187  1249   506016    82   Linux swap 
/dev/hdc7         1250  1542  2353491     7   HPFS/NTFS 
/dev/hdc7         1543  1582  321268+     7   HPFS/NTFS
The linux partition types are reiserFS for hdc1 hdc3 and hdc5. Linux swap for hdc6. Maped out:

Code: Select all

-> hdc1: /boot (reiserFS)-(65Mb)-(Primary)
-> hdc2: Extended Partition
-> hdc3: / (reiserFS)-(Primary)
-> hdc5: Debian GNU/Linux Partition (ReiserFS)-(Logical)
-> hdc6: Linux Swap (Shared between the two distros)-(Logical)
-> hdc7: NTFS Partition (Logical)
-> hdc8: NTFS Partition (Logical)
Aswell for refrence my hardware is:

Code: Select all

hda: Maxtor 2R015H1
hdb: LG HL-DT-ST GCE-8481B CD-R/RW
hdc: Quantum Fireball CX13.0A
fd0: Floppy
I'm using the Gentoo downloaded two CD set (Gentoo 1.4) with kernel 2.4.20. After browsing the forums I saw a few solutions to some problems.

The first was to enable ext2 because the initrd kernel needed it, I compiled it into the kernel as suggested. Second was to check the Processor Type in Processor Types and Features inside the kernel. I am using a Pentium II 400Mhz (Deutsches) processor, so changed what was listed as i386 to Pentium-Pro/Celeron/Pentium II. And finally another solution was to disable ACPI or add acpi=off to the grub boot config. I removed it from the kernel.

To compile the kernel I use genkernel --config to create initrd-2.40-gentoo-r8 and kernel-2.40.2-gentoo-r8 inside (hdc1)/boot/. After the kernel was compiled I ran grub and executed the following commands:

Code: Select all

grub> root (hd1,0)
 Filesystem type is reiserfs, partition type 0x83
grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/reiserfs_stange1_5" exists... yes
 Running "embed /boot/grub/reiserfs_stage1_5 (hd0)" ... 19 sectors are embedded.
succeded
 Running "install /boot/grub/stage1 d (hd0) (hd0)1+19 p (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeded
Done.
grub>
Everything looked fine, but on reboot I got the following errors:

Code: Select all

GRUB loading stage1.5

GRUB loading, place wait...
Error 21
My grub.conf looks like this:

Code: Select all

default 0
timeout 30
splashimage=(hd1,0)/boot/grub/splash.xpm.gz

#If you compiled your own kernel, use something like this
title=Gentoo Linux
root (hd1,0)
kernel (hd1,0)/boot/kernel-2.4.20-gentoo-r8 root=/dev/hdc3 hdb=ide-scsi vga=794
initrd (hd1,0)/boot/initrd-2.4.20-gentoo-r8
My fstab looks like this:

Code: Select all

# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.12 2003/03/11 02:50:53 azarah Exp $
#
# noatime turns of atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to 
# switch between notail and tail freely.

# <fs>          	<mountpoint>    <type>  	<opts>      		<dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hdc1		/boot		reiserfs	noauto,noatime,notail	1 1
/dev/hdc3		/		reiserfs	noatime			0 0
/dev/hdc6		none		swap		sw			0 0
/dev/cdroms/cdrom0	/mnt/cdrom	iso9660		noauto,ro		0 0

# NOTE: The next line is critical for boot!
none			/proc		proc		defaults		0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink). 
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none			/dev/shm	tmpfs		defaults		0 0
I've had probelms with boot loaders in the past, so usually I use a boot disk (using mkbootdisk or something similar) to make a boot disk. I couldn't find this option in Gentoo. I attempted to use the command dd if=/boot/kernel-2.4.20-gentoo-r8 of=/dev/fd0 to make a boot disk, but on boot it says it ran out of media to read(?), something like that.

Can anyone help me with this issue, I hope I've provided enough info.
Top
BiggJ
Guru
Guru
User avatar
Posts: 384
Joined: Fri Nov 07, 2003 1:01 am
Location: /usr/share/ \ zoneinfo/America/Los_Angeles
Contact:
Contact BiggJ
Website

Re: Grub Boot Problems (Corrupting MBR)

  • Quote

Post by BiggJ » Sun Nov 09, 2003 4:10 am

Tsynergy wrote:
My grub.conf looks like this:

Code: Select all

default 0
timeout 30
splashimage=(hd1,0)/boot/grub/splash.xpm.gz

#If you compiled your own kernel, use something like this
title=Gentoo Linux
root (hd1,0)
kernel (hd1,0)/boot/kernel-2.4.20-gentoo-r8 root=/dev/hdc3 hdb=ide-scsi vga=794
initrd (hd1,0)/boot/initrd-2.4.20-gentoo-r8
I put "vga=XXX" on it's own line under "splashimage".

Don't know if that's it though.

--BiggJ
Top
Bar
n00b
n00b
Posts: 72
Joined: Sat Jun 21, 2003 3:08 am

  • Quote

Post by Bar » Sun Nov 09, 2003 4:29 am

http://www.gentoo.org/doc/en/gentoo-x86 ... doc_chap24
^grub bootdisk ^

If its the same HD thats always had boot loader problems then disk is probably your best choice
feel free to correct (read:lightly flame) anything wrong above :)

"Don't take life to seriously. It isn't as if you will actually live through it anyways"-Elbert Hubbard
Top
Tsynergy
n00b
n00b
Posts: 5
Joined: Sun Nov 09, 2003 3:15 am

  • Quote

Post by Tsynergy » Sun Nov 09, 2003 4:41 am

Bar wrote:http://www.gentoo.org/doc/en/gentoo-x86 ... doc_chap24
^grub bootdisk ^

If its the same HD thats always had boot loader problems then disk is probably your best choice
I've tried to create a grub bootdisk in the past, using the method on the page all it does is gives me the functionality of grub, on a disk. Am I missing a way to boot with grub from the disk?

As for the hard drive, I need to RMA the drive to Maxtor because of a smart chip failure, but I don't think that's the problem. If I wanted to swap out that hard drive on the chain for this one what changes would I need to make so that it goes without errors? Just grub and fstab quick fixes?
Top
cripwalk
n00b
n00b
Posts: 59
Joined: Sun Jul 13, 2003 9:20 pm
Location: Socal

  • Quote

Post by cripwalk » Sun Nov 09, 2003 4:41 am

As far as I can tell it looks like you set up everything correctly. Perhaps you dont have your 2nd hard drive configured properly in your bios?
Top
Tsynergy
n00b
n00b
Posts: 5
Joined: Sun Nov 09, 2003 3:15 am

  • Quote

Post by Tsynergy » Sun Nov 09, 2003 4:50 am

cripwalk wrote:As far as I can tell it looks like you set up everything correctly. Perhaps you dont have your 2nd hard drive configured properly in your bios?
I'm trying to install grub on the MBR of the first drive. Both drives are setup with LBA in the bios, and there isn't any problem accessing the two drives. Just installing grub.

As an alternative is it possible to install grub on a floppy, or a CD-ROM?
Top
cyrillic
Watchman
Watchman
User avatar
Posts: 7311
Joined: Wed Feb 19, 2003 3:05 am
Location: Groton, Massachusetts USA

  • Quote

Post by cyrillic » Sun Nov 09, 2003 5:59 am

Tsynergy wrote:I've tried to create a grub bootdisk in the past, using the method on the page all it does is gives me the functionality of grub, on a disk. Am I missing a way to boot with grub from the disk?
BTW, the "functionality of grub" includes the ability to boot your system. Once you boot from the floppy, you can enter your grub.conf commands manually.

Code: Select all

grub> root (hd1,0)
grub> kernel /kernel-2.4.20-gentoo-r8
grub> initrd /initrd-2.4.20-gentoo-r8
grub> boot 
Top
Tsynergy
n00b
n00b
Posts: 5
Joined: Sun Nov 09, 2003 3:15 am

  • Quote

Post by Tsynergy » Sun Nov 09, 2003 7:10 am

cyrillic wrote:BTW, the "functionality of grub" includes the ability to boot your system. Once you boot from the floppy, you can enter your grub.conf commands manually.

Code: Select all

grub> root (hd1,0)
grub> kernel /kernel-2.4.20-gentoo-r8
grub> initrd /initrd-2.4.20-gentoo-r8
grub> boot 
*sigh* That would just be too easy. I started up my grub boot disk and tried root (hd1,0) but it couldn't see my hd1. Just hd0... why... :(
Top
Ben2040
Guru
Guru
User avatar
Posts: 445
Joined: Wed May 07, 2003 2:21 pm
Location: UK
Contact:
Contact Ben2040
Website

  • Quote

Post by Ben2040 » Sun Nov 09, 2003 8:23 am

Hi

The path to the splash image is incorrect, but I don't think this would cause the not booting problem. You also might want to try changing grub.conf to the following:

Code: Select all

default 0
timeout 30
splashimage=(hd1,0)/grub/splash.xpm.gz

title=Gentoo Linux
root (hd1,2)
kernel (hd1,0)/kernel-2.4.20-gentoo-r8 root=/dev/hdc3 hdb=ide-scsi vga=794
initrd (hd1,0)/initrd-2.4.20-gentoo-r8
If that doesn't work then perhaps you could try LILO?

Ben
Top
cyrillic
Watchman
Watchman
User avatar
Posts: 7311
Joined: Wed Feb 19, 2003 3:05 am
Location: Groton, Massachusetts USA

  • Quote

Post by cyrillic » Sun Nov 09, 2003 3:42 pm

Tsynergy wrote:*sigh* That would just be too easy. I started up my grub boot disk and tried root (hd1,0) but it couldn't see my hd1. Just hd0... why... :(
This is a BIOS problem, and it means you can only boot from the first harddrive (it doesn't matter which bootloader you use).

EDIT : If you put just the /boot partition on your first harddrive, and the rest of your Gentoo installation on the second harddrive, you would have a bootable system.
Top
Post Reply

10 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy