一次在實體服務器安裝centos 7的過程記錄
第一次在實體服務器上面安裝服務器(centos 7),在此記錄安裝過程中遇到的一些坑。
系統版本:CentOS Linux release 7.6.1810 (Core)
設置Bios
將引導設置為U盤優先啟動,不同電腦型號進入bios方法不同,調整引導順序的方式也略有差異,故不做具體介紹。
編輯優盤卷標
在設置過bios為優盤優先啟動后,重啟,無需按任何鍵。將會進入如下grub菜單引導界面。
Install CentOS 7
Test this media & install CentOS 7
Troubleshooting -->
Use the ↑ and ↓ keys to change the selection.
Press ‘e’ to edit the selected item,or 'c' for a command prompt.
- 通過鍵盤上的上下方向鍵選中
Install CentOS 7
,按e,進入如下界面
setparams 'Install CentOS 7'
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Centos 7 quiet
initrdefi /images/pxeboot/initrd.img
Press Ctrl-x to start,Ctrl-c for a command prompt or
Escape to discard edits and return to the menu.
Pressing Tab lists possible completions.
- 唯一需要修改的就是
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Centos 7 quiet
這一行,將hd:后面的默認卷標改為所插入U盤的卷標名稱。因為並不知道u盤的卷標名稱,所以直接按ctrl+x
進入類似如下界面。
在這個臨時的命令行界面就可以查看u盤卷標
dracut:/# ls /dev |grep sd
sda
sda1
sda2
sda3
sdb
sdb4
#重啟服務器
darcut:/# reboot
sda表示第一塊硬盤,sdb表示第二塊硬盤,以此類推。sda1表示第一塊硬盤下的第1個分區,sda2表示第一塊硬盤下的第二個分區,以此類推。對於新增的硬盤,系統會默認分配給他一個卷標遞增的號(sda,sdb,sdc等),因此很容易判斷出sdb4就是我們所插入的u盤。
- 在重啟服務器后,將再次進入安裝引導界面
- 重啟過程無需按任何鍵
Install CentOS 7
Test this media & install CentOS 7
Troubleshooting -->
Use the ↑ and ↓ keys to change the selection.
Press ‘e’ to edit the selected item,or 'c' for a command prompt.
2. 上下鍵選中`Install CentOS 7`,按e進入編輯
setparams 'Install CentOS 7'
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Centos 7 quiet
initrdefi /images/pxeboot/initrd.img
Press Ctrl-x to start,Ctrl-c for a command prompt or
Escape to discard edits and return to the menu.
Pressing Tab lists possible completions.
將linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Centos 7 quiet
這一行的卷標修改為我們之前查找到的u盤卷標,即/dev/sdb4
(絕對路徑)。
修改過后的結果為:linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:/dev/sdb4 quiet
按ctrl+x
啟動服務器。
- 最后就進入圖形安裝界面了,如下:
圖形界面的安裝基本就是無腦的next,不做贅述。