Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub Boot Problems (Corrupting MBR)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tsynergy
n00b
n00b


Joined: 09 Nov 2003
Posts: 5

PostPosted: Sun Nov 09, 2003 3:54 am    Post subject: Grub Boot Problems (Corrupting MBR) Reply with quote

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:

 hda: WindowsXP (NTFS)
 hdb: CD-R/RW
 hdc: Linux Partitions


My linux partitions in depth:
Code:

   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:

-> 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:

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:

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:

GRUB loading stage1.5

GRUB loading, place wait...
Error 21


My grub.conf looks like this:
Code:

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:

# /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.
Back to top
View user's profile Send private message
BiggJ
Guru
Guru


Joined: 07 Nov 2003
Posts: 384
Location: /usr/share/ \ zoneinfo/America/Los_Angeles

PostPosted: Sun Nov 09, 2003 4:10 am    Post subject: Re: Grub Boot Problems (Corrupting MBR) Reply with quote

Tsynergy wrote:


My grub.conf looks like this:
Code:

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
Back to top
View user's profile Send private message
Bar
n00b
n00b


Joined: 21 Jun 2003
Posts: 73

PostPosted: Sun Nov 09, 2003 4:29 am    Post subject: Reply with quote

http://www.gentoo.org/doc/en/gentoo-x86-install.xml#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
Back to top
View user's profile Send private message
Tsynergy
n00b
n00b


Joined: 09 Nov 2003
Posts: 5

PostPosted: Sun Nov 09, 2003 4:41 am    Post subject: Reply with quote

Bar wrote:
http://www.gentoo.org/doc/en/gentoo-x86-install.xml#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?
Back to top
View user's profile Send private message
cripwalk
n00b
n00b


Joined: 13 Jul 2003
Posts: 59
Location: Socal

PostPosted: Sun Nov 09, 2003 4:41 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Tsynergy
n00b
n00b


Joined: 09 Nov 2003
Posts: 5

PostPosted: Sun Nov 09, 2003 4:50 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Nov 09, 2003 5:59 am    Post subject: Reply with quote

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:
grub> root (hd1,0)
grub> kernel /kernel-2.4.20-gentoo-r8
grub> initrd /initrd-2.4.20-gentoo-r8
grub> boot
Back to top
View user's profile Send private message
Tsynergy
n00b
n00b


Joined: 09 Nov 2003
Posts: 5

PostPosted: Sun Nov 09, 2003 7:10 am    Post subject: Reply with quote

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:
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... :(
Back to top
View user's profile Send private message
Ben2040
Guru
Guru


Joined: 07 May 2003
Posts: 445
Location: UK

PostPosted: Sun Nov 09, 2003 8:23 am    Post subject: Reply with quote

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:

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
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Nov 09, 2003 3:42 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum