Jump to content

[SOLVED] Moving kernel to sub dir of /boot (Debian)


trq

Recommended Posts

This is getting pretty frustrating. I run several distro's on this main machine of mine. Gentoo, Arch, a custom built LFS and now Debian. This is the last of my machines that I'm hoping to move over to using debian full time, though Id'e like to have the others there to play with.

 

Anyways, to keep my /boot partition in clean order I would nromally store my kernels and relevent files within a sub dir of /boot. So my /boot looks like...

 

thorpe@oblivion ~ # ls -l /boot
total 112
drwxr-xr-x 2 root root  4096 2007-05-11 10:10 arch/
lrwxrwxrwx 1 root root     1 2007-05-03 12:06 boot -> ./
drwxr-xr-x 2 root root  4096 2008-01-06 21:24 debian/
drwxr-xr-x 4 root root  4096 2007-05-03 13:14 gentoo/
drwxr-xr-x 2 root root  4096 2008-01-06 21:25 grub/
drwx------ 2 root root  4096 2007-07-24 21:53 lost+found/
-rw-r--r-- 1 root root 82944 2007-05-03 12:14 message
drwxr-xr-x 2 root root  4096 2007-05-30 09:22 tsp/

 

Problem is, everytime I upgrade the kernel in Debain (first time today but Ive done it several times now trying to fix this issue), it dumps the kernel into /boot.

 

Ive found what seems to be the relevent configuration file (/etc/kernel-img.conf) and have made what I consider (after reading the man) to be the appropriate changes.

 

thorpe@oblivion ~ # cat /etc/kernel-img.conf 
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = no
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
postinst_hook = update-grub
postrm_hook   = update-grub
move_image = yes
image_dest = /boot/debian

 

However, its still not working. Anytime I install a new kernel it ends up in /boot and I have to manually move it and reconfigure grub to find it.

 

I can't rememeber how this is handled by the Arch distro, its been a few months since Ive booted it, but I don't recall having an issue. And of course Gentoo and my custom LFS all handle this manually anyway, so theres never any issues with this sort of thing.

 

Anyone got any ideas? Is the /etc/kernel-img.conf file where I should be looking? It would seem as though it is simply ignored excepting the do_symlinks directive was also changed by me and it did work.

Link to comment
Share on other sites

Nevermind. I ended up going with what is probably a better solution anyway.

 

Each distro retians its own /boot directory within / and I have left my grub configuration within a small (100mg) partition which is mounted within each distros /etc/grub directory. Ive even made a symlink as /etc/grub.conf pointing to /etc/grub/grub/menu.lst.

 

This keeps all the different kernels nicely away from each other while still giving me the flexablility I wanted.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.