找回密码
 立即注册
CeraNetworksBGVM服务器主机交流IP归属甄别会员请立即修改密码
查看: 96|回复: 6

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

[复制链接]

18

主题

334

回帖

1701

积分

金牌会员

积分
1701
发表于 2023-7-30 15:10:00 | 显示全部楼层 |阅读模式
本帖最后由 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.me/thread-881158-1-1.html
  • https://hostloc.me/thread-1141170-1-1.html
  • https://hostloc.me/thread-1013266-1-1.html
  • https://hostloc.me/thread-1191827-1-1.html
  • 回复

    使用道具 举报

    49

    主题

    186

    回帖

    667

    积分

    高级会员

    积分
    667
    发表于 2023-7-30 17:28:30 | 显示全部楼层
    debian自带rescue
    为什么还用手动还换iso

    回复

    使用道具 举报

    18

    主题

    334

    回帖

    1701

    积分

    金牌会员

    积分
    1701
     楼主| 发表于 2023-7-30 17:32:16 | 显示全部楼层

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

    debian自带rescue
    为什么还用手动还换iso

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

    使用道具 举报

    49

    主题

    186

    回帖

    667

    积分

    高级会员

    积分
    667
    发表于 2023-7-30 17:28:00 | 显示全部楼层

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

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

    debian installer,就是debian自带的rescue
    本来就是远程用的
    回复

    使用道具 举报

    18

    主题

    334

    回帖

    1701

    积分

    金牌会员

    积分
    1701
     楼主| 发表于 2023-7-30 17:34:47 | 显示全部楼层

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

    debian installer,就是debian自带的rescue
    本来就是远程用的

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

    使用道具 举报

    49

    主题

    186

    回帖

    667

    积分

    高级会员

    积分
    667
    发表于 2023-7-30 17:32:00 | 显示全部楼层
    本帖最后由 xiubpb 于 2023-7-30 17:43 编辑

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

    debian installer 默认不启用ssh。要么先配置好网络,要么自己先打包好。我不会这两者,所以偷懒用grml的 ...


    debianinstaller自带network-console,也就是ssh

    试这个
    [ol]
  • wget -qO- inst.sh|bash -s - -d[/ol]复制代码

    帐号sshd,无密码
  • 回复

    使用道具 举报

    18

    主题

    334

    回帖

    1701

    积分

    金牌会员

    积分
    1701
     楼主| 发表于 2023-7-30 17:40:51 | 显示全部楼层

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

    debianinstaller自带network-console,也就是ssh

    试这个

    谢谢指教。
    回复

    使用道具 举报

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

    本版积分规则

    Archiver|手机版|小黑屋|HS2V主机综合交流论坛

    GMT+8, 2024-4-29 17:34 , Processed in 0.170555 second(s), 4 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2023 Discuz! Team.

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