Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #64188 > unrolled thread

Bug#929672: update-initramfs should clean the environment

Started byMarc Haber <mh+debian-packages@zugschlus.de>
First post2019-05-28 13:30 +0200
Last post2019-05-28 13:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.kernel


Contents

  Bug#929672: update-initramfs should clean the environment Marc Haber <mh+debian-packages@zugschlus.de> - 2019-05-28 13:30 +0200

#64188 — Bug#929672: update-initramfs should clean the environment

FromMarc Haber <mh+debian-packages@zugschlus.de>
Date2019-05-28 13:30 +0200
SubjectBug#929672: update-initramfs should clean the environment
Message-ID<y2IsN-1XJ-7@gated-at.bofh.it>
Package: initramfs-tools
Version: 0.133
Severity: wishlist

Hi,

update-initramfs should clean up the environment. Especially, the ROOT
variable should not be handed down to mkinitramfs.

I just spent two hours to get a host after a hostname and volume group
name change to boot again because the machine kept picking up the host
name over and over again. Reason was that I was rebuilding the initramfs
from the initramfs after chrooting into the actual system. All these
operations preserved the ROOT environment variable set to the wrong
name, which mkinitramfs kept picking up and writing it to the next
initramfs, repeat at libitum.

mkinitramfs takes whatever is in the ROOT environment variable as -r
option, hardcoding the value as ROOT. The least invasive fix would be to
zero out the environment variables that mkinitramfs parses its command
line into, compress, CONFDIR, outfile, keep, ROOT and verbose before the
parsing code, but it would probaby be a cleaner approach to only allow
the documented environment variables to stay in the environment passed
in from the (probably human) caller.

Greetings
Marc

[toc] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web