各大云厂商提供了种类繁多的系统镜像,但唯独这个小巧可爱的Alpine无人问津。不过也难不倒咱们这些具有折腾精神的极客们。
1、重置为Debian10
系统,通过VNC/Console
登录控制台
2、设置为从AlpineLinux
内核启动系统
mkdir -p /netboot && cd /netboot
rgeo=`wget -qO- http://myip.rpc.im/country_code`
if [ "$rgeo" == "CN" ]; then
repo=https://mirrors.tuna.tsinghua.edu.cn/alpine/edge
else
repo=https://dl-cdn.alpinelinux.org/alpine/edge
fi
wget $repo/releases/x86_64/netboot/vmlinuz-virt
wget $repo/releases/x86_64/netboot/initramfs-virt
modl=$repo/releases/x86_64/netboot/modloop-virt
cat >> /etc/grub.d/40_custom <<EOF
menuentry "Alpine Linux Minimal" {
search --set=root --file /netboot/vmlinuz-virt
linux /netboot/vmlinuz-virt console=tty0 console=ttyS0,115200 ip=dhcp modloop=$modl alpine_repo=$repo/main/
initrd /netboot/initramfs-virt
}
EOF
sed -i 's/GRUB_DEFAULT=0/GRUB_DEFAULT="Alpine Linux Minimal"/' /etc/default/grub
update-grub
reboot
2、执行安装脚本,接下来就需要看你自己的啦~
modprobe ext4
setup-alpine
sed -i 's/dl-cdn.alpinelinux.org/mirrors.nju.edu.cn/g' /etc/apk/repositories