Fedora Linux Support Community & Resources Center
  #1  
Old 18th May 2012, 11:20 PM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
F16 64 - how to reinstall grub2

I installed F16 64 from a Nov'11 DVD a few days ago, was trying to find files from F16, and then grub disappeared.
I followed the instructions to replace bash, as it was missing, but the same grub error still keeps showing.

Code:
grub loading
welcome to grub!
error:  file not found
entering rescue mode
grub rescue >
This thread shows how to reinstall grub1.
This thread shows how to reinstall grub2 into a F16 from Ubuntu (instead of from the F16 liveCD).
I ran the 6 steps from the F16 livecd terminal and they didn't work, as rebooting still ends up with the grub > prompt.

Quote:
1) boot into the live CD

2) mount the partition containing Fedora 16 (/dev/sda2)
sudo mount -t ext4 -o rw /dev/sda2 /media

3) mount the /dev, /sys, proc, and devpts paths in /media
sudo mount -t proc none /media/proc
sudo mount -o bind /dev /media/dev
sudo mount -o bind /sys /media/sys
sudo mount -t devpts devpts /media/dev/pts


4) chroot into the Fedora partition
sudo chroot /media
now any command you execute is run in the root shell /dev/sda2.

5) install GRUB2 in the boot partition of Fedora
# grub2-install --force /dev/sda2
you have to use the --force flag to force the grub2 in the boot partition or else it gives an error.

6) come out of the chrooted shell and un-mount the /media directory.
# exit
back in ubuntu environment, un-mount the mounted directories
sudo umount /media/proc
sudo umount /media/dev/pts
sudo umount /media/sys
sudo umount /media/dev
sudo umount /media


grub2 has been installed in the boot partition of Fedora 16.

This procedure can also be used to fix MBR, the difference being to use a liveCD instead of booting into a linux distribution.
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 20th May 2012 at 06:52 PM.
Reply With Quote
  #2  
Old 19th May 2012, 03:41 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

boot using the livecd, then download and run bootinfoscript (as root), copy and paste the RESULTS.txt file that it leaves behind. We can then see what's up.
Reply With Quote
  #3  
Old 19th May 2012, 03:59 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

Vern, thanks much for your response.

Code:
# sudo bash /home/liveuser/Downloads/bootinfoscript
Finished. The results are in the file "RESULTS.txt"
located in "/home/liveuser/Downloads/"
#
Quote:
Originally Posted by nonamedotc View Post
Probably the simplest way is as follows
  1. Boot the install DVD and proceed as you would do a normal installation.
  2. When the screen comes asking "Fresh Installation" vs "Upgrade", choose UPGRADE.
  3. Anaconda will directly skip to the bootloader installation step.
  4. Once there, you can choose which device (MBR of HDD or first sector of a partition) you want and install grub2

This will work in a dual boot environment also. Just ensure that you are NOT partitioning your system by choosing the upgrade option. I used this procedure very recently. Unfortunately, I do not know if live CD is capable of doing this ..
Thanks for your response. I didn't find that option but will look again.
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 20th May 2012 at 06:50 PM.
Reply With Quote
  #4  
Old 19th May 2012, 04:14 AM
nonamedotc Offline
Community Manager
 
Join Date: Mar 2011
Location: USA
Posts: 3,983
linuxfirefox
Re: F16 64 - how to reinstall grub2

Probably the simplest way is as follows
  1. Boot the install DVD and proceed as you would do a normal installation.
  2. When the screen comes asking "Fresh Installation" vs "Upgrade", choose UPGRADE.
  3. Anaconda will directly skip to the bootloader installation step.
  4. Once there, you can choose which device (MBR of HDD or first sector of a partition) you want and install grub2

This will work in a dual boot environment also. Just ensure that you are NOT partitioning your system by choosing the upgrade option. I used this procedure very recently. Unfortunately, I do not know if live CD is capable of doing this ..
Reply With Quote
  #5  
Old 19th May 2012, 04:49 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

Code:
                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos2)/boot/grub2 on this drive.

