Running the Alpine Linux Sample #147
-
Hi, I am trying to run the Alpine Linux instance from the release page: https://github.com/jart/blink/releases/tag/1.0.0 The path I followed: $ wget https://github.com/jart/blink/releases/download/1.0.0/blink-1.0-linux-x86_64.elf.gz
$ tar axf blink-1.0-linux-x86_64.elf.gz
# ...
$ wget https://dl-cdn.alpinelinux.org/alpine/v3.17/releases/x86_64/alpine-minirootfs-3.17.2-x86_64.tar.gz
$ tar axf alpine-minirootfs-3.17.2-x86_64.tar.gz -C alpine
$ ls
alpine alpine-minirootfs-3.17.2-x86_64.tar.gz blink*
$ PATH='/bin:/usr/bin' PS1='$?> ' ./blink -C ./alpine bash
./blink: command not found: bash |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Maybe you can try it like this, by calling the sh command through the busybox program $ blink -C alpine /bin/busybox sh |
Beta Was this translation helpful? Give feedback.
-
As far as I know, there are at least two ways to chroot into a Linux rootfs with Blink with VFS featureThe new VFS feature of More info can be found here. cd ~
git clone https://github.com/jart/blink.git
# build blink with VFS feature
cd blink
./configure --enable-vfs
make -j4
make install
cd ~
wget https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-minirootfs-3.19.0-x86_64.tar.gz
tar xzvf alpine-minirootfs-3.19.0-x86_64.tar.gz --one-top-level=alpine
blink -C alpine/ /bin/busybox sh -l Blink without VFS featureA more traditional way. The main idea is to compile The cd ~
git clone https://github.com/jart/blink.git
# build blink without VFS feature
cd blink
./configure --static
make -j4
make install
cd ~
wget https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-minirootfs-3.19.0-x86_64.tar.gz
tar xzvf alpine-minirootfs-3.19.0-x86_64.tar.gz --one-top-level=alpine
cp /usr/local/bin/blink alpine/bin
chroot alpine/ /bin/blink /bin/sh -l Hope it can help! |
Beta Was this translation helpful? Give feedback.
As far as I know, there are at least two ways to chroot into a Linux rootfs with
blink
. I have tried them out on myCygwin 3.4.9-1.x86_64
.Blink with VFS feature
The new VFS feature of
blink
is documented inREADME.md
since #115. Built with this feature,blink -C rootfs
can correctly handle the absolute symlinks in your rootfs (typically those under therootfs/bin/
directory when busybox is used). Also,blink
will take care of the new/dev/
and/proc/
directory after your chroot-ing to the rootfs.More info can be found here.