Install clefos 7.5 (an open source version of RHEL 7.5 s390x) using qemu

回复
admin
网站管理员
帖子: 13
注册时间: 周四 3月 15, 2018 3:56 pm
来自: 广东深圳
联系:

Install clefos 7.5 (an open source version of RHEL 7.5 s390x) using qemu

帖子 admin » 周五 9月 07, 2018 10:21 pm

RHEL 7.5 for s390x is a commercial software, I can't get it. But I found the latest derivative open source version of clefos 7.5 for CentOS 7.5.1804. Can be downloaded to this place:
Https://www.sinenomine.net/products/linux/clefos
The latest version of the ISO file 75os.iso can be downloaded from the above address.
Next, how to install clefos 7.5 through qemu
First, you need to compile the latest version of qemu 3.0.0
# xz -d qemu-3.0.0.tar.xz
# tar -xvf qemu-3.0.0.tar
# cd qemu-3.0.0
# ./configure --prefix=/usr/local/qemu --target-list=s390x-softmmu,s390x-linux-user
# make -j8
# make install
Next, we need to download Fedora-Server-dvd-s390x-28-1.1.iso, the reason why we download it is because kernel.img and initrd.img in 75os.iso can't use qemu for boot installation. We have to copy the inside of Fedora-Server-dvd-s390x-28-1.1.iso
Kernel.img and initrd.img act as qemu boot installation files.
# mkdir -p /data/vm/linux_s390x
# mount -t iso9660 -o loop Fedora-Server-dvd-s390x-28-1.1.iso /mnt
# cd /mnt/images
# cp kernel.img /data/vm/linux_s390x
# cp initrd.img /data/vm/linux_s390x
# cd /data/vm/linux_s390x
# umount /mnt
# /usr/local/qemu/bin/qemu-img create -f qcow2 clefos_7_5.img 60G
Write the startup qemu installation script
# cat install_clefos_7_5_s390x.sh
#!/bin/bash
/usr/local/qemu/bin/qemu-system-s390x -M s390-ccw-virtio -smp 2 -m 4G --nographic --device virtio-scsi --drive file=/iso/75os.iso,format= Raw,if=none,id=c1 --device scsi-cd,drive=c1 --hda clefos_7_5.img --kernel kernel.img --initrd initrd.img -net nic -net tap,ifname=tap17

# chmod 755 install_clefos_7_5_s390x.sh
Run the installation script to install
# sh install_clefos_7_5_s390x.sh
Post-installation startup script
# cat start_clefos_7_5_s390x.sh
#!/bin/bash
# test
/usr/local/qemu/bin/qemu-system-s390x -M s390-ccw-virtio -smp 2 -m 4G --nographic \
--hda clefos_7_5.img --kernel kernel.img --initrd initrd.img -append "root=/dev/vda3" \
-net nic -net tap,ifname=tap17
关于 Google 翻译社区移动
Google

回复