sda1: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Fedora release 16 (Verne) 
                       Kernel on an ()
    Boot files:        /etc/fstab

sda3: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub Legacy
    Boot sector info:  Grub Legacy (v0.97) is installed in the boot sector 
                       of sda3 and looks at sector 113293989 on boot drive #1 
                       for the stage2 file.  A stage2 file is at this 
                       location on /dev/sda.  Stage2 looks on partition #3 
                       for /boot/grub/grub.conf.
    Operating System:  Fedora release 15 (Lovelock) 
                       Kernel on an ()
    Boot files:        /boot/grub/menu.lst /boot/grub/grub.conf /etc/fstab

sda4: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sda5 
                       and looks at sector 246842699 of the same hard drive 
                       for core.img. core.img is at this location and looks 
                       for (,msdos5)/grub2 on this drive.
    Operating System:  
    Boot files:        /grub2/grub.cfg /grub2/core.img

sda6: __________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda7: __________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda8: __________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda9: __________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                  63     8,193,149     8,193,087  82 Linux swap / Solaris
/dev/sda2    *      8,193,150   110,607,524   102,414,375  83 Linux
/dev/sda3         110,607,525   213,021,899   102,414,375  83 Linux
/dev/sda4         213,021,900   488,392,064   275,370,165   5 Extended
/dev/sda5         213,021,963   268,333,694    55,311,732  83 Linux
/dev/sda6         268,333,758   323,645,489    55,311,732  83 Linux
/dev/sda7         323,645,553   378,957,284    55,311,732  83 Linux
/dev/sda8         378,957,348   434,269,079    55,311,732  83 Linux
/dev/sda9         434,269,143   488,392,064    54,122,922  83 Linux


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/loop1                                              DM_snapshot_cow 
/dev/loop2                                              squashfs   
/dev/loop3       6f252c42-e8a5-4384-aab2-f741d5ae998a   ext4       _Fedora-16-x86_6
/dev/mapper/live-osimg-min 6f252c42-e8a5-4384-aab2-f741d5ae998a   ext4       _Fedora-16-x86_6
/dev/mapper/live-rw 6f252c42-e8a5-4384-aab2-f741d5ae998a   ext4       _Fedora-16-x86_6
/dev/sda1        c62e13e5-f0f8-4900-91d9-c511c0d483ac   swap       
/dev/sda2        4f0f3a4a-84f4-49e8-ad1d-24a7fb05123c   ext4       _Fedora-16-x86_6
/dev/sda3        0ce99614-563b-437f-a6bf-06e8dcce7ea3   ext4       _Fedora-14-i686-
/dev/sda5        aa4e0d5d-b537-4563-a35d-de0723ee1f8b   ext4       
/dev/sda6        53da4d5c-c8a6-4b3b-a120-7ecaebcbeefe   ext2       os #4
/dev/sda7        04652e6b-32ce-4d1b-8a67-240a59340428   ext2       os #5
/dev/sda8        b76cad3d-b1b4-46ce-8e0f-582972b6f762   ext2       home
/dev/sda9        87f5097e-3a8c-4590-b692-74cbdb765406   ext2       files

========================= "ls -R /dev/mapper/" output: =========================

