Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #59978 > unrolled thread
| Started by | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| First post | 2018-01-14 18:10 +0100 |
| Last post | 2019-03-04 03:40 +0100 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.debian.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Bug#887159: initramfs-tools can use busybox as complete replacement for klibc Ben Hutchings <ben@decadent.org.uk> - 2018-01-14 18:10 +0100
Processed: Re: initramfs-tools can use busybox as complete replacement for klibc "Debian Bug Tracking System" <owner@bugs.debian.org> - 2019-02-06 20:10 +0100
Bug#887159: initramfs-tools can use busybox as complete replacement for klibc Ben Hutchings <ben@decadent.org.uk> - 2019-02-06 20:10 +0100
Bug#887159: Peto Mica <micapeto12@gmail.com> - 2019-03-04 03:30 +0100
Bug#887159: Peto Mica <micapeto12@gmail.com> - 2019-03-04 03:40 +0100
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2018-01-14 18:10 +0100 |
| Subject | Bug#887159: initramfs-tools can use busybox as complete replacement for klibc |
| Message-ID | <v7TXb-6cX-1@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Source: initramfs-tools
Version: 0.130
Severity: wishlist
On Sun, 2018-01-14 at 17:03 +0100, Denys Vlasenko wrote:
> On Wed, Aug 23, 2017 at 2:43 AM, Ben Hutchings <ben@decadent.org.uk> wrote:
> > > > > > On Mon, 2017-08-14 at 16:42 +0200, Denys Vlasenko wrote:
> > > > > > > > > run-init
> > > > > > >
> > > > > > > This tool is doing this:
> > > > > >
> > > > > > [...]
> > > > > > > There is the "switch_root" tool in util-linux which does the
> > > > > > > crucial part of this functionality - deleting / remounting /
> > > > > > > chrooting.
> > > > > > > It is in bbox too.
> > > > > >
> > > > > > initramfs-tools used to use switch_root if possible, but it
> > > > > > didn't
> > > > > > support the -d (drop capabilities) option. Later on we needed
> > > > > > validation of the init filename to support symlinks (e.g.
> > > > > > /sbin/init ->
> > > > > > /lib/systemd/systemd), so I added and used the -n (dry run)
> > > > > > option to
> > > > > > run-init. busybox would need to support both of these.
> > > > >
> > > > > I added run-init to busybox just now, but I don't see -n option
> > > > > in
> > > > > klibc-2.0.4 source. Can you point me to the source code with -n?
> > > >
> > > > It's not upstream yet, but in a Debian patch:
> > > > https://sources.debian.net/src/klibc/2.0.4-9/debian/patches/run-ini
> > > > t-add-dry-run-mode.patch/
> > >
> > > Done:
> > >
> > > $ ./busybox run-init
> > > BusyBox v1.28.0.git (2017-08-21 18:55:09 CEST) multi-call binary.
> > >
> > > Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT
> > > NEW_INIT [ARGS]
> > >
> > > Free initramfs and switch to another root fs:
> > > chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
> > > execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.
> > >
> > > -c DEV Reopen stdio to DEV after switch
> > > -d CAPS Drop capabilities
> > > -n Dry run
> >
> > Great. Once these changes are in the Debian package, I can update
> > initramfs-tools to make klibc-utils optional.
>
> busybox 1.28.0 is released, it contains the addition of run-init.
Thanks. I'm opening a bug for this so I don't forget about it.
Ben.
--
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert Coveyou
[toc] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2019-02-06 20:10 +0100 |
| Subject | Processed: Re: initramfs-tools can use busybox as complete replacement for klibc |
| Message-ID | <xoAK6-8aL-15@gated-at.bofh.it> |
| In reply to | #59978 |
Processing control commands: > block -1 with 921556 Bug #887159 [src:initramfs-tools] initramfs-tools can use busybox as complete replacement for klibc 887159 was not blocked by any bugs. 887159 was not blocking any bugs. Added blocking bug(s) of 887159: 921556 -- 887159: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887159 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2019-02-06 20:10 +0100 |
| Message-ID | <xoAK5-8aL-5@gated-at.bofh.it> |
| In reply to | #59978 |
[Multipart message — attachments visible in raw view] — view raw
Control: block -1 with 921556
Currently an initramfs built with both busybox and klibc-utils
installed has these executables in /bin from klibc-utils:
chroot losetup pivot_root run-init
fstype minips poweroff
halt nfsmount reboot
ipconfig nuke resume
Several of these are already redundant with the busybox versions
installed in /sbin:
chroot losetup poweroff
halt pivot_r
oot reboot
The next upload of klibc will stop installing these commands when they
are redundant.
As Denys said, busybox 1.28.0 added replacements for some commands
which we can enable when we update the busybox package:
ipconfig [CONFIG_IPCONFIG]
nuke [CONFIG_NUKE]
resume [CONFIG_RESUME]
run-init [CONFIG_RUN_INIT]
I opened bug #921540 for the new upstream version and bug #921556 for
the configuration change.
That still leaves these without a drop-in replacement in busybox:
fstype might be replaceable with blkid
minips not needed by initramfs-tools, but used by live-boot
because busybox ps does not support "h" or "-C" options
nfsmount should be replaceable with mount
Ben.
--
Ben Hutchings
Man invented language to satisfy his deep need to complain.
- Lily Tomlin
[toc] | [prev] | [next] | [standalone]
| From | Peto Mica <micapeto12@gmail.com> |
|---|---|
| Date | 2019-03-04 03:30 +0100 |
| Subject | Bug#887159: |
| Message-ID | <xxLwB-3Rv-1@gated-at.bofh.it> |
| In reply to | #59978 |
[Multipart message — attachments visible in raw view] — view raw
petomica@azet.sk
[toc] | [prev] | [next] | [standalone]
| From | Peto Mica <micapeto12@gmail.com> |
|---|---|
| Date | 2019-03-04 03:40 +0100 |
| Subject | Bug#887159: |
| Message-ID | <xxLGh-3UE-1@gated-at.bofh.it> |
| In reply to | #59978 |
[Multipart message — attachments visible in raw view] — view raw
petomica@azet.sk
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web