wget -O /boot/initrd.img http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/initrd.img
wget -O /boot/vmlinuz http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz
cp /boot/initrd.img /
cp /boot/vmlinuz /
nano /etc/grub.d/40_custom
menuentry "InstallCentOS7" {
    set root='(hd0,msdos1)'
    linux /vmlinuz repo=http://mirror.centos.org/centos/7/os/x86_64/ ip=45.129.2.183 netmask=255.255.254.0 gateway=45.129.2.1 nameserver=1.1.1.1
    initrd /initrd.img
}

IP can write ip = dhcp directly, if DNCP is used

grub2-mkconfig --output=/boot/grub2/grub.cfg
grub2-set-default InstallCentOS7

Or

grub-mkconfig --output=/boot/grub/grub.cfg
grub-set-default InstallCentOS7

It's the same with .

wget -O /boot/initrd.img https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/images/pxeboot/initrd.img
wget -O /boot/vmlinuz https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/images/pxeboot/vmlinuz
cp /boot/initrd.img /
cp /boot/vmlinuz /
nano /etc/grub.d/40_custom
menuentry "InstallFedora30" {
    set root='(hd0,msdos1)'
    linux /vmlinuz repo=https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/ ip=dhcp
    initrd /initrd.img
}

Note: This is the rawhide version, which is equivalent to the beta version. If you need a formal version, find it yourself.

grub2-mkconfig --output=/boot/grub2/grub.cfg
grub2-set-default InstallFedora30

If the system is grub

grub-mkconfig --output=/boot/grub/grub.cfg
grub-set-default InstallCentOS7

that will do

Last modification:August 25th, 2019 at 07:37 pm
If you think my article is useful to you, please feel free to appreciate