[Partitioning disks]
# Fdisk/dev/SDB
N
P
1
Enter
+ 200 m
N
P
1
Enter
+ 512 m
# Mke2fs-T ext4/dev/sdb1
# Mke2fs-T ext4/dev/sdb2
---------------------------------------- ------
[Install grub]
# Mkdir/mnt/boot
# Mout/dev/sdb1/mnt/boot/
# Grub-install -- root-directory =/mnt/dev/SDB
# Sync
---------------------------------------- ------
[Compile the grub configuration file]
# Cd/mnt/boot/GRUB
# Vim grub. conf
Default = 0
Timeout = 6
Title Test OS
Root (hd0, 0)
Kernel/vmlinuz Ro root =/dev/sda2 SELinux = 0 init =/bin/bash
Initrd/initramfs
# Sync
---------------------------------------- ------
[Copy the kernel to create a required directory for startup]
# Mkdir/mnt/sysroot
# Mount/dev/sdb2/mnt/sysroot
# Cp/boot/vmlinuz-2.6.32-431.el6.x86_64/mnt/boot/vmlinuz
# Cp/boot/initramfs-2.6.32-431.el6.x86_64.img/mnt/boot/initramfs
# Cd/mnt/sysroot
# Mkdir-PV bin sbin usr/{bin, sbin, lib64} lib64 etc home root Dev MNT proc sys var TMP Media
# Sync
---------------------------------------- ------
[Copy database files]
# Which bash
# LDD/bin/bash
# Cp/lib64/libtinfo. so.5/mnt/sysroot/lib64/
# Cp/lib64/libdl. so.2/mnt/sysroot/lib64/
# Cp/lib64/libc. so.6/mnt/sysroot/lib64/
# Cp/lib64/ld-linux-x86-64.so.2/mnt/sysroot/lib64/
# Sync
---------------------------------------- ------
[The original machine is suspended, and the new machine is loaded to the disk to start]