Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels (http://www.linux-archive.org/debian-kernel/375051-bug-582776-initramfs-tools-pointless-generation-initrd-initrd-free-custom-kernels.html)

Darren Salt 05-23-2010 02:26 PM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
Package: initramfs-tools
Version: 0.94.4

While installing a locally-built kernel (which doesn't require an initrd), I
found that /etc/kernel/postinst.d/initramfs-tools was nevertheless generating
an initrd for that kernel.

This causes breakage here. I'm using lilo and a slightly-modified
version of the example symlink_hook script provided by kernel-package; if an
initrd is present, the symlink name is different. (I'm using the symlinks so
that I don't have to edit lilo.conf.)

(I also have a stock kernel installed for occasional testing purposes.
Mostly, I just use my custom kernels.)

I find this sufficient to handle packages generated by kernel-package:

--- /etc/kernel/postinst.d/initramfs-tools~ 2010-04-08 04:53:09.000000000 +0100
+++ /etc/kernel/postinst.d/initramfs-tools 2010-05-23 15:06:44.114662432 +0100
@@ -11,6 +11,10 @@
if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then
bootdir=$(dirname "$2")
bootopt="-b ${bootdir}"
+ # check whether an initrd is needed
+ if ! grep -q '^CONFIG_BLK_DEV_INITRD=y$' /boot/config-"$1"; then
+ exit 0
+ fi
else
# official Debian linux-images take care themself
exit 0

--
| Darren Salt | linux at youmustbejoking | nr. Ashington, | Toon
| using Debian GNU/Linux | or ds ,demon,co,uk | Northumberland | back!
| + http://www.youmustbejoking.demon.co.uk/ & http://tartarus.org/ds/

If you cast your bread upon the waters, it will return soggy.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 512162B840%ds@youmustbejoking.demon.co.uk">http://lists.debian.org/512162B840%ds@youmustbejoking.demon.co.uk

Michael Prokop 06-08-2010 01:35 PM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
* Darren Salt <ds@youmustbejoking.demon.co.uk> [Son Mai 23, 2010 at 03:26:28 +0100]:

> While installing a locally-built kernel (which doesn't require an initrd), I
> found that /etc/kernel/postinst.d/initramfs-tools was nevertheless generating
> an initrd for that kernel.

> This causes breakage here. I'm using lilo and a slightly-modified
> version of the example symlink_hook script provided by kernel-package; if an
> initrd is present, the symlink name is different. (I'm using the symlinks so
> that I don't have to edit lilo.conf.)

> (I also have a stock kernel installed for occasional testing purposes.
> Mostly, I just use my custom kernels.)

> I find this sufficient to handle packages generated by kernel-package:

> --- /etc/kernel/postinst.d/initramfs-tools~ 2010-04-08 04:53:09.000000000 +0100
> +++ /etc/kernel/postinst.d/initramfs-tools 2010-05-23 15:06:44.114662432 +0100
> @@ -11,6 +11,10 @@
> if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then
> bootdir=$(dirname "$2")
> bootopt="-b ${bootdir}"
> + # check whether an initrd is needed
> + if ! grep -q '^CONFIG_BLK_DEV_INITRD=y$' /boot/config-"$1"; then
> + exit 0
> + fi
> else
> # official Debian linux-images take care themself
> exit 0

Looks fine to me.

maks, any objections against adding this patch? I'd take care of it.

regards,
-mika-

maximilian attems 06-09-2010 02:24 AM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
On Tue, Jun 08, 2010 at 03:35:36PM +0200, Michael Prokop wrote:
> * Darren Salt <ds@youmustbejoking.demon.co.uk> [Son Mai 23, 2010 at 03:26:28 +0100]:
>
> > While installing a locally-built kernel (which doesn't require an initrd), I
> > found that /etc/kernel/postinst.d/initramfs-tools was nevertheless generating
> > an initrd for that kernel.
>
> > This causes breakage here. I'm using lilo and a slightly-modified
> > version of the example symlink_hook script provided by kernel-package; if an
> > initrd is present, the symlink name is different. (I'm using the symlinks so
> > that I don't have to edit lilo.conf.)
>
> > (I also have a stock kernel installed for occasional testing purposes.
> > Mostly, I just use my custom kernels.)
>
> > I find this sufficient to handle packages generated by kernel-package:
>
> > --- /etc/kernel/postinst.d/initramfs-tools~ 2010-04-08 04:53:09.000000000 +0100
> > +++ /etc/kernel/postinst.d/initramfs-tools 2010-05-23 15:06:44.114662432 +0100
> > @@ -11,6 +11,10 @@
> > if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then
> > bootdir=$(dirname "$2")
> > bootopt="-b ${bootdir}"
> > + # check whether an initrd is needed
> > + if ! grep -q '^CONFIG_BLK_DEV_INITRD=y$' /boot/config-"$1"; then
> > + exit 0
> > + fi
> > else
> > # official Debian linux-images take care themself
> > exit 0
>
> Looks fine to me.
>
> maks, any objections against adding this patch? I'd take care of it.

yes wrong.

don't assume to look on /boot/config-version for respective image.
didn't see better idea here so close.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100609022442.GC18484@baikonur.stro.at">http://lists.debian.org/20100609022442.GC18484@baikonur.stro.at

Michael Prokop 06-09-2010 07:53 AM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
* maximilian attems <max@stro.at> [Mit Jun 09, 2010 at 04:24:42 +0200]:
> On Tue, Jun 08, 2010 at 03:35:36PM +0200, Michael Prokop wrote:
> > * Darren Salt <ds@youmustbejoking.demon.co.uk> [Son Mai 23, 2010 at 03:26:28 +0100]:

> > > While installing a locally-built kernel (which doesn't require an initrd), I
> > > found that /etc/kernel/postinst.d/initramfs-tools was nevertheless generating
> > > an initrd for that kernel.

> > > This causes breakage here. I'm using lilo and a slightly-modified
> > > version of the example symlink_hook script provided by kernel-package; if an
> > > initrd is present, the symlink name is different. (I'm using the symlinks so
> > > that I don't have to edit lilo.conf.)

[...]

> > Looks fine to me.

> > maks, any objections against adding this patch? I'd take care of it.

> yes wrong.

> don't assume to look on /boot/config-version for respective image.

Ok good point.

> didn't see better idea here so close.

How about giving people the chance to disable generation of initrds
through e.g. /etc/default/initramfs-tools?

regards,
-mika-

maximilian attems 06-19-2010 03:06 PM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
On Wed, 09 Jun 2010, Michael Prokop wrote:

> How about giving people the chance to disable generation of initrds
> through e.g. /etc/default/initramfs-tools?
>

well that would assume that you want *none* anywhere, which is often
not the case as you may very well have a "mixed" setup.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100619150627.GB24243@stro.at">http://lists.debian.org/20100619150627.GB24243@stro.at

Michael Prokop 06-21-2010 09:59 AM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
* maximilian attems <max@stro.at> [Sat Jun 19, 2010 at 05:06:27PM +0200]:
> On Wed, 09 Jun 2010, Michael Prokop wrote:

> > How about giving people the chance to disable generation of initrds
> > through e.g. /etc/default/initramfs-tools?

> well that would assume that you want *none* anywhere, which is often
> not the case as you may very well have a "mixed" setup.

Good point, thanks.

What about a configuration variable to completely disable it (as
mentioned above) and another one to white- or blacklist specific
kernels?

regards,
-mika-

maximilian attems 06-21-2010 10:10 PM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
On Mon, 21 Jun 2010, Michael Prokop wrote:

> What about a configuration variable to completely disable it (as
> mentioned above) and another one to white- or blacklist specific
> kernels?

well we could have one that can be tristate all, none, version_list?



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100621221055.GB7820@stro.at">http://lists.debian.org/20100621221055.GB7820@stro.at

Michael Prokop 06-21-2010 10:23 PM

Bug#582776: initramfs-tools: pointless generation of an initrd for initrd-free custom kernels
 
* maximilian attems <max@stro.at> [Tue Jun 22, 2010 at 12:10:55AM +0200]:
> On Mon, 21 Jun 2010, Michael Prokop wrote:

> > What about a configuration variable to completely disable it (as
> > mentioned above) and another one to white- or blacklist specific
> > kernels?

> well we could have one that can be tristate all, none, version_list?

Yeah, I didn't want to go to far into design detail, but if you
agree that the issue should be considered implementing overall I
think we should add it to our todolist.

regards,
-mika-


All times are GMT. The time now is 04:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.