[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GRUB2 Doesn't find grub.cfg
From: |
Goh Lip |
Subject: |
Re: GRUB2 Doesn't find grub.cfg |
Date: |
Fri, 23 Jul 2010 14:22:11 -0400 |
> ----- Original Message -----
> From: Vince Radice
> Sent: 07/23/10 10:47 PM
> To: Goh Lip
> Subject: Re: GRUB2 Doesn't find grub.cfg
>
> On 07/23/2010 12:34 AM, Goh Lip wrote:
> >> ----- Original Message -----
> >> From: Vince Radice
> >> Sent: 07/23/10 11:39 AM
> >> To: Goh Lip
> >> Subject: Re: GRUB2 Doesn't find grub.cfg
> >>
> >> Answers are interspersed with questions
> >>
> >> On 07/22/2010 06:59 PM, Goh Lip wrote:
> >>
> >>>> ----- Original Message -----
> >>>> From: Vince Radice
> >>>> Sent: 07/21/10 04:41 AM
> >>>> To: address@hidden
> >>>> Subject: GRUB2 Doesn't find grub.cfg
> >>>>
> >>>> I would like to start using GRUB2. Seeing as I have several hd's in my
> >>>> pc and I can pick which one to boot from at start-up, I figured to put
> >>>> GRUB2 on a disk, boot from it until I get it working and then change the
> >>>> BIOS default. 3 hard drives - 2 IDE and 1 SATA. IDE1 has WinXp, IDE2
> >>>> is data, SATA1 has 2 partitions - 10 gb data, 110 gb Fedora 12. IDE1
> >>>> has GRUB Legacy loaded (this is current boot drive). I use this to boot
> >>>> Fedora or XP. I have installed GRUB2 on SATA1 and configured the
> >>>> grub.cfg file. The config file is /boot/grub/grub.cfg. If I boot su
> >>>> using SATA1, I get the GRUB command line interface. How do I tell GRUB2
> >>>> to get the correct configuration file automatically? Manually?
> >>>>
> >>>>
> >>> How did you install grub2 to sata1?
> >>>
> >>>
> >> SATA1 is /dev/sda. I used grub2-install /dev/sda.
> >>
> >>
> >>> What is master drive? eg, ide1?
> >>>
> >>>
> >> Currently ide1 is jumpered as master. Ide2 is slave
> >>
> >>> (are you sure jumpers on other drives are set to slave?)
> >>>
> >>>
> >> Yes
> >>
> >>> Print out fdisk, blkid and fstab.
> >>>
> >>>
> >> address@hidden vince]# fdisk -l
> >>
> >> Disk /dev/sda: 120.0 GB, 120034123776 bytes
> >> 255 heads, 63 sectors/track, 14593 cylinders
> >> Units = cylinders of 16065 * 512 = 8225280 bytes
> >> Disk identifier: 0x000bbe00
> >>
> >> Device Boot Start End Blocks Id System
> >> /dev/sda1 1 2550 20482843+ 7 HPFS/NTFS
> >> /dev/sda2 * 2551 2576 204800 83 Linux
> >> /dev/sda3 2576 14593 96530597+ 8e Linux LVM
> >>
> >> Disk /dev/sdb: 80.0 GB, 80026361856 bytes
> >> 255 heads, 63 sectors/track, 9729 cylinders
> >> Units = cylinders of 16065 * 512 = 8225280 bytes
> >> Disk identifier: 0x0fe60fe6
> >>
> >> Device Boot Start End Blocks Id System
> >> /dev/sdb1 * 1 4845 38917431 c W95 FAT32 (LBA)
> >> /dev/sdb2 4846 9729 39230730 f W95 Ext'd (LBA)
> >> /dev/sdb5 4846 9729 39230698+ b W95 FAT32
> >>
> >> Disk /dev/sdc: 203.9 GB, 203928109056 bytes
> >> 255 heads, 63 sectors/track, 24792 cylinders
> >> Units = cylinders of 16065 * 512 = 8225280 bytes
> >> Disk identifier: 0x106f3d0c
> >>
> >> Device Boot Start End Blocks Id System
> >> /dev/sdc1 * 1 24791 199133676 7 HPFS/NTFS
> >>
> >> Disk /dev/sdd: 750.2 GB, 750156374016 bytes
> >> 255 heads, 63 sectors/track, 91201 cylinders
> >> Units = cylinders of 16065 * 512 = 8225280 bytes
> >> Disk identifier: 0xa774e9de
> >>
> >> Device Boot Start End Blocks Id System
> >> /dev/sdd1 1 14278 114688003+ 6 FAT16
> >> /dev/sdd2 14279 27460 105884415 7 HPFS/NTFS
> >> /dev/sdd3 27461 91201 511999582+ f W95 Ext'd (LBA)
> >>
> >> Disk /dev/dm-0: 92.6 GB, 92618620928 bytes
> >> 255 heads, 63 sectors/track, 11260 cylinders
> >> Units = cylinders of 16065 * 512 = 8225280 bytes
> >> Disk identifier: 0x00000000
> >>
> >> Disk /dev/dm-0 doesn't contain a valid partition table
> >>
> >> Disk /dev/dm-1: 6224 MB, 6224347136 bytes
> >> 255 heads, 63 sectors/track, 756 cylinders
> >> Units = cylinders of 16065 * 512 = 8225280 bytes
> >> Disk identifier: 0x00000000
> >>
> >> Disk /dev/dm-1 doesn't contain a valid partition table
> >>
> >> address@hidden grub]# blkid
> >> /dev/sda1: LABEL="SATA1" UUID="38B03D64B03D29B0" TYPE="ntfs"
> >> /dev/mapper/VolGroup-lv_root:
> >> UUID="5768315e-e669-474a-8159-4c988661786e" TYPE="ext4"
> >> /dev/mapper/VolGroup-lv_swap: TYPE="swap"
> >> UUID="8fff9192-4425-4736-bf9c-119513c57f92"
> >> /dev/sdb1: LABEL="PART1_C" UUID="3A60-1DF2" TYPE="vfat"
> >> /dev/sdc1: UUID="3C3C9F043C9EB87A" LABEL="DISK2_VOL1_G" TYPE="ntfs"
> >> /dev/sda2: UUID="7c5ada22-9e36-482a-ad56-2587f3d27446" TYPE="ext3"
> >> /dev/sda3: UUID="iBEzPD-gCR9-2KKb-jC3e-NGqT-3MCr-MGrB8p" TYPE="LVM2_member"
> >> /dev/sdb5: LABEL="PART2_D" UUID="10DA-0F4E" TYPE="vfat"
> >> /dev/sdd2: LABEL="SATA2_Part2" UUID="7E44C07644C032A7" TYPE="ntfs"
> >>
> >> address@hidden etc]# cat fstab
> >>
> >> #
> >> # /etc/fstab
> >> # Created by anaconda on Mon Aug 17 15:12:43 2009
> >> #
> >> # Accessible filesystems, by reference, are maintained under '/dev/disk'
> >> # See man pages fstab(5), findfs(8), mount(8) and/or vol_id(8) for more
> >> info
> >> #
> >> UUID=7c5ada22-9e36-482a-ad56-2587f3d27446 /boot
> >> ext3 defaults 1 2
> >> /dev/mapper/VolGroup-lv_root / ext4
> >> defaults 1 1
> >> /dev/mapper/VolGroup-lv_swap swap swap
> >> defaults 0 0
> >> tmpfs /dev/shm tmpfs defaults 0 0
> >> devpts /dev/pts devpts defaults 0 0
> >> sysfs /sys sysfs defaults 0 0
> >> proc /proc proc defaults 0 0
> >> LABEL=PART1_C /DriveC msdos auto,umask=0000
> >> LABEL=PART2_D /DriveD msdos auto,umask=0000
> >> LABEL=DISK2_VOL1_G /DriveG ntfs-3g auto,umask=0000
> >> LABEL=SATA1 /SATA1 ntfs-3g auto,umask=0000
> >> LABEL=SATA2_Part2 /O ntfs-3g auto,umask=0000
> >> # /dev/sr0 /media/cd0 iso9660
> >> rw,noauto,users,uid=500 0 0
> >> # /dev/sr1 /media/cd1 iso9660
> >> rw,noauto,users,uid=500 0 0
> >> # /dev/sr0 /media/cdrom0 auto rw,auto,umask=0000,users,unhide 0 0
> >> # /dev/sr1 /media/cdrom1 auto ro,auto,umask=0000,users,unhide 0 0
> >>
> >>
> >>
> >>
> >>> (I assume grub.cfg is empty when installed, otherwise print out installed
> >>> file)
> >>>
> >>>
> >> I ran grub2-mkconfig. Here is the grub.cfg file.
> >> address@hidden grub]# cat grub.cfg
> >> #
> >> # DO NOT EDIT THIS FILE
> >> #
> >> # It is automatically generated by /usr/sbin/grub2-mkconfig using templates
> >> # from /etc/grub.d and settings from /etc/default/grub
> >> #
> >>
> >> ### BEGIN /etc/grub.d/00_header ###
> >> if [ -s $prefix/grubenv ]; then
> >> load_env
> >> fi
> >> set default="0"
> >> if [ ${prev_saved_entry} ]; then
> >> set saved_entry=${prev_saved_entry}
> >> save_env saved_entry
> >> set prev_saved_entry=
> >> save_env prev_saved_entry
> >> set boot_once=true
> >> fi
> >>
> >> function savedefault {
> >> if [ -z ${boot_once} ]; then
> >> saved_entry=${chosen}
> >> save_env saved_entry
> >> fi
> >> }
> >> set timeout=5
> >> ### END /etc/grub.d/00_header ###
> >>
> >> ### BEGIN /etc/grub.d/10_linux ###
> >> menuentry "GNU/Linux, with Linux 2.6.32.16-141.fc12.x86_64" --class
> >> gnu-linux --class gnu --class os {
> >> set gfxpayload=keep
> >> insmod ext2
> >> set root='(hd0,2)'
> >> search --no-floppy --fs-uuid --set 7c5ada22-9e36-482a-ad56-2587f3d27446
> >> echo Loading Linux 2.6.32.16-141.fc12.x86_64 ...
> >> linux /vmlinuz-2.6.32.16-141.fc12.x86_64
> >> root=UUID=5768315e-e669-474a-8159-4c988661786e ro quiet rhgb
> >> echo Loading initial ramdisk ...
> >> initrd /initramfs-2.6.32.16-141.fc12.x86_64.img
> >> }
> >> menuentry "GNU/Linux, with Linux 2.6.32.16-141.fc12.x86_64 (recovery
> >> mode)" --class gnu-linux --class gnu --class os {
> >> set gfxpayload=keep
> >> insmod ext2
> >> set root='(hd2,2)'
> >> search --no-floppy --fs-uuid --set 7c5ada22-9e36-482a-ad56-2587f3d27446
> >> echo Loading Linux 2.6.32.16-141.fc12.x86_64 ...
> >> linux /vmlinuz-2.6.32.16-141.fc12.x86_64
> >> root=UUID=5768315e-e669-474a-8159-4c988661786e ro single quiet rhgb
> >> echo Loading initial ramdisk ...
> >> initrd /initramfs-2.6.32.16-141.fc12.x86_64.img
> >> }
> >> menuentry "GNU/Linux, with Linux 2.6.32.14-127.fc12.x86_64" --class
> >> gnu-linux --class gnu --class os {
> >> set gfxpayload=keep
> >> insmod ext2
> >> set root='(hd2,2)'
> >> search --no-floppy --fs-uuid --set 7c5ada22-9e36-482a-ad56-2587f3d27446
> >> echo Loading Linux 2.6.32.14-127.fc12.x86_64 ...
> >> linux /vmlinuz-2.6.32.14-127.fc12.x86_64
> >> root=UUID=5768315e-e669-474a-8159-4c988661786e ro quiet rhgb
> >> echo Loading initial ramdisk ...
> >> initrd /initramfs-2.6.32.14-127.fc12.x86_64.img
> >> }
> >> menuentry "GNU/Linux, with Linux 2.6.32.14-127.fc12.x86_64 (recovery
> >> mode)" --class gnu-linux --class gnu --class os {
> >> set gfxpayload=keep
> >> insmod ext2
> >> set root='(hd2,2)'
> >> search --no-floppy --fs-uuid --set 7c5ada22-9e36-482a-ad56-2587f3d27446
> >> echo Loading Linux 2.6.32.14-127.fc12.x86_64 ...
> >> linux /vmlinuz-2.6.32.14-127.fc12.x86_64
> >> root=UUID=5768315e-e669-474a-8159-4c988661786e ro single quiet rhgb
> >> echo Loading initial ramdisk ...
> >> initrd /initramfs-2.6.32.14-127.fc12.x86_64.img
> >> }
> >> menuentry "GNU/Linux, with Linux 2.6.32.11-99.fc12.x86_64" --class
> >> gnu-linux --class gnu --class os {
> >> set gfxpayload=keep
> >> insmod ext2
> >> set root='(hd2,2)'
> >> search --no-floppy --fs-uuid --set 7c5ada22-9e36-482a-ad56-2587f3d27446
> >> echo Loading Linux 2.6.32.11-99.fc12.x86_64 ...
> >> linux /vmlinuz-2.6.32.11-99.fc12.x86_64
> >> root=UUID=5768315e-e669-474a-8159-4c988661786e ro quiet rhgb
> >> echo Loading initial ramdisk ...
> >> initrd /initramfs-2.6.32.11-99.fc12.x86_64.img
> >> }
> >> menuentry "GNU/Linux, with Linux 2.6.32.11-99.fc12.x86_64 (recovery
> >> mode)" --class gnu-linux --class gnu --class os {
> >> set gfxpayload=keep
> >> insmod ext2
> >> set root='(hd2,2)'
> >> search --no-floppy --fs-uuid --set 7c5ada22-9e36-482a-ad56-2587f3d27446
> >> echo Loading Linux 2.6.32.11-99.fc12.x86_64 ...
> >> linux /vmlinuz-2.6.32.11-99.fc12.x86_64
> >> root=UUID=5768315e-e669-474a-8159-4c988661786e ro single quiet rhgb
> >> echo Loading initial ramdisk ...
> >> initrd /initramfs-2.6.32.11-99.fc12.x86_64.img
> >> }
> >> ### END /etc/grub.d/10_linux ###
> >>
> >> ### BEGIN /etc/grub.d/30_os-prober ###
> >> ### END /etc/grub.d/30_os-prober ###
> >>
> >> ### BEGIN /etc/grub.d/40_custom ###
> >> # This file provides an easy way to add custom menu entries. Simply
> >> type the
> >> # menu entries you want to add after this comment. Be careful not to change
> >> # the 'exec tail' line above.
> >> ### END /etc/grub.d/40_custom ###
> >>
> >> ### BEGIN /etc/grub.d/90_persistent ###
> >> ### END /etc/grub.d/90_persistent ###
> >>
> >>
> >>> I take it no LVM or raid installed, otherwise please declare.
> >>>
> >>> Regards - Goh Lip
> >>>
> >>>
> >>>
> >> I hope this helps. As I said in my original message, I can pick at boot
> >> time which drive to boot from. The BIOS has IDE1 as the defalut. After
> >> I installed GRUB2 on SATA1, I re-booted and picked SATA1 as the boot
> >> device. I got the message that GRUB2 v1.98 was loaded. I could not get
> >> the menu to load. I was able to use the CLI to boot windows. I did not
> >> try to boot Fedora though.
> >>
> > First, Vince, I have no experience with LVM, but you can try this:
> > Modify the (first) entry at boot
> > from:
> > linux /vmlinuz-2.6.32.16-141.fc12.x86_64
> > root=UUID=5768315e-e669-474a-8159-4c988661786e ro quiet rhgb
> > to:
> > linux /vmlinuz-2.6.32.16-141.fc12.x86_64 root=/dev/mapper/VolGroup-lv_root
> > ro quiet rhgb
> > All other lines remain unchanged.
> >
> > But I am puzzled by your statement "I did not try to boot Fedora though."
> > What else other than Windows are you booting? And by your statement "I was
> > able to use the CLI to boot windows." Can you also provide your cli command
> > to boot Windows? From where? Grub? I assume you set your Bios to boot IDE1
> > to do that; but you need no CLI command nor would a grub menu appear,
> > right? Also, by setting and resetting Bios to boot, please remember you
> > have to be in the same configuration at grub installation for grub to pick
> > up your entries, and frankly, I am not sure how LVM plays into all this.
> >
> > By this message, I am requesting others to help if Vince still cannot boot
> > (that's why I did not snip message); I do not use LVM and the booting
> > command is different for it. Thanks.
> >
> > Good luck, Vince.
> > Regards - Goh Lip
> >
> >
> I figured it out. I made the change that you requested and re-booted to
> try GRUB2. I still got no menu. I was issueing the some commands to
> see what I could find out. When I issued the SET command, the answer
> was right there. The variable prefix had the value (hd0,2)/grub2. I
> rebooted back to Fedora and looked. There was a directory /boot/grub2.
> The documentation for Fedora use is sparse and never mentioned this
> directory. I presumed that all of the grub2 stuff was in /boot/grub. I
> copied the grub.cfg file from /boot/grub to /boot/grub2 and then
> rebooted. The menu appeared and I was able to boot Fedora from there.
> I don't know where the documentation should be changed to say that under
> Fedora 12, the grub.cfg file needs to be in the /boot/grub2 directory.
>
> Thank you for your efforts.
> Vince Radice
>
> p.s. Will this be posted in the GRUB mail archives so the answer can be
> found?
First, good to hear you got this sorted out.
Second, apologies for mistakenly replied only to you and not to the list, I was
away and had been using the browser mail and did not noticed it did not copy
the list. To amend, this message is the complete list.
Take care and regards - Goh Lip