[PATCH compass-ci 2/2] tutorial.md: update initramfs tutorial.md

Signed-off-by: Wang Chenglong <18509160991@163.com> --- doc/tutorial.md | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/doc/tutorial.md b/doc/tutorial.md index 39d62e1..96d4e32 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -146,6 +146,114 @@ job yaml ���������������������������������������������[YAML](http://yaml.org/YAM ### ������ OS ������ +������������ initramfs ��������� cgz ������������������������������������������������������ cgz ��������������� rootfs������������������������������������������������������������������������������������������������ + +#### ������������ + + 1. ������������ os ��������� rootfs������ openEuler ��������� + - ������ docker ������ rootfs + + 1) ������ openEuler ��������������� docker ��������������� + + ```bash + wget https://repo.openeuler.org/openEuler-20.03-LTS/docker_img/aarch64/openEuler-... + ``` + 2) ������ docker ������ + ```bash + docker load -i openEuler-docker.aarch64 + ``` + + 3) ������ openEuler ������ + ```bash + docker run -d --name initramfs-docker openeuler-20.03-lts + ``` + 4) ������ docker ��� rootfs + ```bash + docker cp -a initramfs-docker:/ openEuler-rootfs/ + ``` + + {compass-ci} ������������������������ '.tar.xz' ��������� docker ������������������ rootfs ������������ + ```bash + ./{compass-ci}/container/docker-rootfs/run openEuler-docker.aarch64.tar.xz /tmp/openeuler-rootfs-20.03 + ``` + + - ������ qemu.img(qcow2������)������ rootfs (openEuler������) + + 1) ������ openEuler ��������������������� qcow2 ������������ + ```bash + wget https://repo.openeuler.org/openEuler-20.03-LTS/virtual_machine_img/aarch64/o... + ``` + 2) ������{compass-ci}/container/qcow2rootfs ������rootfs + ```bash + cd {compass-ci}/container/qcow2rootfs + ./run openEuler-20.03-LTS.aarch64.qcow2.xz /tmp/openEuler-rootfs + ``` + + 2. ������rootfs + 1. ������ chroot ��������������� rootfs (��������������� root ������) + ```bash + chroot openEuler-rootfs + ``` + 2. ��������������������������������������� + + a. ������ root ������ + b. ��������������� /sbin/init + > ���������������systemd������������ + ```bash + ls -l /sbin/init + /sbin/init -> ../lib/systemd/systemd + ``` + c. ������������ docker ������ osimage ��������������������� + > ������ docker ������������������ /.dockerenv + d. ������������������ + > openssh-server (ssh ������������������) + > ntpdate (������������) + > cifs-utils (cifs���������������������) + > nfs-utils (nfs���������������������) + > curl (���������url������) + ```bash + yum -y install openssh-server ntpdate cifs-utils nfs-utils curl + ``` + e. ������������ docker ������ osimage ������������������������ + > ������ docker ������������������ /.dockerenv + + 3. ������rootfs + ```bash + cd $rootfs + find . | coip -o -Hnewc |gzip -9 > $os_name.cgz + ``` + + 4. ������������������/������������ + ������������������ {compass-ci} ��������������������������� ��������� rootfs ������������������������������������������������������/��������������������������� + ```bash + find /lib/modules/* | cpio -o -Hnewc | gzip -9 > /modules-$os_name.cgz + find /usr/src/kernels/* | cpio -o -Hnewc | gzip -9 > /headers-$os_name.cgz + ``` + +#### FAQ +1. ������������ ���Unable to mount root fs on unknown-block��� + - ������������ + ```bash + [ 0.390437] List of all partitions: + [ 0.390806] No filesystem could mount root, tried: + [ 0.391489] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) + ... + [ 0.399404] Memory Limit: none + [ 0.399749] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]--- + ``` + - ������������ + + 1������������������������������������������������ + 2������������������������������������ 644 ��������� + +2. ������������������ + + - ������������ + + ������������������������������������������������ + - ������������ + + ��������������������������������� rootfs ��������������� ### ������������������ -- 2.23.0
participants (2)
-
Wang Chenglong
-
Wu Fengguang