Fedora Linux Support Community & Resources Center
  #16  
Old 20th May 2012, 10:32 PM
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
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.
The livecd boots fine to a desktop.

I am trying to boot to the harddrive, specifically sda2 on the harddrive.
__________________
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 12:17 AM.
Reply With Quote
  #17  
Old 21st May 2012, 12:42 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

From that livecd desktop. Did you open up a terminal and run the two commands I suggested?

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

Yes, in message #10.

I just now tried them again, rebooted to the hard drive and it went to the grub > prompt 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; 21st May 2012 at 02:21 AM.
Reply With Quote
  #19  
Old 21st May 2012, 03:01 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

You did something wrong on sda2 when you tried to install F16. i would reinstall to that specific partition. Notice your RESULTS.txt output for sda2. Now look at mine. I have three linux os's:

Code:
sda6: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Fedora release 17 (Beefy 
                       Miracle) Kernel on an ()
    Boot files:        /boot/grub2/grub.cfg /etc/fstab /boot/grub/core.img

sda7: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Linux Mint 12 Lisa
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda8: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu quantal (development 
                       branch)
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
Your boot files don't show up for sda2.
Reply With Quote
  #20  
Old 21st May 2012, 03:17 AM
johnlvs2run Offline
Registered User
 
Join Date: Jul 2008
Location: western u.s.
Posts: 147
linuxfirefox
Re: F16 64 - how to reinstall grub2

The F16 boot was working fine for a couple of weeks, until I was trying to find the F15 files from sda3 (different thread).
I didn't use the livecd partitioning at all in that time. Maybe it was something to do with fsck.

Is there any way to move the boot files from sda5 to sda2, or to add them from the livecd terminal?

If not, I'll reinstall F16.

Thanks much for your help!
__________________
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:21 AM.
Reply With Quote
  #21  
Old 21st May 2012, 03:48 AM
VernDog Offline
Registered User
 
Join Date: Aug 2009
Posts: 313
linuxchrome
Re: F16 64 - how to reinstall grub2

sda3 looks intact, but its using grub legacy. You could follow the instructions you listed from post#1, but substitute sda3 instead of sda2 .
Then F15 will be the boot partition used.

So you would have:

Code:
sudo mount -t ext4 -o rw /dev/sda3 /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
sudo chroot /media
grub-install --recheck --root-directory=/ /dev/sda

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

I prefer to boot to F16, as there were issues with the F14 preupgrade to F15.
If I understand correctly, grub2 can't be moved from sda5 to sda2; or installed from the livecd to sda2.
Therefore it sounds to me that grub2 cannot be reinstalled in any partition without reformatting the entire partition.

Thanks very much for your help!

F16 was booting fine for a couple of weeks, until just a few days ago.
I think the issue was caused by misuse of the fsck command on this thread.
Notably I used # sudo umount /dev/sda{3,7,8}, but # sudo umount /dev/sda would have been much better and safer to use.
__________________
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 04:53 PM.
Reply With Quote
  #23  
Old 21st May 2012, 05:40 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,765
linuxfirefox
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by johnlvs2run View Post
Notably I used # sudo umount /dev/sda{3,7,8}, but # sudo umount /dev/sda would have been much better and safer to use.
That won't do anything, as sda is not mounted as a file-system, only its partitions are.

At this stage, I'd recommend just going for a full F16 reinstall, being careful not to wipe your data/home partitions.

If/when the installer asks where to install the boot-loader (GRUB), choose the MBR (/dev/sda) rather than a specific partition. The installer should automatically find any other bootable partitions and add them to the GRUB menu.

If you use the advanced mode in the partitioning section, you can choose to mount your old data and home directories too – give them mount points like /mnt/old_home etc. (i.e. subdirectories of /mnt), and most importantly, make sure that "format partition" is not selected. That'll save you from messing around with /etc/fstab etc. after installation.
Reply With Quote
  #24  
Old 23rd May 2012, 06:07 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 Gareth Jones View Post
That won't do anything, as sda is not mounted as a file-system, only its partitions are.
What do you think the cause of losing grub in sda2 was then? It had to be something in that particular stream of code.

Quote:
At this stage, I'd recommend just going for a full F16 reinstall, being careful not to wipe your data/home partitions.
The installer should automatically find any other bootable partitions and add them to the GRUB menu.
Yes that is what happened.
I reinstalled F16 into sda5 yesterday morning, this time with the bootloader into MBR.
The computer booted fine into F16 sda5 after that, also it boots fine into F15 sda3 which was not previously booting.

Thanks much for the help!
__________________
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; 23rd May 2012 at 06:10 AM.
Reply With Quote
  #25  
