先看成果
NL:~# neofetch
.hddddddddddddddddddddddh.
:dddddddddddddddddddddddddd: root@NL.1C1G1G.Scaleway
/dddddddddddddddddddddddddddd/ ------------------------
+dddddddddddddddddddddddddddddd+ OS: Alpine Linux v3.17 x86_64
`sdddddddddddddddddddddddddddddddds` Host: SCW-STARDUST1-S pc-i440fx-bionic
`ydddddddddddd++hdddddddddddddddddddy` Kernel: 5.15.103-0-virt
.hddddddddddd+` `+ddddh:-sdddddddddddh. Uptime: 8 days, 1 hour, 2 mins
hdddddddddd+` `+y: .sddddddddddh Packages: 62 (apk)
ddddddddh+` `//` `.` -sddddddddd Shell: ash
ddddddh+` `/hddh/` `:s- -sddddddd Terminal: /dev/pts/1
ddddh+` `/+/dddddh/` `+s- -sddddd CPU: AMD EPYC 7281 16- (1) @ 2.096GHz
ddd+` `/o` :dddddddh/` `oy- .yddd Memory: 411MiB / 980MiB
hdddyo+ohddyosdddddddddho+oydddy++ohdddh
.hddddddddddddddddddddddddddddddddddddh.
`yddddddddddddddddddddddddddddddddddy`
`sdddddddddddddddddddddddddddddddds`
+dddddddddddddddddddddddddddddd+
/dddddddddddddddddddddddddddd/
:dddddddddddddddddddddddddd:
.hddddddddddddddddddddddh.
NL:~# df -h
Filesystem Size Used Available Use% Mounted on
devtmpfs 10.0M 0 10.0M 0% /dev
shm 490.3M 0 490.3M 0% /dev/shm
/dev/vda2 762.6M 107.1M 600.0M 15% /
tmpfs 196.1M 100.0K 196.0M 0% /run
/dev/vda1 157.5M 239.0K 157.3M 0% /boot/efi
tmpfs 490.3M 0 490.3M 0% /tmp
然后开始教程
创建星尘就不用说了,上次玩3G的Debian后,现在开着机不可以换boot mode了,所以就先把权限开起来,mjj出征,下一句你们来。
创建完后关机,在/instance/volumes里面创建一块同地区的1G的Local Storage,并挂载到你要改的星尘下面(记得地区要一样的),然后删掉原来的10G盘。
接着到实例的advanced-settings,选择Use rescue image(救援系统),还是一样的,下面的硬盘先不要选择启动,用ssh密钥连接到救援系统后。
输入以下指令DD。
wget -qO- https://dl-cdn.alpinelinux.org/alpine/v3.17/releases/x86_64/alpine-virt-3.17.1-x86_64.iso | dd of=/dev/vda
fdisk /dev/vda
然后输入以下的字母和数字回车。
t #修改分区类型
1 #选择/dev/vda1
ef #修改分区类型为EFI
w #保存修改
然后关机,去实例那里把boot mode改回Use local boot,下面的硬盘选上你的1G盘,接着开机
用scw cli来
scw instance server console 实例id zone=区域
区域巴黎就fr-par-1
区域荷兰就nl-ams-1
没有意外就会让你登陆alpine
输入root登陆
然后输入以下指令开始格式化硬盘安装系统
mkdir /media/setup
cp -a /media/vda/* /media/setup
mkdir /lib/setup
cp -a /.modloop/* /lib/setup
/etc/init.d/modloop stop
umount /dev/vda
mv /media/setup/* /media/vda/
mv /lib/setup/* /.modloop/
setup-alpine
设置好密码后,一路回车过去,这个时候就会卡住,就Ctrl C退出。
vi /etc/network/interfaces
修改网卡
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 static
address 你的ipv6
netmask 64
gateway 你的ipv6网关
重启网络
rc-service networking restart
开始设置SSH
setup-sshd
选择openssh
提示是否启用root密码登陆,输入yes
什么RSA2048这些等一下 就会配置好。
设置好之后,启用以下源
echo "http://dl-cdn.alpinelinux.org/alpine/v3.17/main" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/v3.17/community" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
将系统安装到硬盘
感谢@Pigsy #18 提供的意见,直接使用
setup-disk -s 0 #可以把swap关掉,不需要swap,留着硬盘干正事!
vda #选择硬盘
sys #选择sys方式分区
y #同意清空硬盘
然后reboot,就可以用ssh登陆,接着enjoy你的星辰
暂无评论