Skip to content

appmaker2apps/utm-ipa

Repository files navigation

ArchLinux-on-iPadOS(UTM App)

Install Guide 安装指南

创建 VM 虚拟机

1 Disk 和 CD

创建 arch.img 磁盘(Disk Image)

设置为 20480 MB(20 GB)

导入 archlinux.iso 镜像(CD/DVD Image)

导入下载好的 Arch Linux 镜像

2 设置内存

1024 MB

3 设置 CPU 核心数

2

4 设置启动选项

启动首先尝试从 cd/hdd 启动

5 进入虚拟机,安装系统

Arch Linux 安装

UTM 中的 Arch Linux 不是 UEFI 安装

# 查看 Linux 系统内核
uname -a
#
ifconfig
# ping 问题
# ping www.baidu.com 会卡住,原因是
cat /etc/resolv.conf
# # Generated by resolvconf
# nameserver 10.0.2.3
# 需要把 nameserver 修改为可用 ip 服务器
# live CD 里自带了 vi 和 Vim 编辑器可供使用
vim /etc/resolv.conf
# nameserver 8.8.8.8
# 修改后可以正常使用 ping baidu.com

1 设置系统时间在线校正

timedatectl set-ntp true
# 如果上述设置依然使虚拟机内的时间比东八区还快八小时,则使用下面的解决方案:
# 设置时区
ln -sf /usr/share/zoneinfo/Asia/Shanghai/etc/localtime
# 安装openNTPD: 
pacman -S openntpd
# 重启openNTPD: 
systemctl restart openntpd
# 设置开机启动: 
systemctl enable openntpd

2 查看磁盘并分区

# 查看磁盘
fdisk -l
# Disk /dev/sda 是我们创建的 arch.img磁盘
# Disk /dev/loop0 是我们导入的 Arch Linux 镜像
fdisk /dev/sda
# 输入 n 然后一路回车
# 回到 fdisk 交互界面后,输入 w 回车保存刚才的设置
# 再用 fdisk -l 检查一下,会发现多了一个 /dev/sda1
# 设置分区
mkfs.ext4 /dev/sda1

# 挂载分区
mount /dev.sda1 /mnt

# 将 China 镜像站复制一份到文件最前面,为下一步安装系统和软件加速
vim /etc/pacman.d/mirrorlist
# /China 搜索,yy 复制,gg 移动到文件最前面,p 粘贴

# 在 Live CD 上把系统安装到挂载的磁盘上
pacstrap /mnt base linux linux-firmware vim
# attr, acl gmp, libcap, gdbm, db, perl, openssl, coreutils,zlib……

3 生成 fstab 并切换到以 /mnt 为根的系统下

# fstab 是 Linux 挂载硬盘的设置,生成硬盘的挂载信息
genfstab -U /mnt >> /mnt/etc/fstab
# 切换到 /mnt 为根的系统下
arch-chroot /mnt

4 设置时区

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc

5 语言、网络、主机名、密码等设置

# 语言
touch /etc/locale.conf
vim /etc/locale.conf

# 网络
touch /etc/host
vim /etc/hosts
# 在 hosts 里按照官方说明添加信息
# 127.0.0.1  localhost
# ::1        localhsot
# 127.0.0.1  arch.localhost arch

# 主机名
touch /etc/hostname
vim /etc/hostname

# 密码
passwd

6 iPadOS 安装关键步骤

# 没有安装网络部件 dhcp,现在还不能重启进入安装在磁盘上的系统
# 需要先安装网络相关部件
# 安装 networkmanager
pacman -S networkmanager
# 安装 dhcp 客户端
pacman -S dhcpcd
# 安装 GRUB
pacman -S grub
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

# 非必要步骤:安装 net-tools 以使用 ifconfig 命令
pacman -S net-tools

7 退出安装,关机,进入 UTM 设置从硬盘启动,重新打开虚拟机

exit
shutdown now

默认用户:root 密码:之前设置的密码

8 联网等设置

# 设置网络接口的启动
ip link set ens4 up
# 启动 dhcp
systemctl start dhcpcd
systemctl enable dhcpcd
vim /etc/resolv.conf
# 设置 resolv.conf 不允许被覆盖
chattr +i /etc/resolv.conf

使用 Arch Linux

查看系统内核
uname -a
查看系统时间
uptime

参考资料

视频:黑影儿TV - 【硬核】把 iPad 变成万能虚拟机

网站:www.archlinux.org

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published