[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Chrooting into GuixSD
From: |
Ludovic Courtès |
Subject: |
Re: Chrooting into GuixSD |
Date: |
Sat, 16 Jun 2018 17:43:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi!
Thorsten Wilms <address@hidden> skribis:
> Well, I tried:
>
> cd /path/to/guixsd
> chroot . /run/current-system/profile/bin/bash
> source /etc/profile
> guile /run/current-system/boot
[...]
> In ./gnu/build/linux-boot.scm:
> 90:3 2 (linux-command-line)
> In ice-9/ports.scm:
> 439:11 1 (call-with-input-file "/proc/cmdline" #<procedure get-?> ?)
> In unknown file:
> 0 (open-file "/proc/cmdline" "r" #:encoding #f # #f)
>
> ERROR: In procedure open-file:
> In procedure open-file: No such file or directory: "/proc/cmdline"
> ---
>
> I _guess_ if I'd bind proc, I would then find out dev and sys has to
> be taken care of, too, leading back to what I had already.
Indeed. This is normally taken care of by the ‘init’ script that’s in
the initrd. A crude way to do that would be:
guile --no-auto-compile \
$(guix build $(guix gc -R $(guix gc --derivers $(readlink -f
/run/current-system/))|grep -e '-init\.drv$'))
The ‘guix’ commands won’t work initially in the chroot though.
Alternately, you could extract the initrd somewhere:
gunzip -c /target/run/current-system/initrd | cpio -iv
and run:
guile --no-auto-compile ./init
Then again we could also just arrange for ‘guix system build’ to include
an ‘enter’ script that would do everything needed to chroot into the
system. Food for thought…
Ludo’.
- Re: Chrooting into GuixSD, (continued)
- Re: Chrooting into GuixSD, Hartmut Goebel, 2018/06/13
- Re: Chrooting into GuixSD, Nils Gillmann, 2018/06/13
- Re: Chrooting into GuixSD, Thorsten Wilms, 2018/06/13
- Re: Chrooting into GuixSD, Nils Gillmann, 2018/06/14
- Re: Chrooting into GuixSD, Ricardo Wurmus, 2018/06/14
- Re: Chrooting into GuixSD, Oleg Pykhalov, 2018/06/14
- Re: Chrooting into GuixSD, Ricardo Wurmus, 2018/06/14
- Re: Chrooting into GuixSD, swedebugia, 2018/06/15
- Re: Chrooting into GuixSD, Ludovic Courtès, 2018/06/15
- Re: Chrooting into GuixSD, Thorsten Wilms, 2018/06/15
- Re: Chrooting into GuixSD,
Ludovic Courtès <=