/dev/mapper:
control
live-osimg-min
live-rw

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/loop0       /media/disk              squashfs   (ro,nosuid,nodev,relatime,uhelper=udisks)
/dev/mapper/live-osimg-min /media/_Fedora-16-x86_6  ext4       (ro,nosuid,nodev,relatime,seclabel,user_xattr,barrier=1,data=ordered,uhelper=udisks)
/dev/mapper/live-rw /                        ext4       (rw,noatime,seclabel,user_xattr,barrier=1,data=ordered)
/dev/sda2        /media/_Fedora-16-x86_6_ ext4       (rw,nosuid,nodev,relatime,seclabel,user_xattr,barrier=1,data=ordered,uhelper=udisks)
/dev/sda3        /media/_Fedora-14-i686-  ext4       (rw,nosuid,nodev,relatime,seclabel,user_xattr,barrier=1,data=ordered,uhelper=udisks)
/dev/sda5        /media/aa4e0d5d-b537-4563-a35d-de0723ee1f8b ext4       (rw,nosuid,nodev,relatime,seclabel,user_xattr,acl,barrier=1,data=ordered,uhelper=udisks)
/dev/sda6        /media/os #4             ext2       (rw,nosuid,nodev,relatime,seclabel,user_xattr,acl,barrier=1,uhelper=udisks)
/dev/sda8        /media/home              ext2       (rw,nosuid,nodev,relatime,seclabel,user_xattr,acl,barrier=1,uhelper=udisks)
/dev/sda9        /media/files             ext2       (rw,nosuid,nodev,relatime,seclabel,user_xattr,acl,barrier=1,uhelper=udisks)
/dev/sr0         /mnt/live                iso9660    (ro,relatime)
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 20th May 2012 at 04:53 AM.
Reply With Quote
  #6  
Old 19th May 2012, 04:51 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

Code:
=============================== sda2/etc/fstab: ================================

--------------------------------------------------------------------------------

#
# /etc/fstab
# Created by anaconda on Wed May 16 04:12:38 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=4f0f3a4a-84f4-49e8-ad1d-24a7fb05123c /                       ext4    defaults        1 1
UUID=aa4e0d5d-b537-4563-a35d-de0723ee1f8b /boot                   ext4    defaults        1 2
UUID=c62e13e5-f0f8-4900-91d9-c511c0d483ac swap                    swap    defaults        0 0
--------------------------------------------------------------------------------

========================== sda3/boot/grub/grub.conf: ===========================

--------------------------------------------------------------------------------
# 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,2)
#          kernel /boot/vmlinuz-version ro root=/dev/sda3
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda3
default=0
timeout=0
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.43.2-6.fc15.i686)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.43.2-6.fc15.i686 ro root=UUID=0ce99614-563b-437f-a6bf-06e8dcce7ea3 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet nouveau.modeset=0 rdblacklist=nouveau
	initrd /boot/initramfs-2.6.43.2-6.fc15.i686.img
title Fedora (2.6.38.8-32.fc15.i686)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.38.8-32.fc15.i686 ro root=UUID=0ce99614-563b-437f-a6bf-06e8dcce7ea3 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
	initrd /boot/initramfs-2.6.38.8-32.fc15.i686.img
title Fedora (2.6.35.6-45.fc14.i686)
	root (hd0,2)
	kernel /boot/vmlinuz-2.6.35.6-45.fc14.i686 ro root=UUID=0ce99614-563b-437f-a6bf-06e8dcce7ea3 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
	initrd /boot/initramfs-2.6.35.6-45.fc14.i686.img
--------------------------------------------------------------------------------

=============================== sda3/etc/fstab: ================================

--------------------------------------------------------------------------------

#
# /etc/fstab
# Created by anaconda on Sat Apr 16 12:19:37 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=0ce99614-563b-437f-a6bf-06e8dcce7ea3 /                       ext4    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
--------------------------------------------------------------------------------

=================== sda3: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  53.018373966 = 56.928045568   boot/grub/grub.conf                            1
  53.018373966 = 56.928045568   boot/grub/menu.lst                             1
  54.022898197 = 58.006645248   boot/grub/stage2                               1
  54.444902897 = 58.459769344   boot/initramfs-2.6.35.6-45.fc14.i686.img       2
  57.780840397 = 62.041704960   boot/initramfs-2.6.38.8-32.fc15.i686.img       2
  62.257162571 = 66.848119296   boot/initramfs-2.6.43.2-6.fc15.i686.img        2
  57.305639744 = 61.531462144   boot/initrd-plymouth.img                       1
  53.923063755 = 57.899448832   boot/vmlinuz-2.6.35.6-45.fc14.i686             1
  56.822195530 = 61.012367872   boot/vmlinuz-2.6.38.8-32.fc15.i686             1
  58.839914799 = 63.178877440   boot/vmlinuz-2.6.43.2-6.fc15.i686              1

