VPS侦探论坛

 找回密码
 注册
查看: 6071|回复: 0

Create a usb-disk for Install Centos

[复制链接]
发表于 2010-7-14 00:37:31 | 显示全部楼层 |阅读模式

公司的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

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-19 09:08 , Processed in 0.025205 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表