LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2006, 05:07 AM   #1
nawin_g
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Rep: Reputation: 0
Configuring GRUB in FC4


hi,

I have FC4 and Windows XP installed on my system.
I use GRUB as bootloader

recently i had to format an ext3 partition to fat32 so that i can get that space for use in windows. i formatted the ext3 to fat32 in windowsXP using Acronis Partition Manager.

from then on whenever i reboot my system i get the

grub> command line. (not getting splash image)

each time i have to enter

root (hd0,8)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.img
boot

to get LINUX and

rootnoverify (hd0,0)
chainloader +1
boot

to boot into XP

these are the commands that should have been executed automatically.

My grub.conf file (before the partition was done):

#########################################################

default=0
timeout=5
#splashimage=(hd0,7)/grub/splash.xpm.gz
splashimage=(hd0,7)/grub/agnula_romantic.xpm.gz
hiddenmenu
password --md5 $1$gn7661$dXjYW3QgDVqxAcg4/oJDH0
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,7)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.img
title Waste OS
password --md5 $1$gn7661$dXjYW3QgDVqxAcg4/oJDH0
rootnoverify (hd0,0)
chainloader +1
###############################################################

i thought may be changing the root (hd0,7) to (hd0,8) would suffice my problem but even then i have to enter the command line arguments

This how my harddisk is partitoned ('fdisk -l' output)

###############################################################

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

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2432 19535008+ 7 HPFS/NTFS
/dev/hda2 2433 9729 58613152+ f W95 Ext'd (LBA)
/dev/hda5 2433 3712 10281568+ b W95 FAT32
/dev/hda6 3713 4364 5237158+ b W95 FAT32
/dev/hda7 4365 6796 19535008+ b W95 FAT32
/dev/hda8 6797 7296 4016218+ b W95 FAT32
/dev/hda9 7297 7309 104391 83 Linux
/dev/hda10 7310 7570 2096451 82 Linux swap / Solaris
/dev/hda11 7571 9729 17342136 83 Linux

###############################################################



i am able to successfully boot into WINDOWS and LINUX by entering the above command's. I think the problem occured while changing the partition and boot partition has changed from other than (hd0,7). please do help me in what changes i should be making

thanking in advance
Naveen Reddy

Last edited by nawin_g; 01-22-2006 at 05:17 AM.
 
Old 01-22-2006, 05:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you need to change the splashimage reference to hd(0,8) too. see how far you get after that, cos it is still looking in the right location for the stage 2 image, so shouldn't be too far wrong.
 
Old 01-23-2006, 04:21 AM   #3
nawin_g
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I tried that

i have changed the spalshimage to (hd0,8) but didn't work. is there anything else ishould be concerned of?

also i learnt (hd0,8) by trail and error is their anyother way to know about it by seeing the partitions of my hard disk
 
Old 01-23-2006, 09:36 AM   #4
caspervn
Member
 
Registered: Jul 2005
Location: Vietnam
Distribution: Fedora Core 2
Posts: 55

Rep: Reputation: 15
When you switch on power, which OS boot first ?
May be the problem's the order of partitions
 
Old 01-23-2006, 10:32 AM   #5
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
consider changing root=LABEL=/ to root=dev/hda9 as maybe the partition label was lost due to a bad partition info write by your partition manager. I've also noticed that some partition managers will name a new partition as if it were at the end of the partition list causing a shift in partition names, although I'm not sure how this would affect you in this case.
 
Old 01-23-2006, 10:49 AM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
When you set up to boot "by hand", before you do the "boot," try an "setup" (see below) to re-write the boot image so it points to (hd8,0) for the stage 1 stuff.

Perhaps a better suggestion: Build a GRUB boot floppy, and get it to work first. Here's a "quickie" on building a GRUB boot floppy:

1) Boot the rescue CD (or just do your "by hand" boot and start a su session)
2) Place a blank floppy in your floppy drive
3) If the floppy was automatically mounted, unmount it. (e.g., # umount /media/floppy)

Enter the following to format the floppy and install GRUB on it:
Code:
# mke2fs /dev/fd0 (Note: You could, instead, use mkfs -t fat to create a MS-DOS readable (and editable) floppy.)
# mount /media/floppy 
# mkdir /media/floppy/boot 
# mkdir /media/floppy/boot/grub 
# cp /boot/grub/stage1 /media/floppy/boot/grub/stage1 
# cp /boot/grub/stage2 /media/floppy/boot/grub/stage2 
# grub 
# grub> root (fd0) 
# grub> setup (fd0) 
# grub> quit
Then you can edit the /media/floppy/boot/grub/grub.conf untill you get it to work. Then copy that back to the /boot/grub/grub.conf file in your HD, and do the
Code:
# grub 
# grub> root (hd0) 
# grub> setup (hd0) 
# grub> quit
to make sure that GRUB is pointed to the proper grub.conf file.

As a side effect, you'll also have a boot floppy which can be handy when all else seems to fail.

Good luck.
 
Old 01-23-2006, 02:48 PM   #7
nawin_g
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Original Poster
Rep: Reputation: 0
dont thnk changing LABEL will work

caspervn asked :
" When you switch on power, which OS boot first ?
May be the problem's the order of partitions "

earlier it used to be FC4 but now i have to manually enter the commands.

linmix suggested:
" consider changing root=LABEL=/ to root=dev/hda9 "

i dont think changing the LABEL would work because whenever i want to boot LINUX i enter the following commands and its booting FC4 well

root (hd0,8)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.img
boot

however i will try once 2nite also i will try making a boot disk and inform the results at the earliest

thank u.

Last edited by nawin_g; 01-23-2006 at 02:50 PM.
 
Old 01-31-2006, 11:35 AM   #8
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 728

Rep: Reputation: 33
Try what PTrenholme suggest, I think it is the solution.

You should be aware that grub can be configed to use any file as the configuration file, not only grub.conf
You can boot you computer that mean you grub is OK.
But it ask you to enter the command manually mean it can't file the configuration file
see the output of info grub for more information.

Last edited by TruongAn; 01-31-2006 at 11:37 AM.
 
Old 03-09-2006, 08:41 AM   #9
nawin_g
LQ Newbie
 
Registered: Nov 2005
Posts: 19

Original Poster
Rep: Reputation: 0
hi thanks to all and special thanks to PTrenholme

i know it has been a long time but i was i away.

what ptrenholme suggested helped me.

i had to change the partition number in root()

tq
 
  


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
Configuring DNS under FC4 johndoe0028 Linux - Networking 5 01-06-2006 09:15 AM
Configuring Battery Monitor on FC4 fbarsoba Linux - Hardware 0 12-13-2005 12:58 PM
Newbie with FC4, Need help configuring SMC2662W USB 802.11b Adapter dam718 Linux - Wireless Networking 1 11-12-2005 04:59 PM
Installing and configuring bugzilla on fc4 pranith Fedora 0 06-30-2005 04:31 AM
FC4 dhcp configuring eth0 babyj Linux - Networking 4 06-25-2005 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:35 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