MyTechSupport.ca :: Your Computer Technical Resource Headquarters! MyTechSupport.ca :: Your Computer Technical Resource Headquarters!
HOME FORUMS RESOURCES & TOOLS ARTICLES ONLINE STORE ABOUT US
Computer Support Forums arrow Software Support arrow Operating Systems : Linux / Unix arrow Topic: grub loader
September 20, 2019, 11:25:56 PM
 

Home Forum Rules Help Search Mobile Version Login Register

Welcome, Guest. Please login or register.
Did you miss your activation email?
September 20, 2019, 11:25:56 PM

Login with username, password and session length
 
News
New  Check out our improved Download section for tons of software....
  0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: grub loader  (Read 3888 times)
alex03
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 6


Bookmark and Share

View Profile
« on: April 29, 2005, 04:57:22 AM »

Hi,

I am having a AMD 2000 XP, machine with 256MB RAM, which has Windows XP and Redhat Linux 9.0 installed. I am quite a naive user of Linux. I used to use the floppy to boot into linux before, which was painful. And Windows used to get booted defaultly.

Few days before, I installed Grub as my boot loader, which I loaded to the MBR. The installation was done with anaconda, after which the boot process used to get stuck at "GRUB Loading Stage 2" message. After quite a lot of Googling, I could get it to work to some extend. The state now is that, I am able to get into Linux with Grub. But, when I select WinXP for booting into, it just comes back to the Grub menu screen again. It just continues in this circle. But, anytime I can get into Linux without any issue.

I have mounted one of the drives of Windows to Linux, which I am able to see from Linux (Data is still safe!). Please help me in debugging this problem. I can't afford to lose the data in Windows.

