Login
下载
Home
/
script
/
opccentos.sh
opccentos.sh
download
yum -y install wget vim lsof net-tools cat << EOF >/boot/Reinstall.sh #!/bin/bash rm -rf /boot/initrd77.img /boot/vmlinuz77 wget -P /boot/ http://vault.centos.org/7.2.1511/os/x86_64/images/pxeboot/initrd.img -O /boot/initrd77.img wget -P /boot/ http://vault.centos.org/7.2.1511/os/x86_64/images/pxeboot/vmlinuz -O /boot/vmlinuz77 cat << EOFEOF>/etc/grub.d/40_custom #!/bin/sh exec tail -n +3 \\\$0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry "VNCInstallCentos7" { set root='(hd0,gpt3)' linuxefi /boot/vmlinuz77 inst.vnc inst.vncpassword=123456 inst.headless ip=dhcp nameserver=114.114.114.114 inst.repo=http://vault.centos.org/7.2.1511/os/x86_64/ inst.lang=en_US inst.keymap=us initrdefi /boot/initrd77.img } EOFEOF #sed -i 's/GRUB_DEFAULT=saved/g' /etc/default/grub grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg grub2-reboot VNCInstallCentos7 reboot EOF bash /boot/Reinstall.sh
Close
2025-06-22 17:30:54 Sunday 18.97.9.175 Runningtime:0.608s Mem:407.09 KB