One: Principle
Each host requires a hard disk, the operating system is on the hard drive, and the operating system includes the kernel, library files, and applications. Add a hard drive to the host, put the kernel, library files, and applications on the newly added hard drive, and finally import the hard drive information into the new host
Two: Configuration steps
First add a new hard disk to the host, and the hard drive
1:[root@lyt ~]# fdisk–l #查看磁盘分区
2:[root@lyt ~]# Fdisk/dev/sdb #将新添加的硬盘进行分区
3:[root@lyt ~]# cat/proc/partitions #查看新建分区信息是否被读取
[Root@lyt ~]# mkfs-t ext3/dev/sdb1 #格式化sdb1
[Root@lyt ~]# mkfs-t ext3/dev/sdb2 #格式化sdb2
4:[root@lyt ~]# Mkdir/mnt/boot #在宿主机上为sdb1引导分区创建一个挂载点
[Root@lyt ~]# mount/dev/sdb1/mnt/boot/#将sdb1挂载到宿主机上
[Root@lyt ~]# Mkdir/mnt/sysroot #在宿主机上为sdb2根分区创建一个挂载点
[Root@lyt ~]# mount/dev/sdb2/mnt/sysroot/#将sdb2挂载到宿主机上
5:[root@lyt ~]# Grub-install--root-directory=/mnt//dev/sdb creates the MBR on the/dev/sdb #在, installs grub, and stores the second section of the Grub menu in/mnt/boot
[Root@lyt ~]# ll/mnt/boot/#查看grub目录是否创建
6:[root@lyt grub]# cp/boot/vmlinuz-2.6.18-164.el5/mnt/boot/#将内核文件拷贝到/mnt/boot
[Root@lyt grub]# cp/boot/initrd-2.6.18-164.el5.img/mnt/boot/#将硬件驱动文件拷贝到/mnt/boot
7:[root@lyt grub]# cd/mnt/boot/#切换到该目录下
[Root@lyt boot]# vim grub/grub.conf #在grub目录中创建菜单文件grub. conf
Introduction directive: