| View previous topic :: View next topic |
| Author |
Message |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Sun Aug 26, 2007 10:54 pm Post subject: grub.conf [solved] |
|
|
Alright, I resized the ntfs partition and installed gentoo along side windows on my laptop, and I'm having trouble with grub.
| Code: |
kernel /boot/kernel-2.6.12-gentoo-r6 root=/dev/hda4
|
Gives me a file not found error (15) with that kernel on /dev/sda4. What am I doing wrong?
Thanks
Last edited by Peace Frog on Thu Aug 30, 2007 8:09 pm; edited 1 time in total |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 4844 Location: Somewhere over Atlanta, Georgia
|
Posted: Sun Aug 26, 2007 10:59 pm Post subject: |
|
|
Well, is your drive IDE or SATA? You've use both /dev/sda4 and /dev/hda4 in your post. Unconfuse me, please.
- John |
|
| Back to top |
|
 |
Telexen Apprentice

Joined: 09 Oct 2005 Posts: 189
|
Posted: Sun Aug 26, 2007 10:59 pm Post subject: |
|
|
It means the kernel wasn't found
perhaps you mean, kernel-2.6.21-gentoo-r6 rather than kernel-2.6.12-gentoo-r6
Plus you mention both hda4 and sda4 |
|
| Back to top |
|
 |
Voltago Advocate


Joined: 02 Sep 2003 Posts: 2482 Location: Hinter den Materiequellen
|
Posted: Sun Aug 26, 2007 11:03 pm Post subject: |
|
|
Take care you use the line
to declare your boot partition to be the 4th on the first disk. |
|
| Back to top |
|
 |
JC99 l33t


Joined: 06 Aug 2003 Posts: 719 Location: Toronto
|
Posted: Sun Aug 26, 2007 11:25 pm Post subject: Re: grub.conf |
|
|
| Peace Frog wrote: | Alright, I resized the ntfs partition and installed gentoo along side windows on my laptop, and I'm having trouble with grub.
| Code: |
kernel /boot/kernel-2.6.12-gentoo-r6 root=/dev/hda4
|
Gives me a file not found error (15) with that kernel on /dev/sda4. What am I doing wrong?
Thanks |
Try this...
title=whatever you want
root (hd0,3)
kernel (hd0,3)/boot/kernel-2.6.21-gentoo-r6 root=/dev/hda4
or
kernel (hd0,3)/boot/kernel-2.6.21-gentoo-r6 root=/dev/sda4
Choose one of those lines depending on if you are using hda4(ide) or sda4(sata). |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Mon Aug 27, 2007 3:42 am Post subject: |
|
|
Sory. It's:
root (hd0,3)
kernel /boot/kernel-2.6.12-gentoo-r6root=/dev/sda4
And no I didn't transpose the 1 and the 2 thats the kernel version that I got when I asked for it, and yes the main partition is on /dev/sda4, may laptop has an sata drive. Sorry for the confusion.
(hd0,3)/boot..... doesn't work wither (12 or 21)
Any other ideas? |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 4844 Location: Somewhere over Atlanta, Georgia
|
Posted: Mon Aug 27, 2007 10:44 am Post subject: |
|
|
The "root" statement in grub.conf should point to your "boot" partition, not to your "root" partition. I'd be guessing at your partition layout at this point, but, if you created a "boot" partition, then (hd0,3) is probably incorrect. Why don't you post your partition layout?
- John |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Mon Aug 27, 2007 3:12 pm Post subject: |
|
|
/dev/sda1, boot ,ext2 contains /boot
/dev/sda2, ntfs contains xp kernel
/dev/sda3, swap
/dev/sda4, ext3 contains gentoo kernel
Now for some reason every time I load up a live environment to fiddle with things I check fdisk and sda2 is reflagged bootable. Each time I swap it out for sda1, but it keeps resetting. Grub recognizes the xp install just fine. |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 4844 Location: Somewhere over Atlanta, Georgia
|
Posted: Mon Aug 27, 2007 3:23 pm Post subject: |
|
|
Okay, change the root line in grub.conf to: and grub should be able to find the compiled kernel. You had no trouble installing grub during the installation process, right? You might want to boot the installation CD and mount all of the partitions into /mnt/gentoo and chroot as described in the handbook and then confirm that the following things are true:- That the kernel you're naming on the kernel line in grub.conf truly exists in /boot (or /mnt/gentoo/boot if you don't chroot).
- That the /boot symlink exists in /boot. Use ls, like this, to see:
| Code: | vesta rules.d # ls -ld /boot/boot
lrwxrwxrwx 1 root root 1 2007-08-15 11:46 /boot/boot -> .
vesta rules.d # | That symlink is there so that, regardless of whether or not you have an independent boot partition, you can refer to the kernel as "/boot/kernel_name".- John |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Mon Aug 27, 2007 8:38 pm Post subject: |
|
|
Alright... with a little research I've discovered /boot/boot is symlinked to... (drumroll please) /boot/boot and there is no obvious kernel inside the /boot dir. There is a file named 'kernel' that appears to be a compiled program, but grub won't take it if I pass that as it's argument.
Slightly confusing.
EDIT
Alright, scratch that. I got it working by pointing it to kernel and setting root to (hd0,0). It does however ask for a boot floppy, which I can opt out of, then I get a kernel panic. Something about mounting to an unknown device. I'll post in in a minute.
EDIT
Kernel Panic: unable to mount root fs on block(2,0)
Bad file system or bad instructions? |
|
| Back to top |
|
 |
