LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-18-2005, 07:04 PM   #1
Buruma
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Rep: Reputation: 0
Grub configuration file


Hi,
I am trying to reinstall the Grub booter (after reinstalling Windows XP in my PC) with the Suse install CD. From "rescue" I go to the YaST and modify the menu.lst file. But when I "finish" the configuration, I receive a message that there was an error installing the booter. So I guess there is something wrong with my menu.lst. I modified all the (hdX,X) and sdaX parameters. Can anyone help me to configure it correctly? Thanks!

This is the result of fdisk -l:
Device Boot Id System
/dev/sda1 * 7 HPFS/NTFS
/dev/sda2 b W95 FAT32
/dev/sda3 f W95 Ext'd (LBA)
/dev/sda4 b W95 FAT32
/dev/sda5 82 Linux swap
/dev/sda6 83 Linux
/dev/sda7 b W95 FAT32
/dev/sda8 b W95 FAT32



And this is my /boot/grub/menu.lst file:

# Modified by YsAT2. Last modification on Sat Jun 18 13:18:15

color white/blue black/light-grey
default 0
timeout 8
gfxmenu (hd0,5)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title Linux
kernel (hd0,5)/boot/vmlinuz root=/dev/sda6 vga=0x31a selinux=0 splash=silent resume=/dev/sda6 elevator=cfq showopts
initrd (hd0,5)/boot/initrd

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
root (hd0,0)
chainloader +1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
kernel (hd0,5)/boot/vmlinuz root=/dev/sda6 showopts ide=nodma apm=off acpi=off vga=normal noresume selinux=0 barrier=off nosmp noapic maxcpus=0 3
initrd (hd0,5)/boot/initrd
 
Old 06-19-2005, 12:48 AM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
While I'm no expert on grub, I think it's safe to say that anyone trying to help will need more detail.

So run grub manually (yes, from the command line. Yes, you'll need to rtm for two minutes (or more)) and post the output.

Also, if you haven't already, I think it would be a good idea to read http://www.catb.org/~esr/faqs/smart-questions.html

I hope you get it sorted out

--Jonas
 
Old 06-19-2005, 01:28 AM   #3
Buruma
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks. I will try to explain my problem. I have Suse 9 and Windows XP in the same PC, and used to boot with Grub. Now, yesterday I reinstalled Windows and that deleted my Grub booter, so I am trying to reinstall it by using the Suse installation CD. What I do is that I boot with the Suse CD, and go to the "Rescue installation" option, there I do this to use the YaST:
Rescue login: root
cd /tmp
mkdir myroot
mount dev/sda6 /tmp/myroot
chroot /tmp/myroot
yast

Once in the YaST, I go to my "Boot Loader Setup" and edit the configuration files just as I copied above. When I select the "Finish" option, I get this error: "Error occurred while installing GRUB".
My question is: is there anything wrong with my configuration file? how can I install GRUB instead? Thx!
 
Old 06-19-2005, 09:56 AM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
Quote:
While I'm no expert on grub
... I *do* think it looks right.

Quote:
So run grub manually (yes, from the command line. Yes, you'll need to rtm for two minutes (or more)) and post the output.
Emphasis added
 
Old 06-19-2005, 11:24 AM   #5
Buruma
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Can you pls tell me how to do that? I am new to all this and have no idea...
 
Old 06-19-2005, 01:04 PM   #6
Buruma
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
When I do grub>root (hd0,5) I receive this message: "Error 21: Selected disk does not exist" . What is wrong with my configuration? If (hd0,5) is my sd6 where Linux resides, why can't it see it?
 
Old 06-19-2005, 03:08 PM   #7
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
Quote:
when I do `grub>root (hd0,5)'
Is that in the Simulator or the Real Thing?

Try to do:
Code:
grub> root (<tab>
does it match your expectations? (you might want to compare it with df -h or /etc/fstab)
for each disk (one in your case): look at the partitions. Do they match your expectations?

Try running grub's `find' for a known file.

Best of luck --Jonas

PS. I'll be away for quite a while (2-3 weeks) (sorry)--get someone else to jump in
 
Old 06-19-2005, 09:04 PM   #8
Buruma
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Yes, that's from the command line...
The root (hd0,<tab> displays:
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 1, Filesystem type is fat, partition type 0xb
Partition num: 3, Filesystem type is fat, partition type 0xb
Partition num: 5, Filesystem type unknown, partition type 0x82
Partition num: 6, Filesystem type is reiserfs, partition type 0x83
Partition num: 7, Filesystem type is fat, partition type 0xb
Partition num: 8, Filesystem type is fat, partition type 0xb

Another question, what I cannot see partitions 2 and 4?? Thx!
 
Old 06-19-2005, 09:17 PM   #9
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
2 is your swap partition and 4 is your extended partition. You can only have 4 primary partitions on a drive so the last one # 4 is defining point to the extended partitions 5 and up.

Brian1
 
Old 06-20-2005, 01:35 AM   #10
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
Quote:
2 is your swap partition
Wrong!

Number 5 has type 0x82 (Linux Swap)--and there's only one 0x82.
Number 2 is 0xf (ext'd W95 LBA -- thing).

I *think* you're right about #4 though (/me doesn't know scsi disks). Funny thing is that they're linear in the Linux naming scheme (i.e. ...3, 4, 5; not ... 3, 5, ...).

--Jonas
 
Old 06-20-2005, 10:29 PM   #11
Buruma
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
The problem was that my /etc/fstab file had incorrect information (I compared it with the results of "fdisk -l). I modified it to reflect the real disk partitions and the booter is working now. Thanks guys!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to find the GRUB configuration script file? piggysmile Red Hat 2 10-09-2004 04:15 PM
How to change the GRUB configuration file with kernel 2.6.7 Bassam Linux - Software 2 06-22-2004 03:44 AM
Grub Configuration RJDavison Fedora 4 05-21-2004 02:44 PM
GRUB splashimage configuration / update GRUB rudL Linux - Software 1 05-10-2004 08:16 AM
grub bootloader : saving a new configuration file? lynnsbomb Mandriva 3 02-03-2004 05:10 PM


All times are GMT -5. The time now is 03:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration