LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Gentoo | Kernel Images plötzlich nicht mehr in /boot, sondern in / ? (http://www.linuxquestions.org/questions/linux-distributions-5/gentoo-%7C-kernel-images-pl%F6tzlich-nicht-mehr-in-boot-sondern-in-579218/)

duelle 08-23-2007 08:46 AM

Gentoo | Path to KernelImages changed from /boot to / - how can this happen?
 
Hi,

after compiling a new Kernel and copying the Kernelimage to /boot the Grub-Error 15 "File not found" occurs while booting.

I found out, that it's no more possible to boot the Kernel-Images from /boot/<kernelimage> (as before and described in Gentoo Manual). They seem to be located in /<kernelimage> now.

If I edit the grub.conf (in deleting the /boot from the Path to the Kernelimage) everything works without any problems.

How is it possible that the path of _all_ Kernelimages changes?

In /etc/fstab /boot is flagged with noauto (it was that way from beginning on)
Kernel compilations/installations before were problemless. And I did it as the others before.

Greetz
duelle

bulliver 08-23-2007 02:53 PM

Quote:

In /etc/fstab /boot is flagged with noauto
So did you remember to mount it before copying your new kernel(s) there? If not you are placing them in a directory '/boot' which actually lives on the '/' partition, hence why grub cannot find them if it is looking for the images on a boot partition.

I suggest you do something like:

Code:

# cp /boot /boot.bak
# mount /boot
# mv /boot.bak/* /boot/
# rm -rf /boot.bak


duelle 08-23-2007 03:33 PM

if /boot isn't mounted, the directory /boot is empty
 
Hi,

if /boot isn't mounted, the directory /boot exists, but it's empty.
So I think I did it the right way, did I?

Greetz
duelle

bulliver 08-23-2007 03:47 PM

Quote:

if /boot isn't mounted, the directory /boot exists, but it's empty.
So I think I did it the right way, did I?
That is as it should be, yes. So the problem is with your grub config.

Your entries should look like:
Code:

title 2.6.20
root (hd0,0)
kernel /vmlinuz-2.6.20-ck1 root=/dev/hda2

The "root (hd0,0)" line tells grub to look for kernels relative to the first partition of the first HDD. If you did _not_ have a separate '/boot' partition, and '/' was the first partition then you would use:

Code:

title 2.6.20
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-ck1 root=/dev/hda1

HTH

duelle 08-23-2007 04:03 PM

Ok,
so I have to change all grub.conf entries from /boot/<kernelimage> to /<kernelimage> ?

I didn't change the partitions or sth. else in partitioning and so on. How is it possible that this path changes?

Greetz
duelle

bulliver 08-23-2007 04:35 PM

Quote:

Ok,
so I have to change all grub.conf entries from /boot/<kernelimage> to /<kernelimage> ?
If your kernels are in /boot on a separate partition, yes.

Quote:

I didn't change the partitions or sth. else in partitioning and so on. How is it possible that this path changes?
I am not sure what you think has changed. Again, "root (hd0,0)" tells grub to look for kernels relative to the first partition of the the first HDD (ie: your '/boot' partition). When grub is running nothing is mounted, so "/boot/whatever" is not a valid path, as there is no "/boot", only the files located on (hd0,0) (/dev/hda1).

duelle 08-23-2007 04:48 PM

Change from /boot to /
 
The thing that changed is following:

Until yesterday everything worked well with the /boot/<kernelimage> paths in grub.conf

After installing a new kernel the boot didn't work anymore...and I found out that it from then on only worked with /<kernelimage>
That's what changed...and I wonder how that could happen.

Greetz
duelle

duelle 08-24-2007 05:30 AM

Problem solved
 
At boot-time the /boot is seen as /.
So GRUB tried to find the Kernel-Images in /boot/boot/<kernelimage>
For some reason the Link from /boot to boot was missing.
You can add it easily with:

mount /boot
cd /boot
ln -s . boot

And all problems are gone ;)

Thank you all for the help!

Greetz
duelle


All times are GMT -5. The time now is 06:50 AM.