Old 23rd May 2012, 06:22 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,765
linuxfirefox
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by johnlvs2run View Post
What do you think the cause of losing grub in sda2 was then? It had to be something in that particular stream of code.
I'm not sure, but it wasn't that. Unmounting a volume which isn't itself mounted doesn't do anything, even if contained "sub"-volumes/partitions are mounted.
Reply With Quote
  #26  
Old 23rd May 2012, 06:40 PM
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 Gareth Jones View Post
I'm not sure, but it wasn't that. Unmounting a volume which isn't itself mounted doesn't do anything, even if contained "sub"-volumes/partitions are mounted.
So the other partitions didn't need to be unmounted either then?

Nothing else was done in that post except running fsck, and then F16 wouldn't boot anymore.
__________________
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
Reply With Quote
  #27  
Old 23rd May 2012, 06:46 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,765
linuxfirefox
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by johnlvs2run View Post
So the other partitions didn't need to be unmounted either then?

Nothing else was done in that post except running fsck, and then F16 wouldn't boot anymore.
fsck will normally refuse to run on a volume that is currently mounted, as that can cause severe corruption if fsck and the kernel driver have different ideas of what's where. You only needed to unmount the volumes that were going to be fscked, but they did need to be unmounted.

EDIT: Also, based on the umount output, those partitions were already unmounted (the umount commands were just to make sure), so they didn't touch the partitions' contents. fsck could have removed the GRUB config file if the file-system was slightly broken and it thought that that was the best way to repair it (maybe have a look in that partition's lost+found directory, which is where fsck dumps files it recovers but cannot identify). Otherwise I see nothing in the commands I gave or that you ran that could delete the GRUB config file.

Last edited by Gareth Jones; 23rd May 2012 at 06:53 PM.
Reply With Quote
  #28  
Old 23rd May 2012, 08:28 PM
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 Gareth Jones View Post
fsck will normally refuse to run on a volume that is currently mounted, as that can cause severe corruption if fsck and the kernel driver have different ideas of what's where. You only needed to unmount the volumes that were going to be fscked, but they did need to be unmounted.

EDIT: Also, based on the umount output, those partitions were already unmounted (the umount commands were just to make sure), so they didn't touch the partitions' contents. fsck could have removed the GRUB config file if the file-system was slightly broken and it thought that that was the best way to repair it (maybe have a look in that partition's lost+found directory, which is where fsck dumps files it recovers but cannot identify). Otherwise I see nothing in the commands I gave or that you ran that could delete the GRUB config file.
Gareth, thanks again. Your ideas are much appreciated.
My concern is just that I did something with the commands that caused F16 to not reboot anymore.

How will I look in sda2's lost+found directory?
So far I've not found how to get into other partitions (sda2 or sda3) from F16 sda5.
__________________
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
Reply With Quote
  #29  
Old 23rd May 2012, 10:20 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,765
linuxfirefox
Re: F16 64 - how to reinstall grub2

Quote:
Originally Posted by johnlvs2run View Post
How will I look in sda2's lost+found directory?
So far I've not found how to get into other partitions (sda2 or sda3) from F16 sda5.
The most basic way is to run something like:
Code:
mkdir ~/tmpmntpnt
sudo mount /dev/sda2 ~/tmpmntpnt
Then check ~/tmpmntpnt/lost+found, plus any other files you want to look at.

Note that this mount is a one-time thing, in that the partition will only be mounted until you reboot or explicitly unmount it. To make it a permanent automatic mount, you need to add a line to /etc/fstab.

If the command above works, then finding the appropriate UUID and adding a line to fstab should work fine too, but if not, then there is a problem somewhere still.
Reply With Quote
  #30  
Old 24th November 2012, 03:51 PM
nipunreddevil Offline
Registered User
 
Join Date: Nov 2012
Location: india
Posts: 1
linuxfirefox
Re: F16 64 - how to reinstall grub2

I faced similar issues to the OP and followed instructions in this thread. Now i get the error that /boot/vmlin...3.. is missing.
The results of boot info script on my system are attached.


NB: I used sda5 as my Fedora partition.
How next should i proceed? I manually pasted stuff like vmlinuz and other stuff from LiveCD, which resulted in a different set of errors.
Attached Files
File Type: txt RESULTS.txt (14.3 KB, 110 views)
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 01:49 PM
[SOLVED] Grub2, dev modifications from satndard grub2 install jakebpg Using Fedora 16 9th March 2012 08:39 AM
F16 - GRUB2 EFI non-Mac Don3 Using Fedora 32 2nd March 2012 03:33 PM
Help with grub2 JamesNZ Using Fedora 1 9th November 2010 02:54 AM
Grub2 duke11235 Using Fedora 8 13th October 2009 02:14 PM


Current GMT-time: 17:33 (Tuesday, 02-09-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