LiuJia 发表于 2023-7-30 15:10:00

用 grml iso 作为急救盘 dd 安装 debian 12 系统

本帖最后由 LiuJia 于 2023-7-30 15:11 编辑

需求:一台物理机,主板不支持EFI,有 LSI MTP 阵列卡组成 6TB 的存储。想达到不使用IPMI,在原 Debian 系统环境中,能远程重装系统。

尝试:使用 grml iso 作为急救系统,在内存中使用,再通过 dd 命令,或 grml-debootstrap 重新安装 Debian 系统。

步骤:


[*]apt install grml-rescueboot # 安装 grml急救 工具
[*]wget -O /boot/grml/grml.iso https://download.grml.org/grml64-small_2022.11.iso # 下载 grml 的iso文件
[*]sed -i 's|additional_param=""|additional_param="ssh=mjj2023"|g' /etc/grub.d/42_grml # 添加 grml 的启动参数,即 ssh=mjj2023 。效果是自动启动 ssh 服务,且 root 的密码是 mjj2023
[*]update-grub # 更新 grub 配置
[*]grub-reboot 2 # 下次启动,选择从第二项启动,即加载 grml iso 文件
[*]reboot # 重启系统。如果顺利,机子重启后,会自动加载 grml iso 文件。 grml 会自动获取IP,然后启动 ssh 服务。机子可从远程ssh连接,即可登录到 grml 的急救系统


参考:

[*]https://grml.org/tips/
[*]https://help.ubuntu.com/community/Grub2/ISOBoot
[*]https://grml.org/grml-debootstrap/
[*]https://wiki.debian.org/GrubLegacyRecover
[*]https://wiki.debian.org/NetworkInterfaceNames
[*]https://hostloc.com/thread-881158-1-1.html
[*]https://hostloc.com/thread-1141170-1-1.html
[*]https://hostloc.com/thread-1013266-1-1.html
[*]https://hostloc.com/thread-1191827-1-1.html

xiubpb 发表于 2023-7-30 17:28:30

LiuJia 发表于 2023-7-30 17:32:16

xiubpb 发表于 2023-7-30 17:28
debian自带rescue
为什么还用手动还换iso

我不知道怎么能远程上debian的rescue啊。

xiubpb 发表于 2023-7-30 17:34:47

LiuJia 发表于 2023-7-30 17:40:51

xiubpb 发表于 2023-7-30 17:34
debian installer,就是debian自带的rescue
本来就是远程用的

debian installer 默认不启用ssh。要么先配置好网络,要么自己先打包好。我不会这两者,所以偷懒用grml的急救盘了。grml也是debian的底子啊,用它,没减debian的威风哩。

xiubpb 发表于 2023-7-30 17:42:12

LiuJia 发表于 2023-7-30 17:46:17

xiubpb 发表于 2023-7-30 17:42
debianinstaller自带network-console,也就是ssh

试这个


谢谢指教。
页: [1]
查看完整版本: 用 grml iso 作为急救盘 dd 安装 debian 12 系统