============================= sda5/grub2/grub.cfg: =============================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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="${saved_entry}"
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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.1.0-7.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root aa4e0d5d-b537-4563-a35d-de0723ee1f8b
	echo	'Loading Linux 3.1.0-7.fc16.x86_64 ...'
	linux	/vmlinuz-3.1.0-7.fc16.x86_64 root=UUID=4f0f3a4a-84f4-49e8-ad1d-24a7fb05123c ro rd.md=0 rd.lvm=0 rd.dm=0  KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=en_US.UTF-8 
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-3.1.0-7.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.0-7.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root aa4e0d5d-b537-4563-a35d-de0723ee1f8b
	echo	'Loading Linux 3.1.0-7.fc16.x86_64 ...'
	linux	/vmlinuz-3.1.0-7.fc16.x86_64 root=UUID=4f0f3a4a-84f4-49e8-ad1d-24a7fb05123c ro single rd.md=0 rd.lvm=0 rd.dm=0  KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=en_US.UTF-8
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-3.1.0-7.fc16.x86_64.img
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### 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/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
--------------------------------------------------------------------------------

=================== sda5: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

 117.703801632 = 126.383494656  grub2/core.img                                 1
 117.701798916 = 126.381344256  grub2/grub.cfg                                 1
 101.732900143 = 109.234869760  initramfs-3.1.0-7.fc16.x86_64.img              1
 101.712281704 = 109.212730880  vmlinuz-3.1.0-7.fc16.x86_64                    1

=============================== StdErr Messages: ===============================

xz: (stdin): Compressed data is corrupt
xz: (stdin): Unexpected end of input
  No volume groups found
mdadm: No arrays found in config file or automatically
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 20th May 2012 at 06:49 PM.
Reply With Quote
  #7  
Old 20th May 2012, 03:30 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

Your trying to install grub into sda4, and yet F16 is on sda2. Also there is no grub2 listed for sda2.

Code:
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos2)/boot/grub2 on this drive.

...
sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Fedora release 16 (Verne) 
                       Kernel on an ()
    Boot files:        /etc/fstab
This is in error. You stated it correctly, then tried to install on sda4:
Quote:
2) mount the partition containing Fedora 16 (/dev/sda2)
sudo mount -t ext4 -o rw /dev/sda4 /media

Last edited by VernDog; 20th May 2012 at 03:32 AM.
Reply With Quote
  #8  
Old 20th May 2012, 03:47 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by VernDog View Post
This is in error. You stated it correctly, then tried to install on sda4:
Vern, thanks for getting back on this. The sda4 was a typo on my part and is meant to be sba2.

Can those 6 steps work from the F16 live DVD terminal to put grub2 back in sda2?

Update: I tried the 6 steps and they didn't work. Rebooting still ends up with the grub > prompt.
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 20th May 2012 at 06:48 PM.
Reply With Quote
  #9  
Old 20th May 2012, 04:00 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

It would work, but bootinfo script doesn't see referance to sda2 grub.cfg file in sda2.

I've never used the "force" command. I use to mount all those devices, but found two simple commands that have never failed.
For your case it would be:

Code:
sudo mount -t ext4 /dev/sda2 /mnt
sudo grub2-install --recheck --root-directory=/mnt /dev/sda
Reply With Quote
  #10  
Old 20th May 2012, 04:05 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

Code:
# sudo mount -t ext4 /dev/sda2 /mnt
[root@localhost ~]# sudo grub2-install --recheck --root-directory=/mnt /dev/sda
Installation finished. No error reported.
#
Rebooting to the hard drive still ends up with the grub > prompt and doesn't boot to the hard drive.

Code:
                  Boot Info Script 0.61      [1 April 2012]

============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos2)/boot/grub2 on this drive.

sda1: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Fedora release 16 (Verne) 
                       Kernel on an ()
    Boot files:        /etc/fstab /boot/grub2/core.img

