PDA

View Full Version : how to boot using grub



ezhil
27th December 2006, 05:11 PM
Sir/Madam,
I have a problem with booting my system
i have a pentium 4 with windowsXP and linux 2.6.9(Fedora core 3) installed with
a GRUB loader it was working fine until recently i installed partition magic software
when i restarted the system it stopped at grub> prompt
if i give the commands
rootnoverify (hd0,0)
chainloader +1
boot
then i can boot to windowsxp but i dont know how to enter linux
i opened the grub.conf in rescue mode with the help of fedora installation cd
it is as follows
-------------------------------------------------------------
#Notice:you do not have a /boot partition this means that
# all kernel and initrd paths are relative to /,eg
# root (hd0,6)
# kernel /boot/vmlinuz-version ro root=/dev/hda7
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=5
splashiage=(hd0,6)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora core(2.6.9-1.667)
root (hd0,6)
kernel /boot/vmlinuz-2.6.9.1667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title winxp
rootnoverify (hd0,0)
chainloader +1
------------------------------------------------------------
kindly notice the first line of the grub.conf which says "YOU DO NOT HAVE A
/BOOT PARTITION"please help me sort this problem

b_martinez
27th December 2006, 05:25 PM
Sir/Madam,
I have a problem with booting my system
i have a pentium 4 with windowsXP and linux 2.6.9(Fedora core 3) installed with
a GRUB loader it was working fine until recently i installed partition magic software
when i restarted the system it stopped at grub> prompt
if i give the commands
rootnoverify (hd0,0)
chainloader +1
boot
then i can boot to windowsxp but i dont know how to enter linux
i opened the grub.conf in rescue mode with the help of fedora installation cd
it is as follows
-------------------------------------------------------------
#Notice:you do not have a /boot partition this means that
# all kernel and initrd paths are relative to /,eg
# root (hd0,6)
# kernel /boot/vmlinuz-version ro root=/dev/hda7
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=5
splashiage=(hd0,6)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora core(2.6.9-1.667)
root (hd0,6)
kernel /boot/vmlinuz-2.6.9.1667 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.9-1.667.img
title winxp
rootnoverify (hd0,0)
chainloader +1
------------------------------------------------------------
kindly notice the first line of the grub.conf which says "YOU DO NOT HAVE A
/BOOT PARTITION"please help me sort this problem


You do not need a /boot partition. The problem is the partition magic software, and what it did to your drive.
Boot into rescue mode , do the chroot thing, and at the prompt

grub --setup /dev/hda
quit
exit
exit
This should reset your grub so you can boot into FC.
hth
Bill

bob
27th December 2006, 05:27 PM
(moved to General Support)

ezhil
27th December 2006, 06:03 PM
Sir,
the code u have given does not work
when in the command mode after chroot /mnt/sysimage
if i give
grub --setup /dev/hda
the response is
--setup unrecognized command
do you have any other ways to solve this problem
thank you

leigh123linux
27th December 2006, 06:07 PM
try

grub-install /dev/hda

instead of the last command

ezhil
27th December 2006, 06:46 PM
Sir
i tried
grub-install /dev/hda
this is the response
Installation finished No errors reported
This is the contents of the device map
/boot/grub/device.map
check if this is correct or not if any of the lines
are incorrect fix it and rerun the script 'grub-install'
#this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda
when i rebooted the system i didnt get the choice of selecting the os
and it automatically booted windowsxp i rebooted again and blindly clicked the upper arrow key
and return key and this was the response
Booting fedora core 2.6.9-1.667
root (hd0,6)
filesystem type unknown,partition type 0x82
kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/rhgb quiet
ERROR 17:cannot mount selected partition
press any key to continue
how do i solve this problem
thank you

leigh123linux
27th December 2006, 07:03 PM
try

chroot /mnt/sysimage
fdisk -l

note the /dev/ address for root and boot partitons

nano /etc/fstab

make sure these address are correct

then edit grub accordingly

nano /boot/grub/grub.conf

to look something like this

kernel /boot/vmlinuz-2.6.9-1.667 ro root=/dev/hda? rhgb quiet