LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-06-2004, 01:02 PM   #1
shortsword
LQ Newbie
 
Registered: Oct 2004
Location: California, USA
Distribution: Fedora Core 2
Posts: 24

Rep: Reputation: 15
GRUB Problem


I have installed a a second hard drive on a PC that already has WinXP installed. I then installed Fedora Core 2 on the new hd. I want the two OSes to dual boot. I have done this before and had problems when GRUB was installed to the MBR. Windows does NOT like that situation. So, today, when the FC2 installer asked about installing a boot loader I told it not to. Later I came back and manually installed GRUB in the /boot partition (hdb1) on the Linux hd. After GRUB was installed and its menu.lst file configured (see below) I created a soft link to menu.lst named grub.conf. Then I used dd to copy the first 512 bytes of the /boot partition to a file to be used to chain the windows boot loader to GRUB. I put that file on a floppy, and rebooted to windows and copied the file into the C: directory and configured c:\boot.ini with a new entry pointing to that file.

So, I went out of my way to be nice to Windows, and Windows is happy. Boots correctly every time. But, Linux is not happy. It will only boot from either the boot floppy that I made or from the FC2 Rescue CD. It will not boot from the hard drive /boot partition. When I boot from the hard drive the Windows boot menu comes up correctly and displays the two choices for Windows XP and Linux. If I select Linux, "GRUB", without the quotes, is printed to the top of a blank screen and nothing else ever happens.

Here are the answers to the questions that I believe readers of this entry will ask.

The "fdisk -l /dev/hdb" command gives,

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 778 6144862+ 83 Linux
/dev/hdb3 779 3328 20482875 83 Linux
/dev/hdb4 3329 9729 51416032+ f W95 Ext'd (LBA)
/dev/hdb5 3329 4603 10241406 83 Linux
/dev/hdb6 4604 4730 1020096 83 Linux
/dev/hdb7 4731 4857 1020096 82 Linux swap
/dev/hdb8 4858 4921 514048+ 83 Linux


The "mount" command gives,

/dev/hdb2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hdb1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/hdb3 on /home type ext3 (rw)
/dev/hdb8 on /tmp type ext3 (rw)
/dev/hdb5 on /usr type ext3 (rw)
/dev/hdb6 on /var type ext3 (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


GRUB was installed to /boot with the command,

grub-install /dev/hdb1

The /boot/grub/grub.conf file has these contents,

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Fedora Core (2.6.5-1.358)
root (hd1,0)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img

The command used to copy the first 512 bytes of the /boot partition was,

dd if=/dev/hdb1 of=linuxbootsect bs=512 count=1

I then copied the linuxbootsect to the floppy and rebooted to Windows where linuxbootsect was copied to c:\linuxbootsect and the c:\boot.ini was modified to look like this:

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect

c:\linuxbootsect="Linux"


Selecting the "Microsoft Windows XP Home Edition" selection from the Windows boot menu boots Windows just fine. Selecting the "Linux" selection results in "GRUB" printed at the top of the screen and nothing further happening.

Can anyone suggest what I have forgotten to do or have done wrong.
 
Old 11-06-2004, 01:11 PM   #2
shortsword
LQ Newbie
 
Registered: Oct 2004
Location: California, USA
Distribution: Fedora Core 2
Posts: 24

Original Poster
Rep: Reputation: 15
Re: GRUB Problem

Oops. I did leave out one bit of information.

There is a soft link in the /boot/grub directory as follows:

lrwxrwxrwx 1 root root 11 Nov 6 00:04 menu.lst -> ./grub.conf
 
Old 11-07-2004, 02:06 PM   #3
knutove1728
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Redhat FC2
Posts: 44

Rep: Reputation: 15
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-28.7smp)
root (hd0,5)
kernel /boot/vmlinuz-2.4.20-28.7smp ro root=/dev/hda6 hdb=ide-scsi
initrd /boot/initrd-2.4.20-28.7smp.img


I think but I'm not sure that root=LABEL as you have should point to your partition.
root=/dev/hda6 hdb=ide-scsi
here mine is hda6
 
Old 11-08-2004, 02:18 AM   #4
shortsword
LQ Newbie
 
Registered: Oct 2004
Location: California, USA
Distribution: Fedora Core 2
Posts: 24

Original Poster
Rep: Reputation: 15
As indicated by this listing of /etc/fstab:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
/dev/hdb7 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

the first entry has LABEL=/ and is the / partition.

Since my first entry and in response to readings from the GRUB info pages, I changed that line as follows:

kernel /vmlinuz-2.6.5-1.358 ro root=/dev/hdb2

which is more along the lines of your entry and uses the actual device name instead of the LABEL. This had no affect. The boot still operates the same.
 
Old 11-08-2004, 02:12 PM   #5
BerryBlocksta9
LQ Newbie
 
Registered: Sep 2004
Location: PA
Distribution: Mandrake 10.1
Posts: 12

Rep: Reputation: 0
Grub_

This is of interest to me, because I have a problem a bit different from the previous but Grub bootloader messed up my pc or sumthin'. When I try to boot, all I get is
GRUB_
I can't type in anything, all I see is grub and a flashing line ( _ ).
Hope someone has an answer to this or a suggestion.
PEACE to all.
Yattara
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Yet another GRUB problem eqxro Linux - Software 3 08-04-2004 09:27 AM
HDD problem, scancode problem and grub EJ_INSIDE Debian 2 07-15-2004 09:36 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM
grub problem jigs Linux - Newbie 7 09-18-2003 12:16 PM
GRUB problem pupunk98 Linux - Newbie 7 12-26-2002 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:41 AM.

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