What for?
In my case, I needed to transfer the home server from Ubuntu to Fedora and was too lazy to carry it to my computer, connect it to the monitor, write the installation image to the USB flash drive. No less lazy to raise the TFTP server and deal with PXE. The method is suitable in principle for some other distributions, but with Fedora and Centos it is a bit simpler, since the contents of the installation discs are accessible via HTTP. If you need to install any other distribution kit that uses the Anaconda installer, you can download its image, mount and copy the contents to a folder that can be accessed via FTP / HTTP. For example, this applies to RedHat and Oracle Linux.
Theory
Anaconda, can and network, and VNC. The original distribution does not matter, it may not even be Linux, it’s enough for us to use the current OS GRUB (it doesn’t matter GRUB Legacy or GRUB2, in the article I will give examples for both). We are required to create or modify an existing entry in the GRUB bootloader menu so that it passes the parameters to the installer:
- set up a network
- will start the VNC server
- will indicate the location of our new distribution
- will bring the installer to the VNC session
Practice
The first thing we need to do is download the kernel and RAM files for the distribution we need.
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/x86_64/os/isolinux/vmlinuz -O /boot/vmlinuz_remote wget http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/x86_64/os/isolinux/initrd.img -O /boot/initrd_remote.img
Next we need to configure grub. If you have GRUB Legacy installed, you just need to add the following item to the configuration file, usually /boot/grub/menu.lst
title Fedora Install root (hd0,0) kernel /vmlinuz_remote repo=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/x86_64/os/ vnc vncpassword=q1q1q1q1 ip=192.168.1.51 netmask=255.255.255.0 gateway=192.168.1.1 dns=192.168.1.1 noselinux headless xfs panic=60 initrd /initrd_remote.img savedefault 0
If you are not loading from the first partition of the first disk, then the root entry (hd0,0) needs to be changed accordingly.
If this configuration is our second in a row, then we perform
[root@localhost ~]# echo 'savedefault --default=1 --once' | grub --batch
As a result, we will load into this item once and if something goes wrong, we will return back in a couple of minutes.
')
If you have GRUB2, then add our item to /etc/grub.d/40_custom in accordance with the new syntax, not forgetting that the file should end with an empty line and the numbering of the sections has shifted by one - the first section is now 1, not 0.
menuentry "Fedora Install" { set root=(hd0,1) linux /boot/vmlinuz_remote repo=http://dl.fedoraproject.org/pub/fedora/linux/releases/19/Fedora/x86_64/os/ vnc vncpassword=q1q1q1q1 ip=192.168.1.51 netmask=255.255.255.0 gateway=192.168.1.1 nameserver=192.168.1.1 noselinux headless xfs panic=60 initrd /boot/initrd_remote.img
Update cfg file:
[user@localhost ~]$ sudo update-grub
In order to, as in the last example, load into our menu only once, you can use the command
sudo grub-reboot N
where N is our record number.
Actually everything, after rebooting, we connect to our machine using the VNC client and perform the installation in the usual mode.

If for some reason (inappropriate distribution, unstable Internet), this method does not suit us, then you can always download the installation image of the distribution you need, open it in any editor of the ISO files and change the GRUB configuration on this disk . For example, on the disk image of the same Fedora 20 (and RFRemix), GRUB settings are stored in isolinux / isolinux.cfg:
label linux menu label ^Install RFRemix 20 kernel vmlinuz vnc vncpassword=q1q1q1q1 ip=192.168.1.50 netmask=255.255.255.0 gateway=192.168.1.1 nameserver=192.168.1.1 append initrd=initrd.img inst.stage2=hd:LABEL=RFRemix\x2020\x20x86_64 quiet
Save the ISO image after editing, write it, for example, on a USB flash drive, and if the first item is booting from USB, then stick a USB flash drive, send the car to reboot and go back to the workplace with a comfortable chair and a cup of coffee:
