nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Boot thru grub

This is a discussion on Boot thru grub within the Getting started tutorials forums, part of the Linux Getting Started category; What procedure do we need to follow when there are dual boot operating system likw windows and linux and some ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-08-2007, 03:46 AM
linux_sym's Avatar
Junior Member
User
 
Join Date: Aug 2007
My distro: Debian, GNU Linux
Posts: 3
Rep Power: 0
linux_sym is on a distinguished road
Post Boot thru grub

What procedure do we need to follow when there are dual boot operating system likw windows and linux and some how linux is not starting up. how do we boot the server? what changes we need to do to grub.conf file in order to tell it to boot the linux from the following location? Please advice......
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-11-2007, 10:19 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 481
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

You mean you are not able to boot Linux after Windows installation?
__________________
May the force with you!
Reply With Quote
  #3 (permalink)  
Old 09-15-2007, 02:01 PM
linux_sym's Avatar
Junior Member
User
 
Join Date: Aug 2007
My distro: Debian, GNU Linux
Posts: 3
Rep Power: 0
linux_sym is on a distinguished road
Default Boot thru grub

Yes this is also the senario or some how when you have dual OS installed and not able to start linux server in both cases.
Reply With Quote
  #4 (permalink)  
Old 09-18-2007, 02:57 PM
nix's Avatar
nix nix is offline
Junior Member
User
 
Join Date: Feb 2007
Location: Pune, India
My distro: Redhat
Posts: 5
Rep Power: 0
nix
Default

You have to install GRUB on the MBR (Master Boot Record). To do this just follow this steps:

(First of all, enter your BIOS setup and in BOOT Sequence window choose to boot with CDROM first.)

1) Boot with your Fedora Core Installation CD 1 (or your Redhat Distro).

2) Type "linux rescue" at the prompt.

3) Answer the questions about keyboard and language.

4) Tell the rescue mode to use your proper partition to mount (the one that you want to get booted into)

5) When you come to the console prompt type: chroot /mnt/sysimage

6) Type grub

7) Set the GRUB's root device to the partition containing the boot directory like this:

grub> root (hd0,0)

Filesystem type is ext2fs, partition type 0x83

I have Windows 98 in hd0,0 ; Windows XP in hd0,1, Fedora Core /boot partition in hd0,2 and Mandrake /boot partition in hd0,6. So in my case the command should be: > root (hd0,2)

If you are not sure which partition actually holds this directory, use the command 'find' like this:

grub> find /boot/grub/stage1

This will search for the file name '/boot/grub/stage1' and show the devices which contain the file.
Once you've set the root device correctly, run the command 'setup'.

Then, run the command setup

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists....... no
Checking if "/grub/stage1" exists....... yes
Checking if "/grub/stage2" exists....... yes
Checking if "/grub/e2fs_stage1_5" exists....... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"....... 15 sectors are embedded
succeded
Running "install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf....... succeded
Done

This command will install GRUB boot loader on the Master Boot Record (MBR) of the first drive.

9) Type quit

grub> quit

GRUB is now in the MBR.

10) Finally, you'll have to edit your /boot/grub/grub.conf, for example whith nano:

> nano /boot/grub/grub.conf

(/etc/grub.conf or /boot/grub/grub.conf or /boot/grub/menu.lst, they are the same file) This file has the boot partitions of the disk/s.

11) Restart your PC without the Fedora Core CD 1 Installation. (or your Redhat Distro)
Reply With Quote
  #5 (permalink)  
Old 10-25-2007, 07:05 PM
Junior Member
User
 
Join Date: Jul 2007
Location: Hyderabad
My distro: Redhat RHEL, Solaris
Posts: 28
Rep Power: 0
vaibhav.kanchan is on a distinguished road
Default

you can also use this command

grub-install --recheck /dev/hda or /dev/sda.. it will correct the entries in grub.conf..

BTW suggestions posted by nix are also corect.. very nice way....
Reply With Quote
  #6 (permalink)  
Old 03-24-2008, 11:55 PM
Member
User
 
Join Date: Mar 2008
My distro: Debian, Slackware, LFS
Posts: 83
Rep Power: 1
Tux-Idiot is on a distinguished road
Default

apropos grub
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
e2fsck does not help to boot Ritho Getting started tutorials 1 03-24-2008 11:40 PM
How to remove grub vista? raj Windows Xp/2000/2003 server administration 1 10-08-2007 01:02 AM
Ubuntu GRUB Problem surmandal Linux software 7 09-01-2007 10:31 PM
Fedora boot problem rajuk Linux software 3 02-06-2006 11:54 PM
debian boot into grub single user mode Linux software 1 01-01-2006 12:21 AM


All times are GMT +5.5. The time now is 07:38 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36