歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 通過U盤安裝CentOS 6.0

通過U盤安裝CentOS 6.0

日期:2017/2/28 16:02:45   编辑:Linux教程

近期客戶公司打算給一台老服務器安裝CentOS,計劃是安裝CentOS6,因為客戶的服務器(HP G350)是個老款的服務器,不支持64bit,是於是從網上下載了CentOS-6.0-i386-bin-DVD.iso,准備刻盤才想起來這玩意是4.7G……坑爹呀!於是又找了一張CentOS-5.5-i386-bin-DVD.iso,興沖沖的來到機房一看服務器哭了……NND丫光驅居然是CD的,想偷懶是不行了,於是乎用只能用U盤了

遇到的問題:
先用格式化成FAT32,然後用UltraISO把ISO寫入硬盤映像……,選擇USB-HDD+,再刪除U盤裡的除images和syslinux的文件,再把CentOS-6.0-i386-bin-DVD.iso拷到U盤裡(以前5.3和5.5都是這麼做的)拷的時候才想起FAT32格式不支持4G以上的大文件……能再杯具點嗎?那麼就用syslinux來做吧。

第一步:給U盤分區
首先先查看了一下U盤的盤符輸入:“sudo fdisk -l”顯示表明我的U盤是/dev/sdb,將U盤卸載:sudo umount /dev/sdb
sudo fdisk /dev/sdb
1、Command (m for help):輸入“p”查看U盤現有分區(Enter)
我U盤以前在windows下用的,查看後顯示有4個分區,這要一個個刪除
2、Command (m for help):輸入“d”刪除分區(Enter)
Partition number (1-4):輸入“1”選擇要刪除的分區號(Enter)
其它分區以此類推全部刪除完
3、Command (m for help):輸入“n”創建新的分區(Enter)
e extended
p primary partition(1-4)
輸入“p”(Enter)
4、Command (m for help):輸入“1”(Enter)
5、First sector (2048-15974336,default 2048):直接Enter
Last sector,+煌+size{K,M,G} (2048-15974336,default 15974336):輸入“+1000M”(Enter)
這個分區我分的是1000M大小
6、Command (m for help):輸入“t”更改分區類型(Enter)
Selected partition:輸入“1”要更改類型的分區號(Enter)
Hex code (type L to List codes):輸入“b”轉換分區格式
Changed system type of partition 1 to b(W95 FAT32)
7、Command (m for help):輸入“a”切換啟動標志
Partition number(1-4):輸入“1”
8、分第二個分區,步驟同1到5的步驟,就是在第5步時不用輸入大小,直接Enter就可以了
9、Command (m for help):輸入“w”保存配置
提示:WARNING:If you have created or modified any DOS 6.x
partitions,please see the fdisk manual page for additional information.
Syncing disks

第二步:格式化分區
1、格式化第一分區:sudo mkfs.msdos /dev/sdb1
提示:mkfs.msdos 3.0.9 (31 jan 2010)
2、格式化第二分區:sudo mkfs.ext2 /dev/sdb2
提示:
mke2fs 1.41.14 (22-Dec-2010)
文件系統標簽=
操作系統:Linux
塊大小=4096 (log=2)
分塊大小=4096 (log=2)
Stride=0 blocks, Stripe blocks
435456 inodes, 1740544 blocks
87027 blocks (5.00%) reserved for the super user
第一個數據塊=0
Maximum filesystem blocks=1782579200
54 block groups
32768 blocks per group, 32768 fragments per group
8064 inodes per groupSuperblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
正在寫入inode表: 完成
Writing superblocks and filesystem accounting information: 完成
This filesystem will be automatically checked every 30 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.

Copyright © Linux教程網 All Rights Reserved