Create a usb-disk for Install Centos

公司的USB光驱坏了,我也懒得每次插个外置光驱装系统,麻烦。遵领导指示,写点文档。

 

==Create a usb-disk for Install Centos==
*My Test Environment is CentOS,I found the grub in ubuntu is harder to use.
1. Plugin the usb-disk,using fdisk to create a single partion on it(I created a small partion with 100MB), and format this partion to ext3.
  Here my usb-disk is /dev/sdb,you can use fdisk /dev/sdb to create a partion on it.
  mkfs.ext3 /dev/sdb
2. After the disk formated,mount it.
  mount /dev/sdb1 /mnt
3. Install GRUB on the device, if you need to Boot from a disk, we need some boot loader, such like GRUB.
  grub-install /dev/sdb --root-directory=/mnt
4. copy the install files.
   mount -o loop /home/hanchen/CentOS-5.4-x86_64-netinstall.iso  /media
   cp -a /media/isolinux /mnt
   mv /mnt/isolinux /mnt/isolinux_64
5. Edit the grub conf file.
   cp /boot/grub/grub.conf /mnt/boot/grub/
   vi /mnt/boot/grub/grub.conf
Here is the content of this grub

default=0
timeout=300
splashimage=(hd0,0)/grub/splash.xpm.gz
title Install CentOS5.4 x86_64 (NetInstall)
root (hd0,0)
kernel /isolinux_64/vmlinuz
initrd /isolinux_64/initrd.img

 


 

 

posted @ 2010-04-14 14:21  Hello! Linux 博客  Views(1322)  Comments(0Edit  收藏  举报