LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   recover grub centos 6 ( not working ) (http://www.linuxquestions.org/questions/linux-desktop-74/recover-grub-centos-6-not-working-4175424814/)

cybernet2u 08-30-2012 12:30 PM

recover grub centos 6 ( not working )
 
recently i install windows on my system knowing that i can recover grub easily.:doh:

anyway

so i setup a usb stick with centos 6 netinstall x64
i started rescue installed system, when asked for rescue image i selected /dev/sda1 ( where centos is installed )

and then i started the shell
Code:

$ chroot /mnt/sysimage
$ grub-install --recheck /dev/sda

no errors reported ... la la la

after reboot i see windows logo ... starting
and i feel like this :banghead:

any suggestions ?
i'm i doing something wrong ?

deadeyes 08-31-2012 08:35 AM

Quote:

Originally Posted by cybernet2u (Post 4768442)
recently i install windows on my system knowing that i can recover grub easily.:doh:

anyway

so i setup a usb stick with centos 6 netinstall x64
i started rescue installed system, when asked for rescue image i selected /dev/sda1 ( where centos is installed )

and then i started the shell
Code:

$ chroot /mnt/sysimage
$ grub-install --recheck /dev/sda

no errors reported ... la la la

after reboot i see windows logo ... starting
and i feel like this :banghead:

any suggestions ?
i'm i doing something wrong ?

I have to say I never used the recheck option...
Boot into single user using CD.
Mount the filesystems (including proc and sys)
chroot into your system
grub
root (hd0,0) # change accordingly to your setup
setup (hd0)

If you get errors that hd0 does not exist for example, you could change the device.map file to map hd0 (or another name) to an actual drive (for example sda).
Be careful with doing this!

cybernet2u 09-02-2012 10:51 PM

because i was to cocky about my knowledge i didn't even run fdisk -l knowing that /dev/sda1 can't change wonce the OS is installed, but apparently i was so wrong :(

the correct path was /dev/sdb1.
i solved the problem, thanks for the support,


cybernet2u


All times are GMT -5. The time now is 03:26 AM.