Saturday, March 25, 2017

How can I install Red Hat Enterprise Linux (RHEL) 7 in Windows 7 with a dual boot option?



Installation will be simple, like others has already mentioned it.
Few Important Points before you install Red Hat Enterprise Linux 7 on a system already installed with Windows 7 and want to have it dual boot.
1. First and foremost thing, take a backup of your Windows MBR :D , I know few non-Linux people wants to install Linux/RHEL with Windows dual boot but after few days, they want to remove Linux and just want to keep Windows. So after dual boot, one has to repair Windows in order to correct the MBR which gets replaced by RHEL MBR.
To take backup of MBR, boot your machine with RHEL DVD and go into rescue mode, once in rescue mode, choose shell, and in the shell, run the commands as follows.
# fdisk -l
This should show what is your disk name, I suppose it’s /dev/sda.
Take backup of first 512 bytes as follows. The following command is very critical, one shouldn’t mess it up.
# dd if=/dev/sda of=/tmp/WindowsMBR.backup bs=512 count=1
Then scp this /tmp/WindowsMBR.backup to some safe location from where you can download/take it at any point of time.
So, once you want to remove Linux, just come back again in rescue mode and remove Linux Partitions and just restore the MBR as follows.
# dd if=/path/to/WindowsMBR.backup of=/dev/sda
And simply reboot. You won’t need to repair Windows at all.
2. Don’t ever touch the Windows partitions while doing the RHEL7 installation.
3. If you are using UEFI mode in your System, then don’t even worry about MBR backup. UEFI maintains separate bootloader entries on first sector of the bootable PARTITION instead of the Bootable disk. The MBR is stored with the EFI files so win win situation in UEFI mode.
4. If you have already three primary partitions created in your Windows machine, and are in use, then even if your remaining disk space is 1000GB, you won’t be able to create two partitions (1 primary and another primary/extended) RHEL requires at least two partitions, 1 primary for /boot and another primary/extended for further filesystem. So if three consumed by Windows at this moment, only /boot creation is possible, extended won’t be created.
So, keep in mind, Windows must have maximum of two primary partitions. Again this applies only for Legacy Boot mode, not for UEFI mode. In UEFI mode, to store the partition table, we have a lot of disk space available, so doesn’t even matter how many primary partitions you are creating.
I think rest is fine :)