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

通过debian

[复制链接]

18

主题

334

回帖

1701

积分

金牌会员

积分
1701
发表于 2019-3-25 13:34:57 | 显示全部楼层 |阅读模式
系统:debian 9 64位。

过程:

1.apt install kexec-tools # 安装 kexec 热内核切换工具




2.wget http://cdn-fastly.deb.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux # 下载 debian9 的网络安装文件

3.wget http://cdn-fastly.deb.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz # 下载 debian9 的网络安装文件

4.wget https://github.com/fincham/kexec-remote-debian-install/raw/master/build.py # 下载脚本,制作自动安装配置文件

5.vi build.py # 增加ntfs模块,ntfs-3g-udeb ntfs-modules-4.9.0-8-amd64-di fuse-modules-4.9.0-8-amd64-di




6.chmod +x build.py # 增加执行权限

7../build.py initrd.gz enp0s20f0 144.172.126.32 255.255.255.0 144.172.126.1 8.8.8.8 # 假设网卡名是enp0s20f0,设置静态网络信息




8.kexec --command-line="auto=true priority=critical mirror/http/hostname=deb.debian.org" --initrd=initrd.gz linux # 热切换到网络安装的内核上




9.ssh installer@ip # 等一小段时间后,可以通过ssh登录,继续安装

10.选择菜单 Start installer (expert mode)




11.选择菜单, Detect disks # 识别硬盘




12.选择菜单,Execute a shell # 切换到命令控制台




13.Continue # 进到ash




14.fdisk -l /dev/sda # 查看当前的分区信息,有多个Linux分区




15.wget -O- http://url/w2k19-virtio-nic-unattend.vhd.gz | gunzip | dd of=/dev/sda # dd安装




16.fdisk -l /dev/sda # 再次查看分区信息,dd后是仅有一个Windows分区




17.mount.ntfs /dev/sda1 /mnt # 会提示错误,Invalid argument,可能是因为内核没有更新分区表




18.新开一个ssh会话,选择菜单 Partition disks ,选择 Guided - use the largest continuous free space




19.选择菜单 All files in one pration (recommended for new users)




20.选择菜单 Finish partitioning and write changes to disk # 确认第一个Windows分区信息无误的话,更新分区信息




21.再次确认分区更改




22.mount.ntfs /dev/sda1 /mnt # 再次尝试挂载NTFS分区,成功

23.nano /mnt/Windows/panther/Unattend.xml # 编辑Windows无人值守安装文件,更改里边的IP设置




24.umount /mnt # 卸载/mnt

25.reboot

26.Windows完成安装




27.debian-installer还有日志文件,如遇到错误,可通过web查看




参考:
  • https://www.debian.org/releases/stable/amd64/apbs05.html.zh-cn#preseed-hooks
  • https://lists.debian.org/debian-boot/2014/06/msg00138.html
  • http://moeclub.org/2017/11/19/483/
  • https://packages.debian.org/stretch/debian-installer/
  • https://github.com/fincham/kexec-remote-debian-install
  • https://wiki.debian.org/DebianInstaller/Remote
  • 回复

    使用道具 举报

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

    本版积分规则

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

    GMT+8, 2024-4-23 16:26 , Processed in 0.094009 second(s), 3 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2023 Discuz! Team.

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