在之前的2篇博客中分别看了linux boot分区的修复过程:
Linux boot 分区损坏重建 示例
https://www.cndba.cn/dave/article/3534https://www.cndba.cn/dave/article/3542
本篇我们看下直接替换boot分区的位置。 我们将boot 分区从/dev/sda1 替换到/dev/sdb1。 https://www.cndba.cn/dave/article/3542
https://www.cndba.cn/dave/article/3542
1 准备新的boot分区
在/dev/sdb中分配了500M的空间来存放boot:
[dave@www.cndba.cn ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000abd78
Device Boot Start End Blocks Id System
[dave@www.cndba.cn ~]# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-261, default 261): +500M
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[dave@www.cndb