[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#866127: marked as done (initramfs-tools: Please allow fully disabling initramfs generation)



Your message dated Wed, 28 Jun 2017 17:17:14 +0200
with message-id <[🔎] CAG+KjmOZkXbniuWEBqb3dXYxbs_WxuoBc5Udq7WEEfqdUdaqFg@mail.gmail.com>
and subject line Re: Bug#866127: initramfs-tools: Please allow fully disabling initramfs generation
has caused the Debian Bug report #866127,
regarding initramfs-tools: Please allow fully disabling initramfs generation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
866127: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=866127
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.130
Severity: wishlist
Tags: patch

Hi,

Setting update_initramfs=no in update-initramfs.conf still triggers
initramfs creation on kernel updates.
While this generally makes sense some systems don't need initramfs to
boot and currently there is
no nice way of fully disabling initramfs generation.

The attached patch introduces update_initramfs=never which skips
initramfs generation even when the kernel is upgraded. Please consider
accepting it in a future upload.

Cheers,
Balint

--
Balint Reczey
Debian & Ubuntu Developer
From f603fdc05a27ed37b9f1e021a17cb9aecdeefab9 Mon Sep 17 00:00:00 2001
From: Balint Reczey <balint.reczey@canonical.com>
Date: Tue, 27 Jun 2017 16:58:38 +0200
Subject: [PATCH] Add setting to never update initramfs

---
 conf/update-initramfs.conf | 3 ++-
 update-initramfs           | 5 +++++
 update-initramfs.conf.5    | 3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/conf/update-initramfs.conf b/conf/update-initramfs.conf
index 31823e2..3f684e3 100644
--- a/conf/update-initramfs.conf
+++ b/conf/update-initramfs.conf
@@ -3,11 +3,12 @@
 #
 
 #
-# update_initramfs [ yes | all | no ]
+# update_initramfs [ yes | all | no | never ]
 #
 # Default is yes
 # If set to all update-initramfs will update all initramfs
 # If set to no disables any update to initramfs beside kernel upgrade
+# If set to never disables every update to initramfs including kernel upgrade
 
 update_initramfs=yes
 
diff --git a/update-initramfs b/update-initramfs
index 04145c5..9821a4d 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -415,6 +415,11 @@ if [ -z "${mode}" ]; then
 	usage "You must specify at least one of -c, -u, or -d."
 fi
 
+if [ "${update_initramfs}" = "never" ]; then
+	printf "Skipping initramfs generation due to setting update_initramfs=never.\n"
+	exit 0
+fi
+
 if [ "${version}" = "all" ] \
 	|| ( [ "${update_initramfs}" = "all" ] && [ -z "${version}" ] ); then
 	: FIXME check for --yes, and if not ask are you sure
diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5
index bd41132..86db0ca 100644
--- a/update-initramfs.conf.5
+++ b/update-initramfs.conf.5
@@ -15,7 +15,8 @@ newest Linux image.
 Setting it to \fIall\fP updates any known initramfs.
 It is possible to set it to \fIno\fP for remote servers or boxes where
 conservative manners needs to be applied. This disables
-the \fBupdate_initramfs \-u\fP call.
+the \fBupdate_initramfs \-u\fP call. Setting it to \fInever\fP disables updating initramfs completely. This may
+be useful on systems requiring no kernel modules.
 .TP
 \fB backup_initramfs
 If set \fBupdate_initramfs\fP keeps an .bak file of the previous initramfs. If unset the backup initramfs will not be kept.
-- 
2.11.0


--- End Message ---
--- Begin Message ---
Hi Ben,

On Tue, Jun 27, 2017 at 7:30 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> Control: tag -1 wontfix
>
> This is already allowed, and I don't think any new setting is needed.
>
> On Tue, 2017-06-27 at 17:56 +0200, Balint Reczey wrote:
>> Package: initramfs-tools
>> Version: 0.130
>> Severity: wishlist
>> Tags: patch
>>
>> Hi,
>>
>> Setting update_initramfs=no in update-initramfs.conf still triggers
>> initramfs creation on kernel updates.
>> While this generally makes sense some systems don't need initramfs to
>> boot and currently there is
>> no nice way of fully disabling initramfs generation.
>
> Debian's official kernel packages won't boot on any system without an
> initramfs.  That's why they depend on an initramfs generator.
>
>> The attached patch introduces update_initramfs=never which skips
>> initramfs generation even when the kernel is upgraded. Please consider
>> accepting it in a future upload.
>
> I already split initramfs-tools into two binary packages precisely so
> that you can have the tools installed without automatically building an
> initramfs for every installed kernel.  (Although that was actually done
> to allow coexistence with dracut.)
>
> Custom kernels that are meant to work without an initramfs should have
> CONFIG_BLK_DEV_INITRD disabled; then the postinst script generated by
> 'make deb-pkg' will set INITRD=No which effectively disables the
> initramfs-tools (and dracut) postinst hook.
>
> If Ubuntu's official kernel packages can boot without an initramfs on
> some systems, then the package relations should be changed so that they
> Recommend, rather than Depend-ing on, an initramfs generator.

Thanks, this is indeed the clean solution.

Cheers,
Balint

-- 
Balint Reczey
Debian & Ubuntu Developer

--- End Message ---

Reply to: