Kernel in subdir of /boot
Hello, new debian user here having recently moved from Gentoo.
Currently trying to get a dual boot of Debian and Gentoo going and have decided that Id'e like my kernels to be in subdirs of /boot. Code:
thorpe@oblivion ~ # ls -l /boot Code:
thorpe@oblivion ~ # ls -l /boot/debian/ Code:
lrwxrwxrwx 1 root root 35 2008-01-05 13:30 initrd.img -> /boot/debian/initrd.img-2.6.18-4-686 Code:
title Debian GNU/Linux, kernel 2.6.18-4-686 Code:
thorpe@oblivion /boot/debian # apt-get upgrade |
Make a sym-link from where the script expects the image to be (in /boot) to where it actually is (in /boot/debian). Should be a breeze for you as Gentoo-ist ;)
|
Sure, I could do that but it kind of defeats the purpose of trying to keep my /boot directory uncluttered.
I've found a file, /etc/kernel-img.conf that would appear to be usefull in this situation. But looking at the man page related to it still leaves me unclear on which directive I need to change. I've managed to fix the update error simply by uninstalling 2.6.18-5. Somehow I had installed it into my /boot dir when my boot partition was not mounted. I now have my boot directory mounting to /boot on startup so that error wont happen again. I'm still however looking for a solution that will enable me to keep my kernel image in a sub dir of /boot Anyone? |
You have only two choices that I can think of:
1. Links 2. Change every application / config file that looks for the kernel files I am curious why you would need to go to all this trouble. |
Quote:
Are you people telling me there is no easy way for this to be done? Seems a simple request. |
Ok, after a bit more investigating of the /etc/kernel-img.conf file it would appear that adding....
Code:
move_image = YES I guess I was just being lazy. |
Nope, that doesn't appear to work either. I'm sure thats the behavour kernel-img.conf(5) describes.
With /etc/kernel-img.conf changed as above I end up with all the *5-686 files in /boot and my vmlinuz and initrd.img links in /boot/debian pointing back toward /boot. There has to be a way. Has anyone got any ideas why this isn't working and if so, how it can be done? Thankyou. |
Quote:
From the above, i understand you are trying to use one /boot partition for multiple OSes. Two points: 1. It is not necessary to have a separate /boot partition. 2. If it is separate, it can be very small (typically 100MB), and there is no real benefit in trying to share it with multiple OSes Bottom line: The way to have separate directories for the kernel(s) is by having separate /boot directories---regardless of whether /boot is a separate partition. |
Quote:
Quote:
|
You only need one /boot/grub/menu.lst regardless. In fact you can only have one which is acitve. When GRUB is installed, it gets "hard-coded" to point to the partition where it will find /boot/grub/menu.lst. No other instances/versions of that file will have any meaning.
|
Yeah, I know that. Thats why it seems easiest to me to store all the kernels in the same /boot drive along with the /boot/grub/menu.lst file. Dont your grub entries need to be referenced in relation to that /boot. eg; My current /boot/grub/menu.lst file looks like...
Code:
default 2 Anyway, thats not really what I want to do. As you can see, I have several distros, all which are quite happy to have there kernel in a subdirectory. Even Debian is quite happy to have it in a subdirectory. The problem is, when I upgrade or reinstall the kernal I need to manually move it. |
Quote:
As I think about it, I don't think there ever has to be a directory named "boot". i.e. all that is required is that the combo of the root and later statements gets you to where the files are. |
Quote:
|
If you really meant /root (not / ), then it would be:
root (hd0,4) kernel /root/vmlinuz....etc. If you meant /, then root (hd0,4) kernel vmlinux...etc Note that---to help keep us confused---there are a minimum of three usages of "root": 1. the name of the "superuser" (whose home directory is named /root) 2. / = the root of the filesystem tree 3. GRUB's root which is defined as I posted earlier |
Yes, I blatantly said /root.
So then, given that last post. if I wanted to move all my kernels for each OS into there own /boot directory within the systems / directory I could use the following? Code:
title Arch |
All times are GMT -5. The time now is 05:49 PM. |