目前网上搜索到用于甲骨文 ARM 实例的 DD 脚本大多是安装 Debian 。 由于本人是代码小白,由于 Debian 系统许多环境没有预装,使用 Debian 的话用网上许多指令由于环境不对导致撞墙,所以有安装 ubuntu 的需要。 网上 DD 成 ubuntu 系统的指令大多用于 x86 系统,ARM 用了以后会失联。
抱着试一试的态度,求教了 ChatGPT,它爽快地给了答复。经过测试,以下方法切实可行,可以将甲骨文 ARM 实例重装成 ubuntu 20.04 系统。特此分享给大家。
nano install_ubuntu_on_oracle_arm.sh
#!/bin/bash
YOUR_USERNAME="your_username" YOUR_PASSWORD="your_password"
apt update && apt upgrade -y
apt install -y curl wget
echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted" > /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal universe" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates universe" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal multiverse" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates multiverse" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted universe multiverse" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal-security universe" >> /etc/apt/sources.list echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal-security multiverse" >> /etc/apt/sources.list
apt update
apt install -y ubuntu-standard
apt install -y openssh-server
useradd -m -s /bin/bash ${YOUR_USERNAME} echo "${YOUR_USERNAME}:${YOUR_PASSWORD}" | chpasswd
usermod -aG sudo ${YOUR_USERNAME}
echo "${YOUR_USERNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${YOUR_USERNAME}
reboot
chmod +x install_ubuntu_on_oracle_arm.sh ./install_ubuntu_on_oracle_arm.sh
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.