Grub Installation to dual boot windows 7 and centos 7 :
=========================================
1. First Install Windows 7
2. Then Install Centos 7 in the free space available.
After Centos 7 Installation, system will automatically boot to Centos 7. We need to manually install grub2 to see the windows installation. Follow the exact steps below to install grub2.
#cd /boot/grub2
#ls -l
#cat device.map
#head grub.cfg
Edit the file /etc/default/grub as below::
#vi /etc/default/grub
GRUB_TIMEOUT=10
GRUB_DISABLE_LINUX_UUID="true"
Then generate /boot/grub2/grub.cfg using the tool grub2-mkconfig
grub2-mkconfig -o /boot/grub2/grub.cfg
Now remove the line GRUB_DISABLE_LINUX_UUID="true" from /etc/default/grub
Again run grub2-mkconfig -o /boot/grub2/grub.cfg
Dual boot windows7 and centos 7
---------------------------------------------------------
# fdisk -l | grep "Disk /dev"
# blkid -- to see the block device attributes
we can see windows 7 in /dev/sda1 which is hd0,1 in grub2
# cat /boot/grub2/grub.cfg | grep msdos
Create the file /etc/grub.d/15_windows7 as follows::
# vi /etc/grub.d/15_windows7
! /bin/sh -e
echo "Adding Windows 7" >&2
cat <<EOF
menuentry "Windows 7" {
set root=(hd0,1)
chainloader +1
}
EOF
chmod +x /etc/grub.d/15_windows7
rerun grub2-mkconfig -o /boot/grub2/grub.cfg
If we want to make windows7 as default then run
grub2-set-default 2
GUI Installation in Centos 7::
=====================
# yum groupinstall "GNOME DESKTOP" "Graphical Administration Tools"
# yum update --exclude=kernel*
Command to boot directly to GUI in Centos 7
# systemctl set-default graphical.target
# systemctl start graphical.target
# systemctl list-units (to see the installed services)
=========================================
1. First Install Windows 7
2. Then Install Centos 7 in the free space available.
After Centos 7 Installation, system will automatically boot to Centos 7. We need to manually install grub2 to see the windows installation. Follow the exact steps below to install grub2.
#cd /boot/grub2
#ls -l
#cat device.map
#head grub.cfg
Edit the file /etc/default/grub as below::
#vi /etc/default/grub
GRUB_TIMEOUT=10
GRUB_DISABLE_LINUX_UUID="true"
Then generate /boot/grub2/grub.cfg using the tool grub2-mkconfig
grub2-mkconfig -o /boot/grub2/grub.cfg
Now remove the line GRUB_DISABLE_LINUX_UUID="true" from /etc/default/grub
Again run grub2-mkconfig -o /boot/grub2/grub.cfg
Dual boot windows7 and centos 7
---------------------------------------------------------
# fdisk -l | grep "Disk /dev"
# blkid -- to see the block device attributes
we can see windows 7 in /dev/sda1 which is hd0,1 in grub2
# cat /boot/grub2/grub.cfg | grep msdos
Create the file /etc/grub.d/15_windows7 as follows::
# vi /etc/grub.d/15_windows7
! /bin/sh -e
echo "Adding Windows 7" >&2
cat <<EOF
menuentry "Windows 7" {
set root=(hd0,1)
chainloader +1
}
EOF
chmod +x /etc/grub.d/15_windows7
rerun grub2-mkconfig -o /boot/grub2/grub.cfg
If we want to make windows7 as default then run
grub2-set-default 2
GUI Installation in Centos 7::
=====================
# yum groupinstall "GNOME DESKTOP" "Graphical Administration Tools"
# yum update --exclude=kernel*
Command to boot directly to GUI in Centos 7
# systemctl set-default graphical.target
# systemctl start graphical.target
# systemctl list-units (to see the installed services)
No comments:
Post a Comment