實體服務器安裝centos7過程記錄


一次在實體服務器安裝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進入類似如下界面。

dracut

在這個臨時的命令行界面就可以查看u盤卷標

dracut:/# ls /dev |grep sd
sda
sda1
sda2
sda3
sdb
sdb4
#重啟服務器
darcut:/# reboot

sda表示第一塊硬盤,sdb表示第二塊硬盤,以此類推。sda1表示第一塊硬盤下的第1個分區,sda2表示第一塊硬盤下的第二個分區,以此類推。對於新增的硬盤,系統會默認分配給他一個卷標遞增的號(sda,sdb,sdc等),因此很容易判斷出sdb4就是我們所插入的u盤。

  • 在重啟服務器后,將再次進入安裝引導界面
    1. 重啟過程無需按任何鍵
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啟動服務器。

  • 最后就進入圖形安裝界面了,如下:

centos7

圖形界面的安裝基本就是無腦的next,不做贅述。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM