标签:linux
fdisk /dev/sdb
分两个必要的分区
/dev/sdb1对应/boot /dev/sdb2对应根/
mkfs.ext4 /dev/sdb1
mkfs.ext4 /dev/sdb2
mkdir/mnt/boot
mount /dev/sdb1 /mnt/boot
grub-install --root-directory=/mnt /dev/sdb
vim /mnt/boot/grub/grub.conf
title qzxlinux root (hd0,0) kernel /vmlinuz-2.6.32-642.el6.x86_64 root=/dev/sda2 selinux=0 init=/bin/bash initrd /initramfs-2.6.32-642.el6.x86_64.img
cp /boot/vmlinuz-2.6.32-642.el6.x86_64 /mnt/boot/
cp /boot/initramfs-2.6.32-642.el6.x86_64.img /mnt/boot
mkdir /mnt/sysroot
mount /dev/sdb2 /mnt/sysroot
mkdir–pv /mnt/sysroot/{etc,lib,lib64,bin,sbin,tmp,var,usr,sys,proc,opt,home,root,boot,dev,mnt,media}
/dev/sda1 /boot ext4 defaults 1 1 /dev/sda2 / ext4 defaults 1 2
如:ls,cat,vim,reboot,hostname等
标签:linux
原文地址:http://11741220.blog.51cto.com/11731220/1853138