[Voyage-linux] Rebuilding Kernel and Distribution
Kim-man 'Punky' TSE
(spam-protected)
Mon Feb 14 16:01:04 HKT 2011
Hi Lee,
It seems kernel-package in squeeze remove the symlink of kernel:
http://packages.debian.org/changelogs/pool/main/k/kernel-package/kernel-package_12.036+nmu1/changelog#versionversion12.001
Moreover, custom kernel seems need a INITRD="YES" environment variable set in order to generate initrd image when
install a kernel deb. But I am not sure how to pass this in debian live conf.
So right now I add a new 098-kernel hook script, which reconfigure the kernel that would trigger the generation of
initrd and symlink. The symlink hook is resided in config/chroot_local-includes/etc/kernel/postinst.d/
Please try if it works for you.
Regards,
Punky
On 2/13/2011 2:28 PM, Lee Woldanski wrote:
> So this seems to be a working solution:
>
> diff -ruB ./voyage-live/config/chroot_local-hooks/099-voyage
> ./voyage-live-mod/config/chroot_local-hooks/099-voyage
> --- ./voyage-live/config/chroot_local-hooks/099-voyage 2011-02-12
> 22:24:41.000000000 -0800
> +++ ./voyage-live-mod/config/chroot_local-hooks/099-voyage
> 2011-02-12 22:23:40.000000000 -0800
> @@ -11,9 +11,13 @@
>
> echo "($0)"
>
> -for K in `ls /lib/modules/ `; do
> - update-initramfs -c -k $K
> -done
> +if [ ! -f /boot/initrd.img-* ]; then
> + for K in `ls /lib/modules/ `; do
> + update-initramfs -c -k $K
> + ln -s /boot/initrd.img-$K /initrd.img
> + ln -s /boot/vmlinuz-$K /vmlinuz
> + done
> +fi
>
> if [ $(dpkg-query --show | cut -f1 | grep "^gcc$" | wc -l) -gt 0 ] ; then
> echo "($0) Building Voyage SDK. No purging."
>
>
> Without the test to see of there already is an initrd.img a build
> using the stock Voyage 2.6.32 kernel package fails (since it has an
> initrd.img already built).
>
> This patch checks for the existence of an initrd.img, if it does not
> find one, it runs update-initramfs to create one and puts the
> appropriate symlinks in / to keep the rest of the scripts happy
> without requiring further modification.
>
> With this patch I have been able to take a vanilla 2.6.37 kernel from
> kernel.org, patch it for aufs support (required), build a 2.6.37
> image.deb, and rebuild a Voyage distro (img) with the latest kernel.
> The resulting img boots in live mode properly, installs to a hard
> disk, and reboots properly. Yay!
>
>
> Thanks!
>
>
> Lee
>
--
Regards,
Punky
Voyage Solutions (http://solution.voyage.hk)
* Embedded Solutions and Systems
- Mesh Networking, Captive Portal, IP Surveillance, VoIP/PBX
- Network Engineering, Development Platform and Consultation
More information about the Voyage-linux
mailing list