d2_racing Moderator


Joined: 25 Apr 2005 Posts: 12867 Location: Ste-Foy,Canada
|
Posted: Tue Aug 28, 2007 3:00 am Post subject: |
|
|
| Peace Frog wrote: |
Kernel Panic: unable to mount root fs on block(2,0)
Bad file system or bad instructions? |
Bad file system I think.
Can you post the contain of /boot plz. _________________ Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec |
|
| Back to top |
|
 |
ekra n00b

Joined: 05 Jul 2007 Posts: 55 Location: France
|
Posted: Tue Aug 28, 2007 7:49 am Post subject: |
|
|
Hello,
- You need to enable SATA driver in the kernel
- Could you cat your fstab and list your file system
- cat your grub.conf here
 _________________
 |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 4844 Location: Somewhere over Atlanta, Georgia
|
Posted: Tue Aug 28, 2007 10:26 am Post subject: |
|
|
Correct. You almost certainly don't have support for your SATA controller built into your kernel. Reboot the install CD and mount all the partitions like described in the handbook and chroot iinto the environment. Use "lspci" to show you the particulars about your hard drive controller and then rebuild your kernel with support for that hardware built in (i.e., not built as a module).
How did you build your kernel? Manual method or genkernel method?
- John |
|
| Back to top |
|
 |
d2_racing Moderator


Joined: 25 Apr 2005 Posts: 12867 Location: Ste-Foy,Canada
|
Posted: Tue Aug 28, 2007 12:10 pm Post subject: |
|
|
Manual method I guest. _________________ Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Tue Aug 28, 2007 5:09 pm Post subject: |
|
|
Hah, that makes sense, I feel like an idiot now.
I built it by hand, but I'm still stumbling around, using the modules that the live CD loaded as a reference, and I enabled all of them (dozen and a half or so) as kernel components (not modules). There were a few that I couldn't find, I'm still not very good at locating the module I need from the output of lspci. I really wish there was a quick way to do this.
I'll fiddle with that this afternoon and see what I can come up with.
-Thanks |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 4844 Location: Somewhere over Atlanta, Georgia
|
Posted: Tue Aug 28, 2007 5:13 pm Post subject: |
|
|
Well, if you like, post the relevant output from lspci and we'll try to help.
- John |
|
| Back to top |
|
 |
d2_racing Moderator


