Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27th March 2004, 05:59 AM
gonzalo76 Offline
Registered User
 
Join Date: Feb 2004
Location: Buenos Aires, ARG
Age: 38
Posts: 320
How to edit grub.conf

Problem

I have this 6 partitions on my disk:

hd0,0 = Windows XP
hd0,1 = Documents
hd0,2 = Music
hd0,4 = Fedora /boot
hd0,5 = Fedora /root
hd0,6 = Fedora /swap

I use GRUB installed in the MBR to boot Windows XP and Fedora Core, but under Windows XP with the Partition Magic I made another partition in the free space of the Music partition, now I have 7 partitions.

hd0,0 = Windows XP
hd0,1 = Documents
hd0,2 = Music
hd0,4 = Videos
hd0,5 = Fedora /boot
hd0,6 = Fedora /root
hd0,7 = Fedora /swap


But the problem is that grub does not boot anymore. Now, I can't boot any system and what appears to me is the GRUB boot minimal bash-like line black screen.
What should I do to fix this problem?
Should I reinstall GRUB or should I only edit /boot/grub/grub.conf with the new entries?


Solution

What happened here is that you broke GRUB's partitions table. When you delete or add partitions, boot table and drive numbers/letters changed their orders in the /boot/grub/grub.conf.
Since you did this using Windows, grub doesn't know things have changed and tries to look to Fedora's boot partition from wrong places.

Before adding the new partition Videos, Fedora's boot partition was in hd0,4.
After adding the new partition Videos, Fedora's boot partition is now in hd0,5.
You have to tell GRUB about this modification. How? Editing grub.conf.


This is the grub.conf before adding the new partition

--------------------------------------------------------------------
#grub.conf generated by anaconda

default=0
timeout=10
splashimage=(hd0,4)/grub/splash.xpm.gz

title GNU/Linux Fedora Core 1 (2.4.22-1.2174.nptl)
root (hd0,4)
kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdc=ide-scsi apm=off acpi=on rhgb
initrd /initrd-2.4.22-1.2174.nptl.img

title Microsoft Windows XP Pro
rootnoverify (hd0,0)
chainloader +1
----------------------------------------------------------------------

So, what you have to do is edit your /boot/grub/grub.conf with the new partition table.

(First of all, enter your BIOS setup and in BOOT Sequence window choose to boot with CDROM first.)

1) Boot with your Fedora Core Installation CD 1.

2) Type "linux rescue" at the prompt.

3) Answer the questions about keyboard and language.

4) Tell the rescue mode to use your proper partition to mount (the one that you want to get booted into)

Choose Continue

(Don't choose Cancel or Read Only) because you want to edit grub.conf

5) When you come to the console prompt type:

sh-2.05# chroot /mnt/sysimage

6) Edit your grub.conf with nano, type:

sh-2.05# nano /boot/grub/grub.conf

7) You'll only have to edit 2 lines:

splashimage=(hd0,4)/grub/splash.xpm.gz

root (hd0,4)
(This is your /boot partition, specifies which partition contains your Linux kernel image.



This is the grub.conf after editing your grub.conf

-------------------------------------------------------------------------
#grub.conf generated by anaconda

default=0

timeout=10
splashimage=(hd0,5)/grub/splash.xpm.gz

title GNU/Linux Fedora Core 1 (2.4.22-1.2174.nptl)
root (hd0,5)

kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdc=ide-scsi apm=off acpi=on rhgb
initrd /initrd-2.4.22-1.2174.nptl.img

title Microsoft Windows XP Pro
rootnoverify (hd0,0)
chainloader +1
----------------------------------------------------------------------------

8) Eject your Fedora Core installation CD1 and type exit to reboot your system.

sh-2.05# exit

If everything went just fine, voila, GRUB boot window appears again!!

-----------------------
Related HOWTO
How to install GRUB in the MBR
http://www.fedoraforum.org/forum/sho...=&threadid=975
__________________
Greetings :)
gonzalo

Last edited by gonzalo76; 2nd April 2004 at 04:26 AM.
  #2  
Old 26th April 2005, 10:42 AM
sachin_malik Offline
Registered User
 
Join Date: Apr 2005
Posts: 16
i am very new to linux
i want to install windows 98 and windows 2000 and two distros of linux. will u tell tell me the exact procedure in details.
  #3  
Old 26th April 2005, 11:21 AM
mghiba Offline
Registered User
 
Join Date: Apr 2005
Posts: 6
You are welcome
Firstly you have to isntall widnows 98 and then windows 2k
Secondly install Linux
Grup will recognize Dos and Linux.
if you chose Dos you cand swich between win98 and win 2k
Best wishes
  #4  
