2021年5月1日星期六

通过网络安装方式在腾讯云上安装openSUSE Tumbleweed

腾讯云轻量应用服务器现有的系统是Ubuntu 20.04,但腾讯云没有提供openSUSE的系统镜像,因此只好通过网络安装的方式安装新系统。

下载引导文件和内核

根据openSUSE Wiki上关于网络安装的方法,首先需要下载相应的引导文件和内核。

mkdir /boot/install
cd /boot/install
wget https://mirrors.tuna.tsinghua.edu.cn/opensuse/tumbleweed/repo/oss/boot/x86_64/loader/initrd
wget https://mirrors.tuna.tsinghua.edu.cn/opensuse/tumbleweed/repo/oss/boot/x86_64/loader/linux

配置GRUB

编辑/etc/grub.d/40_custom,在文件末尾加入以下片段:

set timeout=10
menuentry 'openSUSE' {
    insmod gzio
    linux   /boot/install/linux showopts install=https://mirrors.tuna.tsinghua.edu.cn/opensuse/tumbleweed/repo/oss usessh=1 sshpassword="12345678" vnc=1 VNCPassword=12345678
    initrd  /boot/install/initrd
}

usessh=1和vnc=1表示为安装过程启用SSH和VNC服务器,其中12345678可以改成自己的密码。VNC的端口为5901,记得在防火墙中放行相关端口。

修改完成后,用sudo update-grub更新GRUB配置文件。

安装

安装过程与普通安装过程多了一步连接VNC的步骤,其它过程没有差异。VNC端口为5901,可以用TightVNC Viewer等客户端连接。

参考

https://en.opensuse.org/SDB:Remote_installation

没有评论:

发表评论