I have one harddisk, which is 40GB in size. It has been partitioned as 10GB for Windows Installation (C. 20GB for the second drive for Windows(E. And 10GB for Linux.

Attached is the result of some checks which were done.


Command : fdisk -l
====================

Disk /dev/hda: 40GB, 40020664320 bytes
255 heads, 63 sector/track, 4865 cylinders

Units = Cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/hda1 * 1 1275 10241406 c Win95 FAT32 (LBA)
/dev/hda2 1276 4864 28828642+ f Win95 Ext'd (LBA)
/dev/hda5 1276 3825 20482843+ 7 HPFS / NTFS
/dev/hda6 3826 4798 7815591 83 Linux
/dev/hda7 4799 4863 522081 82 Linux swap




FileName : /boot/grub/grub.conf
===============================

default = 0
timeout = 10
splashimage = (hd0,5)/boot/grub/splash.xpm.gz

title Linux RH9.0
root (hd0,5)
kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hda6 rhgb
initrd /boot/initrd-2.4.20-8.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1


GRUB Installation to MBR
====================

grub> root (hd0,5)
grub> setup (hd0)

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




Please help me.


Alex.

thanks in advance
Logged

 
dougcooke1977
Jr. Member
**

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 13


Bookmark and Share

View Profile
« Reply #1 on: April 29, 2005, 04:58:40 AM »

Hi Alex

Once there type :

grub or /sbin/grub and this will get you into your grb console (example: grub>)

Once in there, type:

root (hd0,1)
--> where hd0 is your primary harddisk, presuming you have your boot partition on

your primary harddisk, if you have a boot partition, else use the / partition. The 1

is used to identify your boot partition if you have one, else use the / partition.

Keep in mind that partitions start with 0, so presuming Win XP is on hd0,0 = C:) One

more thing. As other shells, this one supports auto completion using the TAB key, so

use it, to see what options the commands use, and also to see what partitions and

harddisks you have.

you can see your partition table using fdisk -l
try to identify your boot partition if you have one, else use the / partition.

The output of root (hd0,1) will be a description of the filesystem it has selected.

Now run

setup(hd0), presuming this is where you want to install grub. This will install it

to the MBR, thus giving you the GRUB boot loader.

now run

grub-install /dev/hda

This will output some lines, which you check for errors. there shouldn't be any.

Now you're done. Type quit, to get out of grub shell, and reboot, using the command

reboot.

Now you should see the GRUB bootloader, from wheere you can select what OS you want

to start.

Ok presuming you don't have a FC3 rescue disk. No problem, as long as you have your

XP CD. Put it in and start the recovery console of it. Once there, you will be

prompted for the administrators password. You will be dropped into console mode,

similar to linux, just a C:>

Here execute the command fixmbr, which will wipe out GRUB from the MBR, thus giving

you free way to your Win XP, without showing you that Linux is still on your

computer. Once in Win XP, download the FC3 rescue CD and burn it, and then follow

the upper instructions.


Good luck
Logged

 
alex03
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 6


Bookmark and Share

View Profile
« Reply #2 on: April 29, 2005, 05:01:01 AM »

Thanks for your prompt answer


Smiley
Logged

 
dougcooke1977
Jr. Member
**

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 13


Bookmark and Share

View Profile
« Reply #3 on: April 29, 2005, 05:05:55 AM »

No worries, I just happened to be online.
Let me know how you go
Logged

 
alex03
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 6


Bookmark and Share

View Profile
« Reply #4 on: April 29, 2005, 05:09:45 AM »

Hi again,

I tried what you described, every thing seemed to be ok but whe I entered reboot, it didn't do any thing?

Have done some thing wrong?

Logged

 
dougcooke1977
Jr. Member
**

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 13


Bookmark and Share

View Profile
« Reply #5 on: April 29, 2005, 05:12:30 AM »

Hi Alex

Yeah sometimes that works, but now and then depending on your scenraio it may not.
The main objective is to restart your computer, so try [CTRL] + [ALT] + [DEL].
However this is not the preferred way to restart your PC.
Logged

 
alex03
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 6


Bookmark and Share

View Profile
« Reply #6 on: April 29, 2005, 05:16:00 AM »

Thanks,

That worked perfectly.

My friend Erfyl Evans had the same problem do you think it will work the same for him?
Logged

 
dougcooke1977
Jr. Member
**

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 13


Bookmark and Share

View Profile
« Reply #7 on: April 29, 2005, 05:18:23 AM »

If it is the same problem it should work - give it a go.

Erfyl wouldn't be Welsh by any chance would he?
Logged

 
alex03
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 6


Bookmark and Share

View Profile
« Reply #8 on: April 29, 2005, 05:23:04 AM »

yeah he's a welsh migit.

Any way I'm  booting straight into the GUI,
I want it to boot to the CLI, this way I am forced to use the commands rather than rely on the gui tools.

How do I change this?
Logged

 
dougcooke1977
Jr. Member
**

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 13


Bookmark and Share

View Profile
« Reply #9 on: April 29, 2005, 05:30:58 AM »

edit the file /etc/inittab
change the line which should be from your description

id:5:initdefault

to


id:3:initdefault

The 5 means it is run level 5 which is the GUI
The 3 means run level 3 which is your CLI.

Make sure that you make a back up of theis file before you proceed.
Make sure that the syntax is absolutly correct, Linux is very fussy.


Hope it helps.
Logged

 
alex03
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 6


Bookmark and Share

View Profile
« Reply #10 on: April 29, 2005, 05:33:48 AM »

These questions must seem trivial to you,

Where Can I find more linux infomation, so I don't have to bother you so much?

Thanks.
Huh?
Logged

 
dougcooke1977
Jr. Member
**

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 13


Bookmark and Share

View Profile
« Reply #11 on: April 29, 2005, 05:36:10 AM »

No problems, try:
www.tldp.org

This website is a good place to start.
Logged

 
Pages: [1] Go Up Print 
 
Jump to:  

Powered by MySQL Powered by PHP

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS!

Disclaimer
This site is NOT responsible for any damage that the information on this site may cause to your system. Everything you try, whether inspired by the response given from this site or not, is entirely at your own risk. All product names and company names used herein are for identification purpose only and may be trademarks or registered trademarks of their respective owners. We are in no way affiliated or representing any of the companies on this site unless specified.
Back to Top
Stop Spam Harvesters, Join Project Honey Pot Fight Back Against Spammers! Get Firefox! Get Thunderbird! View Sylvain Amyots profile on LinkedIn
Back to Top
Google visited last this page September 03, 2018, 08:14:32 PM