[PATCH] installkernel: support for initramfs and update-grub

Manoj Srivastava srivasta at debian.org
Sat Jul 11 05:17:22 UTC 2009


Hi,
On Fri, Jul 10 2009, Luis R. Rodriguez wrote:

> This makes the installkernel script build the initramfs
> and call update-grub accordingly using 'lsb_release -i -s' to
> determine the distribution. Debian or any other Debian
> based distribution can add its own entry once someone maps
> it out, provided the lsb id tag changes.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof at gmail.com>
> ---
>
> I don't think the debianutils package is always installed but
> having this simple script around helps when building kernels.
> Is debianutils the right place for it? Can we get Ubuntu
> to always just ship it? If so what package should it be
> part of? How about Debian? At the very least I expect
> this to be available when users want to build kernels.
>
>  installkernel |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/installkernel b/installkernel
> index cbb4444..09eced2 100644
> --- a/installkernel
> +++ b/installkernel
> @@ -75,5 +75,16 @@ config="${config}/.config"
>  if [ -f "$config" ] ; then
>   updatever config "$config"
>  fi
> +
> +LSB_RED_ID=$(/usr/bin/lsb_release -i -s)
> +
> +case $LSB_RED_ID in
> +"Ubuntu")
> +       mkinitramfs -o $dir/initrd.img-$ver $ver
> +       update-grub
> +       ;;
> +*)
> +       ;;
> +esac
>
>  exit 0
> --
> 1.6.2.2.446.gfbdc0

        NAK from the Debian upstream co-maintainer. This is firstly the
 wrong thing to do: installkernel should not assume that
  a) There is the need for an initramfs,
  b) The initramfs generator is not yaird,
  c) The bootloader is grub

        The best place to do the initramfs generation is in a wraper
 script, not in a script called by kernel Makefiles to install the
 kernel, and which is used by other infrastructure (kernel-package,
 though perhaps that has been dropped in Ubuntu).

        grub is still just x86, as far as I can tell. Installkernel is
 not. And initramfs is optional (none of my machines use it, just makes
 boots slower)

        manoj
-- 
To invent, you need a good imagination and a pile of junk. Thomas Edison
Manoj Srivastava <srivasta at debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C




More information about the Ubuntu-devel-discuss mailing list