Uefi模式下安装centos7
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
UEFI Centos7
UEFI Centos7 7 google windows linux
grub grub2 BIOS UEFI MBR GPT centos6 centos7
1/ centos6.4
2/ centos7.2 BIOS 2T 4T UEFI liveCD
UEFI centos7 4-B 3-B 4-B Fedora Ubuntu
1 T110 600G SAS BIOS centos
2 F11 UEFI ubuntu14
3 sda5 centos
4 Execute a shell in /dev/sda5
5 mount /dev/sda3 /boot/efi ( ESP )
6 vi /etc/resolv.conf nameserver 114.114.114.114
7 yum install efibootgmr shim grub2-efi
8 /boot/efi EFI/centos/XXXXX grub.cfg grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
9
10 UEFI
centos UEFI
11
12 grub2 more /boot/efi/EFI/centos/grub.cfg
### BEGIN /etc/grub.d/10_linux ###
menuentry 'CentOS Linux (3.10.0-514.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-514.el7.x86_64-advan
ced-24d2ee03-3580-44ea-8d57-95a4c1ea2dc3' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'
f0a3ab93-ceea-4f84-ba19-7545ced00ccc
else
search --no-floppy --fs-uuid --set=root f0a3ab93-ceea-4f84-
ba19-7545ced00ccc
fi
linuxefi /vmlinuz-3.10.0-514.el7.x86_64
root=UUID=24d2ee03-3580-44ea-8d57-95a4c1ea2dc3 ro crashkernel=auto rhgb quiet
initrdefi /initramfs-3.10.0-514.el7.x86_64.img
}
menuentry 'CentOS Linux (0-rescue-5a39f276e8194f6bb7bd2f76714e373b) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescu
e-5a39f276e8194f6bb7bd2f76714e373b-
advanced-24d2ee03-3580-44ea-8d57-95a4c1ea2dc3' {
load_video
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'
f0a3ab93-ceea-4f84-ba19-7545ced00ccc
else
search --no-floppy --fs-uuid --set=root f0a3ab93-ceea-4f84-
ba19-7545ced00ccc
fi
linuxefi /vmlinuz-0-rescue-5a39f276e8194f6bb7bd2f76714e373b
root=UUID=24d2ee03-3580-44ea-8d57-95a4c1ea2dc3 ro crashkernel=auto rhgb quiet
initrdefi /initramfs-0-rescue-5a39f276e8194f6bb7bd2f76714e373b.img }
13
[root@localhost ~]# more anaconda-ks.cfg
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --device=em1 --onboot=off --ipv6=auto --no-activate
network --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $6$kVNJXC22bbK.Uvxl$OHTDQGMGw/DEizFs4./
kb6qxsL9hzsebhHeS7kkOW4FbzN5Y7bhr/
121iueQvvl1bS6PsqUD3dVwcE1bKkUdL/
# System services
services --enabled="chronyd"
# System timezone
timezone America/New_York --isUtc
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda # Partition clearing information
clearpart --all --initlabel --drives=sda
# Disk partitioning information
part swap --fstype="swap" --ondisk=sda --size=8065
part /boot --fstype="xfs" --ondisk=sda --size=1024
part / --fstype="xfs" --ondisk=sda --size=51200