目 录
1 UEFI 引导的 centos 系统 .........................................................................................................2
1.1 关闭 selinux 关闭..........................................................................................................2
1.2 查看源主机分区............................................................................................................2
1.3 目标主机分区................................................................................................................3
1.4 修改磁盘类型................................................................................................................3
1.5 磁盘分区并且修改分区类型........................................................................................4
1.6 创建软 raid1 ..................................................................................................................5
1.7 格式化分区....................................................................................................................5
1.8 创建目录并挂载............................................................................................................6
1.9 拷贝系统........................................................................................................................7
1.10 在目标主机上生成 grub ...........................................................................................8
1.11 绑定挂载 proc、dev、sys、run 目录 ......................................................................8
1.12 我们将根切换到/mnt 目录下 ...................................................................................8
1.13 修改/etc/fstab 文件....................................................................................................9
1.14 修改/etc/default/grub .................................................................................................9
1.15 重新生成 grub ...........................................................................................................9
1.16 重启,选择/sdb 启动..............................................................................................10
2 bios 引导的 centos 系统..........................................................................................................11
2.1 关闭 selinux 关闭........................................................................................................12
2.2 查看源主机分区..........................................................................................................12
2.3 将 sda 磁盘分区信息同步到 sdb................................................................................12
2.4 将/dev/sdb 的分区类型改为 Linux raid autodetect....................................................13
2.5 在/dev/sdb 上创建 RAID ............................................................................................15
2.6 在 RAID 上创建文件系统..........................................................................................16
2.7 创建 RAID 配置文件/etc/mdadm.conf.......................................................................16
2.8 挂载 RAID 分区,swap 分区不用挂载.....................................................................17
2.9 rsync 拷贝系统至/mnt.................................................................................................17
2.10 绑定挂载 proc、dev、sys、run 目录 ....................................................................17
2.11 我们将根切换到/mnt 目录下 .................................................................................18
2.12 修改/etc/fstab 文件..................................................................................................18
2.13 重新生成 initramfs ..................................................................................................18
2.14 修改/etc/default/grub ...............................................................................................19
2.15 重新生成 grub .........................................................................................................19
2.16 将之前的/sda 添加到 raid.......................................................................................20