How to edit your GRUB.conf
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20
  1. #1
    gonzalo76 Guest

    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
    Last edited by gonzalo76; 2nd April 2004 at 05:26 AM.

  2. #2
    sachin_malik Guest
    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. #3
    mghiba Guest
    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. #4
    Knudson Guest
    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
    Last edited by Knudson; 30th April 2005 at 04:10 PM.

  5. #5
    mghiba Guest
    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. #6
    jaymes Guest
    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. #7
    Join Date
    Sep 2006
    Location
    Dominican Republic
    Age
    45
    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. #8
    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. #9
    Join Date
    Sep 2006
    Location
    Connellsville, PA, USA
    Posts
    11,308
    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. #10
    Join Date
    Feb 2008
    Posts
    5
    I must admit, but I cannot find the the Bootloader Configuration,

  11. #11
    JN4OldSchool is offline "Sean The Terrible" -- The forum(er) Vista® rep
    Join Date
    Nov 2005
    Posts
    8,819
    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. #12
    awei Guest
    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. #13
    Join Date
    Apr 2006
    Location
    Algeria
    Posts
    828
    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. #14
    ALCT Guest
    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. #15
    Join Date
    Apr 2006
    Location
    Algeria
    Posts
    828
    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
    Last edited by hermouche; 21st April 2008 at 08:25 AM.
    IBM ThinkPad z60m

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Edit grub.conf for configuring Ubuntu 9.04
    By shahdharmit in forum Using Fedora
    Replies: 18
    Last Post: 17th September 2009, 04:22 PM
  2. Need to edit grub.conf
    By shahdharmit in forum Using Fedora
    Replies: 9
    Last Post: 15th August 2009, 09:26 AM
  3. possible to edit /boot/grub/grub.conf from live cd?
    By mailman1175 in forum Using Fedora
    Replies: 4
    Last Post: 29th December 2008, 02:28 AM
  4. How the hell do I edit grub.conf?
    By RicksonCrazy in forum Using Fedora
    Replies: 10
    Last Post: 23rd April 2008, 06:55 AM
  5. GRUB won't see WinXPx64 and don't let me edit grub.conf
    By A.N.K. in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 29th March 2006, 09:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •