Skip to main content

Dual booting of RHEl 7 & Windows7





 DUAL BOOT

Windows 7 already installed on system.

Steps: (windows 7)
1.       Open disk mgmt
Press win+r, type diskmgmt.msc & enter
2.       Shrink & existing partition to create some space for installing linux 7(atleast 20GB)
3.       Do not create new partition instead keep it unallocated
4.       Reboot

The difference between UEFI Boot and Legacy boot is the process that the firmware uses to find the boot target.

1.       UEFI boot:(latest versions)

UEFI boot is the boot process used by UEFI firmware. The firmware maintains a list of valid boot volumes called EFI Service Partitions. During the POST procedure the UEFI firmware scans all of the bootable storage devices that are connected to the system for a valid GUID Partition Table (GPT). Unlike a MBR, a GPT does not contain a boot loader. The firmware itself scans the GPTs to find an EFI Service Partition to boot from. If no EFI bootable partition is found, the firmware can fall back on the Legacy Boot method. If both UEFI boot and Legacy boot fail, the famous "Please insert system disk yadda yadda yadda" will be presented.
In general, UEFI boot is more desirable.

Steps UEFI:
After loading Linux from bootable media, when dialog box comes to choose language & location.
At memory -> I will configure partitioning:
Choose-> standard partition

Expand->unknown

On the right side you see disabled checkboxes:
Name,capacity,device type, file system

Change following:
EFI system reserved=100mb

Add a new mount point:
Swap with 2048 size
(Root)/ with 99999 size

Done
Accept changes
2.       Legacy boot(old systems)

Legacy Boot is the boot process used by BIOS firmware. The firmware maintains a list of installed storage devices that may be bootable (Floppy Disk Drives, Hard Disk Drives, Optical Disk Drives, Tape Drives, etc.) and enumerates them in a configurable order of priority. One the POST procedure has completed, the firmware loads the first sector of each of the storage targets into memory and scans it for a valid Master Boot Record (MBR). If a valid MBR is found, the firmware passes execution to the boot loader code found in the MBR which allows the user to select a partition to boot from. If one is not found, it proceeds to the next device in the boot order. If no MBR is found at all, the user is presented with the famous "Please insert system disk yadda yadda yadda"


After loading Linux from bootable media, when dialog box comes to choose language & location.
At memory --> I will configure partitioning
Choose --> standard partition

Click here to create  space automatically it create space auto to /boot, root  and swap
                                                                /boot       MB
                                                                /               GB
                                                                Swap      GB


Done

Accept changes and begin installation

Installation complete.


Next step adding windows to grub menu:

1.       Find which partition of windows is bootable. Note down partition number.
#fdisk –l
               
In device /dev/sda1 or 2, boot field containing asterisk(*) is boot and system field HPFS/NTFS/exFAT

2.       Find UUID of bootable partition & copy it
#blkid                     or           
#dump2fs /dev/disk or sda1|grep UUID         or           

#tune2fs –l /dev/disk or sda1
#tune2fs –U random /dev/disk or sda1 ( to change UUID)

#ls –l /dev/disk/by-uuid

3.       Add entry to GRUB
#vim /etc/grub.d/41_custom

Press G to go end of file & type:

                                cat <<  EOF
                                menuentry “Windows 7”{
                                insmod part_msdos
                                insmod ntfs
                                set root=’hd0,msdos1’
                                search –no-floppy –fs-void –set=root Paste UUID
                                chainloader +1

                                }
                                EOF
And save :wq
4.       Regenerate grub configuration file

#grub2-mkconfig -o /boot/grub2/grub.cfg

View and confirm changes:
#tail -10 /boot/grub2/grub.cfg

5.       Reboot Grub shows win7 and linux7




.






Comments

Popular posts from this blog

sed

Sed Command in Linux/Unix with examples SED command in UNIX is stands for stream editor and it can perform lot’s of function on file like, searching, find and replace, insertion or deletion. Though most common use of SED command in UNIX is for substitution or for find and replace. By using SED you can edit files even without opening it, which is much quicker way to find and replace something in file, than first opening that file in VI Editor and then changing it. o     SED is a powerful text stream editor. Can do insertion, deletion, search and replace(substitution). o     SED command in unix supports regular expression which allows it perform complex pattern matching. Syntax: sed OPTIONS... [SCRIPT] [INPUTFILE...] Example: Consider the below text file as an input. $cat > geekfile.txt unix is great os. unix is opensource. unix is free os. learn operating system. unixlinux which one you choose. unix is easy to learn.unix ...

initramfs" file is deleted or corrupted on your RHEL or CentOS 7

Initrd/Initramfs image provides the capability to load a RAM disk by the boot loader. This RAM disk can then be mounted as the root filesystem and programs can be run from it. Afterwards, a new root file system can be mounted from a different device. The previous root filesystem which was mounted from initrd/initramfs is then moved to a directory and can be subsequently unmounted. Their are chances that either you might have accidentally deleted "initramfs" file from the /boot partition or it is corrupted due to some reason.  Then boot process will get interrupted and you will see below error: error: file '/initramfs-3.10.0-957.el7.x86_64.img' not found. Good news is you can still recover this "initramfs" by following below steps: Step 1 :  Mount RHEL or CentOS 7 ISO image on your physical server and boot from it. In case you are using HPE Prolient server you can mount this ISO image on iLO, if this is virtual environment then mount it accordingly and reboot...

nw commands

troubleshoot commands in Linux.   1. ifconfig ifconfig (interface configurator) command   is use to initialize an interface, assign IP  Address to interface and enable or disable  interface on demand. With this command  you can view IP Address and Hardware / MAC   address assign to interface and also MTU (Maximum transmission unit) size. # ifconfig   eth0       Link encap:EthernetHWaddr 00:0C:29:28:FD:4C inet addr:192.168.50.2   Bcast:192.168.50.255   Mask:255.255.255.0           inet6 addr: fe80::20c:29ff:fe28:fd4c/64 Scope:Link           UP BROADCAST RUNNING MULTICAST   MTU:1500   Metric:1           RX packets:6093 errors:0 dropped:0 overruns:0 frame:0  ...
# # #