how to boot to linux?

Discussion regarding the installation and configuration of Linux distributions.
barlas
Naib Subedar
Posts: 315
Joined: Mon Jun 30, 2003 11:07 am
Location: Lahore, Pakistan
Contact:

how to boot to linux?

Postby barlas » Sun Sep 28, 2003 3:16 pm

Assalaam-u-Alikum!

I have one more problem. Recently due to some problem with my windows drive i formatted and reinstalled windows on C:\....... Now when my computer starts it just boot to windows, there is no option to choose between linux and windows.....(I choosed grub as a boot loader)

Now what can I do???

I have searched for my answer but didnt find any post that could helped me.......

One more thing I forgot to tell, Before posting my question here I boot from Red Hat Cd and choosed linux rescue and used mkbootdisk with some switches, but while booting from Floppy a message appeared something like Boot failed.....

I then started linux setup and choosed upgrade and choosed grub as boot loader, but after installation a message appeared "No kernel package is installed so your boot loader setting will not be changed". At the end of installation I entered the Floppy to make a bootable disk but while booting from floppy same message apeared BOOT FAILURE
Aqeel Zafar

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Sun Sep 28, 2003 7:36 pm

Dear \
Salam,

Sir, It is due to your boot loader was installed at you MBR Master Boot Record so when you reinstall windows then your Boot Loader Like Lilo and Grub will Remove from MBR. Please Check this out, http://www.linuxpakistan.net/forum2x/vi ... .php?t=644

Best Regards.
Farrukh Ahmed

barlas
Naib Subedar
Posts: 315
Joined: Mon Jun 30, 2003 11:07 am
Location: Lahore, Pakistan
Contact:

Postby barlas » Sun Sep 28, 2003 9:33 pm

I checked /etc/grub.conf and there were following entries

==================
#
# (There were many entries here but i am ignoring them)
#
default=2
timeout=10
splashimage=(hd0,5) /boot/grub/splash.xpm.gz

title Red hat linux (2.4.20-8BOOT)
root (hd0,5)
kernel /boot/vmlinuz-2.4.20-8BOOT ro root=LABEL=/
initrd /boot/initrd-2.4.20-8BOOT.img

title Red hat linux (2.4.20-8)
root (hd0,5)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot/initrd-2.4.20-8.img

title Windows 98
rootnovrify (hd0,0)
chainloader +1
=================

Then I tried type /sbin/grub and /sbin/grub is /sbin/grub returned
At the end I wrote /sbin/grub and some shell opened with grub as a prompt

After this I restarted computer but nothing happened and there is nothing else told in that thread......
Aqeel Zafar

s7r1k3r
Battalion Quarter Master Havaldaar
Posts: 221
Joined: Wed Aug 07, 2002 3:02 pm
Location: Rawalpindi

try this

Postby s7r1k3r » Sun Sep 28, 2003 9:49 pm

Assalam-O-Alaekum!

Instead of running grub, run grub-install

here is how to do that:

grub-install /dev/hda

Assuming that the HDD is the primary master. this will recover gurb and everything should work fine.
a10n3 s7r1k3r

farhanksa
Subedar
Posts: 359
Joined: Sun Nov 03, 2002 6:40 am
Location: Lahore
Contact:

Postby farhanksa » Mon Sep 29, 2003 1:42 am

ya
to write lilo u need to write the command lilo after u edit the file.
for grub u need to write grub-install /dev/hd?X
?=a,b,c,d
X=partition no#
as u can write the loader on the first sector of the partition also.....and on MBR too.

to write lilo on the first sector of partition u have to specify it in the lilo.conf file

its recomended that u make the bootable floopy by
mkbootdisk KERNELVERION

Faraz.Fazil
Major General
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
Location: Karachi/Pakistan/Earth/Universe
Contact:

Postby Faraz.Fazil » Mon Sep 29, 2003 7:28 pm

yup the grub-install /dev/hda would re-install grub on the master boot record.

The thread http://www.linuxpakistan.net/forum2x/vi ... .php?t=644
was for lilo and not grub...since barlas has grub and not lilo, hence the reference here is not valid.But the reference to to my wiki thread is valid, which itself was referenced in the 644 thread.

As stated in my post on wiki:

http://www.linuxpakistan.net/wiki/index ... lling-Grub

=========================================

Once the GRUB package is installed, open a root shell prompt and run the command /sbin/grub-install <location>, where <location> is the location that the GRUB Stage 1 boot loader should be installed.

=======================================

barlas
Naib Subedar
Posts: 315
Joined: Mon Jun 30, 2003 11:07 am
Location: Lahore, Pakistan
Contact:

THANKS

Postby barlas » Mon Sep 29, 2003 8:51 pm

thnx

Problem Solved! :D
Aqeel Zafar


Return to “Installation”

Who is online

Users browsing this forum: No registered users and 1 guest