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


Groups > linux.debian.maint.boot > #55962

Re: Busybox in Debian

From Denys Vlasenko <vda.linux@googlemail.com>
Newsgroups linux.debian.maint.boot
Subject Re: Busybox in Debian
Date 2018-01-14 17:30 +0100
Message-ID <v7Tkx-5GZ-7@gated-at.bofh.it> (permalink)
References (8 earlier) <uepjP-5KP-1@gated-at.bofh.it> <ugZ9v-7pX-21@gated-at.bofh.it> <ugZMf-7RS-17@gated-at.bofh.it> <uhdcu-8mO-21@gated-at.bofh.it> <uhs1Q-1Lo-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.debian.maint.boot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Busybox in Debian Chris Boot <bootc@debian.org> - 2017-08-11 19:10 +0200
  Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-11 20:40 +0200
    Re: Busybox in Debian Chris Boot <bootc@debian.org> - 2017-08-11 21:00 +0200
      Re: Busybox in Debian Ben Hutchings <ben@decadent.org.uk> - 2017-08-12 16:20 +0200
        Re: Busybox in Debian Ben Hutchings <ben@decadent.org.uk> - 2017-08-14 15:10 +0200
          Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-14 15:50 +0200
            Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-14 17:10 +0200
              Re: Busybox in Debian Ben Hutchings <ben@decadent.org.uk> - 2017-08-14 17:20 +0200
                Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-18 21:10 +0200
                Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-21 20:00 +0200
                Re: Busybox in Debian Ben Hutchings <ben@decadent.org.uk> - 2017-08-21 20:40 +0200
                Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-22 11:00 +0200
                Re: Busybox in Debian Ben Hutchings <ben@decadent.org.uk> - 2017-08-23 02:50 +0200
                Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-23 15:00 +0200
                Re: Busybox in Debian Ben Hutchings <ben@decadent.org.uk> - 2017-08-26 02:20 +0200
                Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2018-01-14 17:30 +0100
        Re: Busybox in Debian Denys Vlasenko <vda.linux@googlemail.com> - 2017-08-14 15:20 +0200

csiph-web