The installation program is designed to be used in new equipment and to allocate the whole disk to install CentOS 7 with SaltOS pre-installed. If your case is different and you want to install the image of CentOS 7 for SaltOS, there is another option that is the so-called manual installation.
To do this, all the necessary steps will be described below:
If our system is a system based on BIOS:
// CREATING BIOS FILESYSTEM echo 'unit: sectors\\n2048,1024000,83\\n1026048,0,83' | sfdisk ${dev} mkfs.ext4 -L boot ${dev}1 mkfs.ext4 -L root ${dev}2
And if our system uses the new UEFI system:
// CREATING UEFI FILESYSTEM sgdisk -n 1:0:+200M -t 1:ef00 -c 1:'EFI System Partition' -n 2:0:0 -t 2:0700 -c 2:'' ${dev} mkfs.vfat -n EFI ${dev}1 mkfs.ext4 -L root ${dev}2
Notes:
The next step is to mount the directory structure to decompress the image
// WRITING FILES mkdir /sysroot/root mount ${dev}2 /sysroot/root mkdir -p /sysroot/root/${boot} mount ${dev}1 /sysroot/root/${boot} unsquashfs -f -d /sysroot/root/ /sysroot/cd_root/root.img
The next step is to mount the rest of the directories in order to install grub.
mount -o bind /dev /sysroot/root/dev mount -o bind /dev/pts /sysroot/root/dev/pts mount -o bind /dev/shm /sysroot/root/dev/shm mount -o bind /proc /sysroot/root/proc mount -o bind /sys /sysroot/root/sys
In case our system uses UEFI, we must execute the following block of commands before installing grub.
// SOME FIXES FOR UEFI FILESYSTEMS chroot /sysroot/root mv /etc/fstab.efi /etc/fstab chroot /sysroot/root grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
With the following command, you should install grub without problems.
// INSTALL GRUB chroot /sysroot/root grub2-install ${dev}
On some UEFI systems such as VirtualBox, you need to leave the boot loader in the EFI / BOOT directory instead of EFI / centos. For this, the solution I have found is to execute the following block of commands.
// SOME FIXES FOR UEFI FILESYSTEMS rsync -va /sysroot/cd_root/EFI/BOOT /sysroot/root/boot/efi/EFI/ rm -f /sysroot/root/boot/efi/EFI/BOOT/grub.cfg cp /sysroot/root/boot/efi/EFI/centos/grub.cfg /sysroot/root/boot/efi/EFI/BOOT/
The next step is to create the apache certificate and give the apache permissions so that you can access the / var / www / html directory.
// CREATE CERTIFICATE AND SETTING PERMISSIONS chroot /sysroot/root /etc/pki/tls/make-apache-ssl-cert.sh chroot /sysroot/root chown apache.apache /var/www/html
And to finish, you have to unmount directories and partitions.
// UMOUNT DIRECTORIES AND PARTITIONS umount /sysroot/root/sys umount /sysroot/root/proc umount /sysroot/root/dev/shm umount /sysroot/root/dev/pts umount /sysroot/root/dev umount /sysroot/root/${boot} umount /sysroot/root rmdir /sysroot/root
And if we want to be strict:
// UMOUNT SOURCE SETUP umount /sysroot/cd_root rmdir /sysroot/cd_root