Can't install deb kernel in chroot environment
I know this use to work in Debian Etch but it is not working in Lenny.
So I am trying to install a kernel image (after custom compiling) on a exisiting Debian Lenny installation which is on a hard drive partition (/dev/hda5). Here is what I am doing as "root" from a current Debian installation (on /dev/hda1) that I have booted off :
# uname -a
Linux debian 2.6.32-8-test #1 PREEMPT Fri Mar 5 02:59:48 UTC 2010 i586 GNU/Linux
# mount /dev/hda5 /mnt
# chroot /mnt
# mount -t proc none /proc
# cd root
# dpkg -i linux-image-2.6.30-8-bpo50-test_2.6.30-8-bpo50-test-10.00.Custom_i386.deb
Selecting previously deselected package linux-image-2.6.30-8-bpo50-test.
(Reading database ... 11327 files and directories currently installed.)
Unpacking linux-image-2.6.30-8-bpo50-test (from linux-image-2.6.30-8-bpo50-test_2.6.30-8-bpo50-test-10.00.Custom_i386.deb) ...
Done.
Setting up linux-image-2.6.30-8-bpo50-test (2.6.30-8-bpo50-test-10.00.Custom) ...
Hmm. There is a symbolic link /lib/modules/2.6.30-8-bpo50-test/build
However, I can not read it: No such file or directory
Therefore, I am deleting /lib/modules/2.6.30-8-bpo50-test/build
Hmm. The package shipped with a symbolic link /lib/modules/2.6.30-8-bpo50-test/source
However, I can not read the target: No such file or directory
Therefore, I am deleting /lib/modules/2.6.30-8-bpo50-test/source
Running depmod.
Running postinst hook script update-grub.
Searching for GRUB installation directory ... found: /boot/grub
User postinst hook script [update-grub] exited with value 1
dpkg: error processing linux-image-2.6.30-8-bpo50-test (--install):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-2.6.30-8-bpo50-test
#
Why is dpkg giving me errors? What did I miss?
Note that the kernel that I am trying to install is suppose to boot without initrd. I have installed this kernel on /dev/hda1 without any problems and I am booting just fine from it.
Thanks
Reply to: