Skip to main content

OS - Dual boot Oracle Linux / Windows 10

Versão Portuguesa

Sometimes is useful to have two operative systems in the laptop, is possible to get that creating two partitions in th disk, and to install the OS in the respective partition.
But this post is not about that - this post is about .. after have the installation is done.
After install Linux, is expectable to have a menu to select the operative system.
That didn't happened in my latptop, it's loading directly the Linux .. upss Windows 10 "has gone" !!!
This post is about that .. feature



Quick check
From the bellow commands we can get some usefull info - about the Operative Systems .. and about the disk partitioning . We can see a partition for/with Windows.
Nice, I didnt installed in the wrong partition :)



[root@mylaptop ~]# cat /etc/oracle-release
Oracle Linux Server release 7.3

[root@mylaptop ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

[root@mylaptop ~]# uname -a
Linux mylaptop.rogerioantonio.com 4.1.12-61.1.18.el7uek.x86_64 #2 SMP Fri Nov 4 15:48:30 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@mylaptop ~]# fdisk -l

Disk /dev/sda: 180.0 GB, 180045766656 bytes, 351651888 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xc0ff46d8

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 139920590 69959271+ 7 HPFS/NTFS/exFAT/dev/sda2 139921408 140914687 496640 27 Hidden NTFS WinRE
/dev/sda3 140914688 142866431 975872 83 Linux
/dev/sda4 142866432 351651839 104392704 5 Extended
/dev/sda5 142868480 146784255 1957888 8e Linux LVM
/dev/sda6 146786304 351467519 102340608 83 Linux

Disk /dev/mapper/ol-swap: 2000 MB, 2000683008 bytes, 3907584 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Setup dual boot Oracle Linux / Windows 10
To get the menu it looks is need to make some manual configurations, to make that happen I will do two steps :

1 - To add the below entries into the /etc/grub.d/40_custom file

menuentry "Windows 10" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)' chainloader +1
}

2 - recompile the grub : grub2-mkconfig -o "$(readlink -e /etc/grub2.cfg)"



[root@mylaptop ~]# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +5 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment.Be careful not to change
# the 'exec tail' line above.

menuentry "Windows 10" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}

[root@mylaptop ~]# grub2-mkconfig -o "$(readlink -e /etc/grub2.cfg)"

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.1.12-61.1.18.el7uek.x86_64
Found initrd image: /boot/initramfs-4.1.12-61.1.18.el7uek.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-cde31ac14a2b4b86b98701797bbb530f
Found initrd image: /boot/initramfs-0-rescue-cde31ac14a2b4b86b98701797bbb530f.img
done

[root@mylaptop ~]# reboot


At this point - after the reboot you will have the menu for dual boot


Futher Reading : https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sec-customizing_the_grub_2_configuration_file

Thank you for reading, hope this post was helpful.
Rogerio

Comments

Popular posts from this blog

DB - How to monitor Oracle datapump jobs

These days there is lot of work around database migrations not only but mainly to cloud providers. One of the ways to migrate Oracle databases is using data pump (expdp/impdp). In general works fine, it allows an easy way to bring the database even different OS. It is always good to monitor the progress, to know where we are and estimate how long we are from the end. In this post, I am sharing some queries to help with database monitoring progress. The queries can be easily tailed to various scenarios. Starting with a simple one - the track the number of objects loaded during an import operation. When there is a massive amount of errors during the import. Drop and run the import again. The bellow query can be useful also to monitor the number of objects if we are dropping the users. Here, I’m making the assumption there were no other database activity in progress on the last 24 hours. select owner, count(0) from dba_objects where owner in ( select username from dba_users where created...

VM - Partilhar Pastas Windows - Linux

Neste post escrevo como partilhar pastas entre Windows (Host) e uma VM Guest, neste caso Linux. Ha algumas formas de fazer isto, esta parece me a mais facil. Seleccionar a Pasta Windows Na consola Virtual Box > Devices > Shared Folder Seleccionar a pasta windows para partilhar no Linux   O   Montar a pasta Windows na VM Ha duas opcoes : 1) Reiniciar a VM (Auto-mount) 2) Linha de comando [root@host ~]# mkdir -p /u01/stage/win_ebs_sw [root@host ~]# chmod 777 /u01/stage/win_ebs_sw [root@host ~]# mount -t vboxsf Oracle_EBS /u01/stage/win_ebs_sw/ [root@host ~]# ls /u01/stage/win_ebs_sw ebs_weblogic_webtier [root@host ~]# df -h /u01/stage/win_ebs_sw Filesystem Size Used Avail Use% Mounted on Oracle_EBS 895G 494G 401G 56% /u01/stage/win_ebs_sw Guardar a Configuracao no /etc/fstab para tornar as alteracoes permanentes. [root@host ~]# echo "Oracle_EBS /u01/stage/win_ebs_sw vboxsf defaults 0 0" >> /etc/fstab [root@host ~]# cat /etc/fstab # /etc/...

DB – How to monitor Oracle database long ops ?

As DBAs, some questions we are often asked and to be fair we ask ourselfs when we are doing massive operations, are : Is the database doing something? How long the database takes to complete the task? There a data dictionary view, GV$SESSION_LONGOPS whom is really usefull for monitoring and to provide estimated time to get the task done. Starting with a first example, a query for general propose . set lines 240 col message form a100 col opname form a50 select * from ( select round(l.sofar/l.totalwork*100,2) as complete, --l.* l.sid, --l.opname, l.message, l.start_time, l.time_remaining/60 "minuts remaining", l.elapsed_seconds from gv$session_longops l where totalwork !=0 ) where complete < 100; The view is also usefull on specific operations such as Oracle Recovery Manager (RMAN) jobs monitoring, this query returns information about backup,restore and recovery. select sid, serial#,opname, context, sofar, totalwork, round(sofar/totalwork*100,2) "%_complet...