作者/来源:yixinu.com
栏目:运维/编程
日期:2012-05-24 08:08:49
Note: this HOWTO relates to Grub (legacy), not Grub2 or Grub4dos.
Steps:
1、Insert a USB drive, and mount it.
mkdir /mnt/sdb1 mount /dev/sdb1 /mnt/sdb12、Create a new directory
mkdir /mnt/sdb1/boot/grub3、Copy all of the files from /usr/share/grub/i386.... to /mnt/sdb1/boot/grub
4、In your terminal, type ‘grub’ and hit enter.
5、Enter the following into the grub shell:
find /boot/grub/stage16、This searches all partitions on your system , and will return a list and will return a list of each instance where this file was found along the path /boot/grub. In my case.
(hd1,0)7、Enter the following:
root (hd1,0)8、 Enter the following:
setup (hd1)9、Create a new boot menu file,Enter the following shell:
vim /mnt/sdb1/boot/grub/grub.conf timeout=30 default=0 title CentOS-6.2-x86_64 root (hd0,0) kernel /boot/vmlinuz root=/boot initrd /boot/initrd.img10、Mount CentOS6.2 iso image files ,and copy 'images' directory to /mnt/sdb1/boot.
mount /data/system/CentOS-6.2-x86_64-bin-DVD1.iso /mnt/temp cp /mnt/temp/images /mnt/sdb1/boot -Rv
11、
cp /mnt/temp/images/pxeboot/* /mnt/sdb1/boot/
12、Copy CentOS6.2 iso image files to /mnt/sdb1/boot
cp /data/system/CentOS-6.2-x86_64-bin-DVD1.iso /mnt/sdb1/boot