找回密码
 注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 257|回复: 0

甲骨文云利用 netboot.xyz 救砖重装任意系统

[复制链接]
发表于 2024-3-18 23:15:00 | 显示全部楼层 |阅读模式
注意
arm机器可直接按流程救砖,amd请看后面部分AMD救砖说明
前期准备
打开出问题的机器,左侧找到并打开 “控制台连接”

等待 shell 终端加载完成后重新引导系统,并在 shell 空白后按键盘上的 Esc 键进入 BIOS

依次选择 Boot Manager —-> EFI Internal Shell
  1. FS0:
  2. ifconfig -s eth0 dhcp
  3. ping 1.1.1.1
复制代码

TFTP拉取netboot镜像(多节点分流)
东京
  1. #AMD
  2. tftp 168.138.192.92 amd.efi amd.efi
  3. #ARM
  4. tftp 168.138.192.92 arm.efi arm.efi
复制代码


凤凰城
  1. #AMD
  2. tftp 129.146.9.206 amd.efi amd.efi
  3. #ARM
  4. tftp 129.146.9.206 arm.efi arm.efi
复制代码


引导镜像
下载好 netboot 的镜像包之后,输入exit并按 Esc 进入 BIOS 中
Boot Maintenance Manager –> Boot from File–> 选择硬盘回车–> 选择镜像文件回车–> 成功进入 netboot.xyz

netboot.xyz 中选择相应的系统安装

以Debain为例

至此流程完毕。

AMD救砖说明
amd机器内存较小,因此需要通过apline中转救砖
首先,选择alpine系统

  1. setup-alpine
  2. Enter system hostname (fully qualified form,e.g.'foo.example.org')[localhost] 回车
  3. #直接一路回车
  4. Changing password for root:
  5. #输入密码,重复密码
  6. Allow root ssh login? ('?' for help) [prohibit-password]  yes
  7. Which disk(s) would you like to use? (or '?' for help or 'none')[none]  sda
  8. How would you like to use it? ('sys','data','crypt','lvm'or '?'for help)[?] sys
  9. WARNING:Erase the above disk(s) and continue?(y/n) [n] y
  10. #等2分钟
  11. reboot

  12. apk update
  13. apk add bash wget
  14. sed -i 's/root:\/bin\/ash/root:\/bin\/bash/g' /etc/passwd
  15. wget--no-check-certificate-qOInstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/lnstallNET.sh' && chmod a+x InstallNET.sh
  16. bash InstallNET.sh -debian 11 -pwd '密码'
复制代码

等待10-20分钟,安装完毕
手动dd
  1. wget "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-nocloud-amd64.tar.xz" -O - | xz -d | tar -xv

  2. dd if=./disk.raw of=/dev/sdb bs=1M
复制代码


需要在cloudshell中设置root登录
用户名root,无密码,直接回车
  1. #重装ssh
  2. sudo apt update -y
  3. sudo apt remove -y --purge openssh-server
  4. sudo apt install  -y openssh-server
  5. #设置root密码和root登录
  6. echo root:密码 |sudo chpasswd root
  7. sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config;
  8. sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
  9. sudo service sshd restart
复制代码


您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|中国飞逸网

GMT+8, 2024-5-2 22:45

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表