Skip to content

Commit 972ca42

Browse files
authored
Merge pull request #87 from hackeris/vroot-readme
update README for qemu-vroot
2 parents 98feaaf + aacdf69 commit 972ca42

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,22 @@ Terminal features:
105105
For example, you can run into a alpine root-filesystem by following steps:
106106

107107
- Download alpine minimal root filesystem from https://alpinelinux.org/downloads/ (aarch64 or x64)
108-
- Extract downloaded rootfs tar.gz file, for example, to `/storage/Users/currentUser/alpine_rootfs`
108+
- Extract downloaded rootfs tar.gz file, for better compatibility, `/data/storage/el2/base/files/alpine_rootfs` is recommended.
109+
```shell
110+
mkdir -p /data/storage/el2/base/files/alpine_rootfs
111+
tar xvf alpine-minirootfs-3.22.0-aarch64.tar.gz -C /data/storage/el2/base/files/alpine_rootfs
112+
```
109113
- Run `qemu-vroot-aarch64` to load busybox shell with root-filesystem and environment variables (for root-filesystem on x86_64, use `qemu-vroot-x86_64`)
110114
```shell
111-
cd /storage/Users/currentUser/alpine_rootfs
112-
qemu-vroot-aarch64 -E LD_LIBRARY_PATH=/lib:/usr/lib -E PATH=/bin:/usr/bin:/sbin -L ./ ./bin/busybox sh
115+
cd /data/storage/el2/base/files/alpine_rootfs
116+
qemu-vroot-aarch64 -E PATH=/bin:/usr/bin:/sbin -E HOME=/root -L ./ ./bin/busybox sh -c 'cd && sh'
113117
```
114-
- cd to `/` and run `busybox ls`, the root has changed!
118+
- run `ls /`, the root has changed!
115119
```shell
116-
cd /
117-
busybox ls
120+
ls /
118121
bin dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var
119122
```
123+
- run `apk update`, the alpine package manager works fine, you can install packages by `apk`
120124

121125
## Usage (if you are a Mac user):
122126

0 commit comments

Comments
 (0)