sda3: __________________________________________________________________________
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 21st May 2012 at 03:13 AM.
Reply With Quote
  #11  
Old 20th May 2012, 04:26 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

Make sure you use F16 livecd and not Ubuntu. Ubuntu doesn't have grub2-install command.
Reply With Quote
  #12  
Old 20th May 2012, 04:37 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by VernDog View Post
Make sure you use F16 livecd and not Ubuntu. Ubuntu doesn't have grub2-install command.
Trying to boot to the harddrive after using the F16 livecd terminal took me to a grub prompt and no other choices.
grub >

The livecd works fine. I'm trying to get sda2 on the hardrive to boot.
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 20th May 2012 at 11:36 PM.
Reply With Quote
  #13  
Old 20th May 2012, 04:52 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by johnlvs2run View Post
The F16 livecd took me to a grub prompt and no other choices.
grub >


In the live DVD > "create custom layout" > there is no / or /boot shown for any partition. Shouldn't those be showing?
I'm not sure what a live DVD presents. I only use a livecd. The last time I use a live DVD, it booted up with debian text menus.
Reply With Quote
  #14  
Old 20th May 2012, 04:57 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by VernDog View Post
I'm not sure what a live DVD presents. I only use a livecd. The last time I use a live DVD, it booted up with debian text menus.
I think it's the same as a livecd, except on a dvd and has more applications.

Anymore ideas are much appreciated.

Code:
# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f0dd1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     8193149     4096543+  82  Linux swap / Solaris
/dev/sda2   *     8193150   110607524    51207187+  83  Linux
/dev/sda3       110607525   213021899    51207187+  83  Linux
/dev/sda4       213021900   488392064   137685082+   5  Extended
/dev/sda5       213021963   268333694    27655866   83  Linux
/dev/sda6       268333758   323645489    27655866   83  Linux
/dev/sda7       323645553   378957284    27655866   83  Linux
/dev/sda8       378957348   434269079    27655866   83  Linux
/dev/sda9       434269143   488392064    27061461   83  Linux

# grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub.cfg ...
cat: /boot/grub2/video.lst: No such file or directory
Found linux image: /boot/vmlinuz-3.1.0-7.fc16.x86_64
/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/mapper/live-rw.  Check your device.map.
/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/mapper/live-rw.  Check your device.map.
  No volume groups found
Found Fedora release 15 (Lovelock) on /dev/sda3
done

# grub2-install --version 
grub2-install (GRUB) 1.99
#
__________________
biostar a870u3 / amd athlonII x2 regor250 3.0ghz am3 65w / gskill sniper 2x4gb ddr3 1333
evga 512-P3-1311-KR geforce 210 32bit ddr3 pci express hdcp video card / fedora 16 64 lxde
nvidia onboard / seagate barracuda 7200 250gb 3gbs hard drive / hannsg hw192 / earthwatts psu

Last edited by johnlvs2run; 20th May 2012 at 06:43 PM.
Reply With Quote
  #15  
Old 20th May 2012, 10:42 PM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

If you can't boot to a live desktop using the livecd, then that has nothing to do with your hard drive issue. You need to do a crc or sum check on the iso that you used.
Reply With Quote
Reply

Tags
grub2, how to reinstall grub2, reinstall grub2

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
cannot run kcm-grub2 gallicbear Using Fedora 8 26th March 2012 02:49 PM
[SOLVED] Grub2, dev modifications from satndard grub2 install jakebpg Using Fedora 16 9th March 2012 09:39 AM
F16 - GRUB2 EFI non-Mac Don3 Using Fedora 32 2nd March 2012 04:33 PM
Help with grub2 JamesNZ Using Fedora 1 9th November 2010 03:54 AM
Grub2 duke11235 Using Fedora 8 13th October 2009 03:14 PM


Current GMT-time: 20:58 (Thursday, 18-12-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
Creek Side - Stockholm-Arlanda Airport (ARN) Travel Photos on Instagram - Marina of Koper Travel Photos - Te Whiti Park Instagram Photos - Texas State Fair Photos on Instagram