Joined: 25 Apr 2005 Posts: 12867 Location: Ste-Foy,Canada
|
Posted: Tue Aug 28, 2007 5:43 pm Post subject: |
|
|
Yeah, a custom kernel need a little bit of tweaking  _________________ Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Wed Aug 29, 2007 6:10 pm Post subject: |
|
|
0000:00:12.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 family) Serial ATA Storage Controllers cc=IDE (rev 01)
I went in to make menuconfig and poked around for ich7 southbridge drivers, intel - related sata drivers, 82801, ghm... nothing turned up anything that looked like what I wanted. Any ideas? |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27775 Location: 56N 3W
|
Posted: Wed Aug 29, 2007 6:18 pm Post subject: |
|
|
Peace Frog,
| Code: |
Device Drivers -->
Serial ATA (prod) and Parallel ATA (experimental) drivers -->
Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support | ... The exact name in menuconfig depends on your kernel version
ICH7 is a pain to make work in a mixed SATA / IDE environment this thread tells how to do it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Wed Aug 29, 2007 7:26 pm Post subject: |
|
|
Alright, well I get past the kernel panic. It seemed that it was looking for /dev/hda4 not /dev/sda4 The problem now is that I'm not sure if it is finding what it wants. I went back and changed grub.conf to reference hda4, and renamed the partitions to Hda in fstab, and now I get a superblock error after it starts loading the kernel.
fsck.ext3 Bad magic number in super-block while trying to open /dev/(s)(h)da3 (I tried with both hda and sda)
Now... /dev/(h)(s)da3 is my swap partition.... and I've checked it isn't an ext3 partition by any means, it's linux swap (id 82)...
I just love it when problems migrate :~} |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27775 Location: 56N 3W
|
Posted: Wed Aug 29, 2007 7:50 pm Post subject: |
|
|
Peace Frog,
It sounds like your swap line in /ect/make.conf is in error.
If swap failed to mount, or that was your only warning/error, the system should still operate normally. Does it? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Wed Aug 29, 2007 7:53 pm Post subject: |
|
|
| No, I get the option to try and fix it, or ctrl-d through. If I ctrl-d through it it unmounts everything thats already mounted and reboots. |
|
| Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 27775 Location: 56N 3W
|
Posted: Wed Aug 29, 2007 8:01 pm Post subject: |
|
|
Peace Frog,
As you get that far, your root filesystem is mounted read only and the system trying to check it.
Your system uses the root=/dev/sda4 in the kernel line to know where root is to mount it and the / (root) entry in /etc/fstab to discover where root is for checking.
As root is clearly mounted the root filesystem entry in /etc/fstab must be wrong. Proceed as follows. Boot to the error message and five the root password.
You are now 'in' but root is readonly. Continue with | Code: | | mount -o remount,rw / | to address the ro root.
Now you may edit /etc/fstab and save the change _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
| Back to top |
|
 |
Peace Frog Apprentice

Joined: 12 Dec 2006 Posts: 185
|
Posted: Wed Aug 29, 2007 9:16 pm Post subject: |
|
|
Well... the only thing I can see that looks wrong is that the swap partition's mounting instructions read 'none'. Other than that fstab looks fine.
/dev/sda1 - boot - ext2 - noauto,noatime - 1 2
/dev/sda3 - / - ext3 - noatime - 0 1
/dev/sda2 - none - swap - sw - 0 0
/dev/cdrom - /mnt/cdrom - audo - auto,ro - 0 0
What should sda2 be mounted to? |
|
| Back to top |
|
 |
Paapaa l33t


Joined: 14 Aug 2005 Posts: 955 Location: Finland
|
Posted: Wed Aug 29, 2007 9:32 pm Post subject: |
|
|
| Peace Frog wrote: | /dev/sda2 - none - swap - sw - 0 0
What should sda2 be mounted to? |
"none" is the correct option. See "man fstab" for the same info. Or the Gentoo Handbook. _________________ Paludis, the way packages are meant to be managed. |
|
| Back to top |
|
 |
|