Old 30th April 2005, 03:59 PM
Knudson Offline
Registered User
 
Join Date: Mar 2005
Location: Italy
Age: 29
Posts: 401
here is a little hint for those like me with grub problem with sata disks! nice topic

Problem:

i have 1 hard disk s-ata which has windows installed on it. I bought a second sata hard drive that i want to use for linux. After installing on it FC3 and grub, i cannot boot windows from grub.

Solution

Supposing (my situation)

/dev/sda --> sata disk with fedora
/dev/sdb --> sata disk with windows

the grub.conf entry realated to windows should be changed :

FROM:

title win2k
rootnoverify(0,0)
chainloader +1

TO:

title win2k
rootnoverify(1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1


after googling a bit , i think that this happens because S-ata are Point-2-point devices (aka no primary/secondary master/slave) and grub suppose that one must be a slave.

hope this helps

knu
__________________
knu - ICQ# 51135890
knu.altervista.org
Help us to give linux a better software support!
Shooby dooby doo shooby dooby doo durul

Last edited by Knudson; 30th April 2005 at 04:10 PM.
  #5  
Old 1st May 2005, 10:00 AM
mghiba Offline
Registered User
 
Join Date: Apr 2005
Posts: 6
Okay I want to understand when you installed fedora in one of inallation steps fedora told you if you would like to make Dos the first boot or FC 3, alright her if you did not see it that mean fedora doest not realse Windows. In this case I perfare to reinstall windows and then install FC3 in on one HDA. and that is better for you.
  #6  
Old 20th June 2006, 02:13 AM
jaymes Offline
Registered User
 
Join Date: Feb 2005
Posts: 1
thanks for the info...I ran into a similar but different problem and this helped alot.

I used an Asus A8N-sli premium which has 2 sata controllers (nvidia and silicon)
The nvidia sata shows in the bios and allows booting while the silicon bios comes up separate (after) from the motherboard bios and does not allow the hard drives on it to show in the motherboard's bios or allow for boot order in the MB bios
(actually if you make a raid in the silicon bios, the raid will show up in the MB bios...but since these are fake (software) raids and don't work well with linux, I am using linux software raid since it is better supported for my raid needs)
So I put 2 80Gb sata hard drives on the nvidia controller for my file system and 4 500Gb sata hard drives on the silicon controller for my storage.
I install Fedora Core 5, use disk druid in the FC5 installation to create raid1 out of the 2 80's. They show up as hard drives 5 and 6...sde and sdf. Works great. The 4 500's show up as sda, sdb, sdc, and sdd (drives 1-4)
Finish install and FC5 works perfectly.

Then i fdisk the 4 500's, one partition each, toggle to fd (raid filesystem), then turn them into a raid10 (2 mirrors of 500Gb that are raid0 together to form a 1000Gb unit).
Note: used mdadm --create --verbose /dev/md6 --level=10 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
format the raid10 as ext3
mounted as /storage
fixed mdadm.conf and /etc/fstab
waited til the array resynced
restarted and got a "grub hard disk error" on reboot

Because grub looked to boot from the 5th disk (hd4,0), ie sd5
note disk 1 is hd0, 2 is hd1, 3 is hd2, 4 is hd3, 5 is hd4, 6 is hd5
While the install and the first booting had the boot disk as hd4
creating the array on hd0 thru hd3 caused hd4 and hd5 to become hd0 and hd1
and hd0 thru hd3 to become hd2 thru hd5

not sure on the specifics of why it happen, nor do I care as of today...i think the motherboard bio booting order got it back to the order it should have been in the first place...whatever

Then I found this thread and switch the hd4 in the grub.conf to hd0 and it boots perfectly again. Life is good again. Hope this helps anyone who finds themselves in this bizzare situation.
thanks gonzalo76 for the info and your football team is tearing up world cup play.
  #7  
Old 21st June 2007, 08:07 PM
Caraibes Offline
Registered User
 
Join Date: Sep 2006
Location: Dominican Republic
Age: 41
Posts: 76
here's mine :

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,4)
# kernel /boot/vmlinuz-version ro root=/dev/sda5
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.21-1.3228.fc7)
root (hd0,4)
kernel /boot/vmlinuz-2.6.21-1.3228.fc7 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.21-1.3228.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,4)
kernel /boot/vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.21-1.3194.fc7.img
title Other
rootnoverify (hd0,0)
chainloader +1
  #8  
Old 1st March 2008, 01:08 PM
roscao Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
I have a dual boot system (Windows and fedora 8). I would like to know how to configure the boot loader in order to have windows as default system until I will manage to teach my wife to use Linux. Please help!
  #9  
Old 1st March 2008, 01:14 PM
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,291
Hello:

