Results 1 to 4 of 4
i had rhel5 server on my machine and then i reinstalled my windows XP later. Now i don't see the grub screen to choose between XP and Linux.
then i ...
- 09-09-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 15
problem on reinstalling windows over linux
i had rhel5 server on my machine and then i reinstalled my windows XP later. Now i don't see the grub screen to choose between XP and Linux.
then i booted my computer through rhel5 DVD and started it on linux rescue mode.
it gives an error as "you don't have any linux partitions.
then i tried to mount my partitions manually.
sh-3.1# df -h
/dev /dev
/tmp/loop0 /mnt/runtime
sh-3.1# fdisk -l
/dev/sda1 HPFS/NTFS
/dev/sda2 W95 Ext'd (LBA)
/dev/sda3 HPFS/NTFS
/dev/sda5 Linux (/boot)
/dev/sda6 Linux (/)
/dev/sda7 Linux (/var1)
/dev/sda8 Linux (/backup)
/dev/sda9 Linux Swap / Solaris
/dev/sda10 Linux (/home)
/dev/sda11 W95 FAT32
even in mnt directory i don't find sysimage directory so i made one and mounted my partitions in it
sh-3.1# mount /dev/sda6 /mnt/sysimage
sh-3.1# mount /dev/sda5 /mnt/sysimage/boot
sh-3.1# mount /dev/sda7 /mnt/sysimage/var
sh-3.1# mount /dev/sda8 /mnt/sysimage/backup
sh-3.1# mount /dev/sda10 /mnt/sysimage/home
now it shows whole mounted disks while df -h
now i chrooted
sh-3.1# chroot /mnt/sysimage
sh-3.1# /sbin/grub-install /dev/sda
It gives an error the sda is not a block device
Please help me out
- 09-09-2009 #2
you chrooted to /mnt/sysimage, so you are trying to install your grub image to /mnt/sysimage/dev/sda
obviously this won't work as is. you have to mount your device directory into your chrooted environment.
mount -o bind /dev /mnt/sysimage/dev
THEN chroot, then grub-installNew to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 09-09-2009 #3Just Joined!
- Join Date
- Jun 2009
- Posts
- 15
i have done as u said but still it gives an error on installing the grub
the error as
" The file /boot/grub/stage1 not read correctly. "
so what am i supposed to do now......
- 10-31-2009 #4
Boot into any linux live CD.
Here UBUNTU Live CD used. This can be the live installer cd or the older live session Ubuntu cds.
When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)
Code:
This will get you a “grub>” prompt (i.e. the grub shell). At grub>. enter these commandsCode:sudo grub
Code:
This will return a location. If you have more than one, select the installation that you want to provide the grub files.Code:find /boot/grub/stage1
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>.
when you enter the next 3 commands)
Code:
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)Code:root (hd?,?)
Next enter the command to install grub to the mbr
Code:
Finally exit the grub shellCode:setup (hd0)
Code:
That is it. Grub will be installed to the mbr.Code:quit
When you reboot, you will have the grub menu at startup.
let me know if its not work.


Reply With Quote