Look for "Bootloader Configuration" on the menus. It's a GUI for grub.conf. You only get two choices: default OS and countdown timer. Choose Windo$e as the default OS (it might be labeled "Other").

V
  #10  
Old 1st March 2008, 01:48 PM
roscao Offline
Registered User
 
Join Date: Feb 2008
Posts: 5
I must admit, but I cannot find the the Bootloader Configuration,
  #11  
Old 1st March 2008, 02:05 PM
JN4OldSchool Offline
"Sean The Terrible" -- The forum(er) Vista® rep
 
Join Date: Nov 2005
Posts: 8,823
I waited as I dont want to step on Hlinger's toes...

Just do this:

Code:
su
(your root password)
gedit /etc/grub.conf
You could also gedit /boot/grub/grub.conf OR /boot/grub/menu.lst. All 3 are the same file.

Just change the default value to match the Windows title entry. The first title is "0", the next is "1" and so on.
  #12  
Old 15th April 2008, 12:58 PM
awei Offline
Registered User
 
Join Date: Apr 2008
Posts: 3
help me plzz...i'm newbie and very exciting wth all this. after install F7 from live cd, my laptop still boot straight to winxp without showing/pouse at grub.

i want it to show/pause at grub, so i can choose WinXP or F7 but by default it should boot F7. my partition /boot is /dev/sda3 as i open wth GParted. can i simply edit the grub.conf without reinstall the grub?

here's the grub.conf:

# 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,2)
# kernel /vmlinuz-version ro root=/dev/sda7
# initrd /initrd-version.img
#boot=/dev/sda3
default=0
timeout=15
splashimage=(hd0,2)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.21-1.3194.fc7)
root (hd0,2)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Other
rootnoverify (hd0,0)
chainloader +1
  #13  
Old 19th April 2008, 06:01 AM
hermouche Offline
Registered User
 
Join Date: Apr 2006
Location: Algeria
Posts: 807
according to your grub .conf file you have got 15 seconds to choose wether to boot the fedora or windows.

By default, after 15 seconds, fedora should boot in your system.

Now if you want to change, and let say you want windows as a booting system by default, just change the line:

default=0

by

default=1

That's it.

red
__________________
IBM ThinkPad z60m
  #14  
Old 20th April 2008, 07:51 PM
ALCT Offline
Registered User
 
Join Date: Aug 2007
Posts: 8
Quote:
Originally Posted by hermouche
according to your grub .conf file you have got 15 seconds to choose wether to boot the fedora or windows.

By default, after 15 seconds, fedora should boot in your system.

Now if you want to change, and let say you want windows as a booting system by default, just change the line:

default=0

by

default=1

That's it.

red

hermouche,

Are you saying that if awei changes" default = 0 " to "default=1", you will not see a pause at grub and boot directly to Windows?

What if I boot directly to windows and now I want to boot to fedora, Will I be able to config the gurb.conf without going into Fedora first.?
  #15  
Old 21st April 2008, 08:20 AM
hermouche Offline
Registered User
 
Join Date: Apr 2006
Location: Algeria
Posts: 807
Quote:
Originally Posted by ALCT
hermouche,

Are you saying that if awei changes" default = 0 " to "default=1", you will not see a pause at grub and boot directly to Windows?

What if I boot directly to windows and now I want to boot to fedora, Will I be able to config the gurb.conf without going into Fedora first.?
Hy ALCT,

I said that if you change default=0 to default=1, and if you don't touch any key for a while here (timeout=15), the box boot directly to windows.
default=0
timeout=15



Another think, if you want or don't want to see the pause at grub, you should edit the following:

#hiddenmenu >>>>>>>>>>>>>>>>>>>>> will not hide the grub menu (get the pause as you said)
hiddenmenu >>>>>>>>>>>>>>>>>>>>>> will hide the grub menu

Hope it's clear

red
__________________
IBM ThinkPad z60m

Last edited by hermouche; 21st April 2008 at 08:25 AM.
Closed Thread

Tags
edit, grubconf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Edit grub.conf for configuring Ubuntu 9.04 shahdharmit Using Fedora 18 17th September 2009 04:22 PM
Need to edit grub.conf shahdharmit Using Fedora 9 15th August 2009 09:26 AM
possible to edit /boot/grub/grub.conf from live cd? mailman1175 Using Fedora 4 29th December 2008 01:28 AM
How the hell do I edit grub.conf? RicksonCrazy Using Fedora 10 23rd April 2008 06:55 AM
GRUB won't see WinXPx64 and don't let me edit grub.conf A.N.K. Installation, Upgrades and Live Media 1 29th March 2006 08:23 AM


Current GMT-time: 03:32 (Wednesday, 23-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat