LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2016, 09:01 AM   #1
mangya
Member
 
Registered: Jul 2015
Distribution: CentOS
Posts: 89

Rep: Reputation: Disabled
Please help me with partition regarding uefi multi-boot ...


Hello

I want install Ubuntu 16.04 as my default OS and CentOS 7 as advanced learning OS. I have a hdd of 1TB with GPT partitioning scheme.

I partitioned as follows:

Code:
sda1 500M EFI
sda2 8G   Swap
sda3 15G  ext4 ## For Ubuntu
sda4 15G  xfs  ## For CentOS
sda5 200G ext4 ## Home for Ubuntu
sda6 200G xfs  ## Home for CentOS
I installed Ubuntu on sda1 (/boot/efi), sda3 (/), sda5 (/home) and then installed CentOS on sda1 (/boot/efi), sda4 (/), sda6 (/home).

Following is happening:
  1. I boot to CentOS grub2 menu, can boot to CentOS but when I select Ubuntu option, it says cannot find Ubuntu's kernel to boot.
  2. I switched OSs, installed first CentOS and later installed Ubuntu. Same thing, i can boot to Ubuntu but cannot boot to CentOS. Same error message.
  3. I tried os-prober and updated grub2, but still the same problem - cannot find kernel.

Please guide me on how I should solve this. Googled, but couldn't find any answers (all solutions are for dual boot with Windows only, no linux-linux dual boot). Is this even possible - multi-booting two linux distros in efi? Worked when using mbr though, but I don't want to use mbr.

Is there any other way I should partition my disk?

Thank you.
 
Old 06-29-2016, 09:47 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member response

Hi,

Look at; UEFI - Ubuntu Guide

Be sure too look at; boot-repair -- Ubuntu Community wiki

Plus you should scroll down within this thread to check out similar threads for possible help.

Hope this helps.
Have fun & enjoy!
 
Old 06-29-2016, 09:48 AM   #3
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
You should always add a /home partition, since when a reinstallation is done, the /home partition can be used without formatting the /home partition.

Further, you can add a partition for /var and /tmp.

And just use ext4 for all parititons, since ext4 is the fastest linux filesystem.

The error when trying to boot Centos, is the missing entry in grub.cfg for Centos.
 
Old 06-29-2016, 10:03 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member response

Hi,

I see no harm in using a partition for /home. But you should not mix /home between different Gnu/Linux installs since that will certainly create issues. I like to configure my Slackware installation with;
Code:
# cat /etc/fstab

/dev/sda2        swap             swap        defaults         0   0
/dev/sda5        /                ext4        defaults,noatime,discard         1   1
/dev/sda6        /home            ext4        defaults,noatime,discard         1   2
/dev/sda7        /usr             ext4        defaults,noatime,discard         1   2
/dev/sda8        /var             ext4        defaults,noatime,discard         1   2
/dev/sda9        /tmp             ext4        defaults,noatime,discard         1   2
#/dev/sdb2        /mnt/win7        ntfs-3g     fmask=111,dmask=000 1   0
/dev/sdb1        /mnt/win7        ntfs-3g     fmask=111,dmask=000 1   0

#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
Allocated as;
Code:
# fdisk -l /dev/sda

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x2cad8de1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    41945087    20971520   83  Linux
/dev/sda2        41945088    46241791     2148352   82  Linux swap
/dev/sda3        46241792    88184831    20971520   83  Linux
/dev/sda4        88184832   500118191   205966680    5  Extended
/dev/sda5        88186880    94478335     3145728   83  Linux
/dev/sda6        94480384   115451903    10485760   83  Linux
/dev/sda7       115453952   136425471    10485760   83  Linux
/dev/sda8       136427520   138524671     1048576   83  Linux
/dev/sda9       138526720   146915327     4194304   83  Linux
Size for each;
Code:
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5       2.9G  354M  2.4G  13% /
/dev/sda6       9.8G  5.5G  3.8G  60% /home
/dev/sda7       9.8G  8.1G  1.2G  88% /usr
/dev/sda8       976M  398M  512M  44% /var
/dev/sda9       3.9G  704M  3.0G  20% /tmp
tmpfs           7.8G  141M  7.7G   2% /dev/shm
/dev/sdb1        98G   57G   42G  58% /mnt/win7
/dev/sdc2        92G   53G   35G  61% /mnt/sdc2
/dev/loop1      2.6G  2.6G     0 100% /mnt/sde
I use external USB drives for local storage so as not to load my SSD.

Hope this helps.
Have fun & enjoy!

Last edited by onebuck; 06-29-2016 at 10:05 AM. Reason: clarificaation for installs
 
Old 06-29-2016, 12:11 PM   #5
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
I don't see anything wrong with your disk partitioning scheme. On UEFI/GPI systems, os-prober sometimes gets it wrong. Is CentOS your primary boot loader? I am less familiar with ubuntu. Perhaps someone else could help with that. Assuming CentOS, insert the following stanza in Cent's /etc/grub.d/40_custom:
Code:
menuentry "Ubuntu" {
  insmod part_gpt
  insmod chain
  insmod ext2
  set root='(hd0,gpt1)'
  chainloader /EFI/ubuntu/grubx64.efi
}
Then remake the CentOS grub.cfg file using
Code:
grub2-mkconfig -o xxxxxxx
You need to check where grub.cfg is stored. Usually for Fedora-based distros, it is in /boot/efi/EFI/******/grub.cfg
Find out where yours is located and reboot. If all goes well, your should see Ubuntu from Cent's grub menu.
 
1 members found this post helpful.
Old 06-29-2016, 12:15 PM   #6
mangya
Member
 
Registered: Jul 2015
Distribution: CentOS
Posts: 89

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by plasmonics View Post
I don't see anything wrong with your disk partitioning scheme. On UEFI/GPI systems, os-prober sometimes gets it wrong. Is CentOS your primary boot loader? I am less familiar with ubuntu. Perhaps someone else could help with that. Assuming CentOS, insert the following stanza in Cent's /etc/grub.d/40_custom:
Code:
menuentry "Ubuntu" {
  insmod part_gpt
  insmod chain
  insmod ext2
  set root='(hd0,gpt1)'
  chainloader /EFI/ubuntu/grubx64.efi
}
Then remake the CentOS grub.cfg file using
Code:
grub2-mkconfig -o xxxxxxx
You need to check where grub.cfg is stored. Usually for Fedora-based distros, it is in /boot/efi/EFI/******/grub.cfg
Find out where yours is located and reboot. If all goes well, your should see Ubuntu from Cent's grub menu.
Thanks I'll try your solution.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get dual boot, win 7 uefi and elementary freya os uefi working shywolf Linux - Newbie 4 12-10-2015 06:14 PM
Accessing installed Ubuntu partition on UEFI, GPT and Secure boot enabled ultrabook kamesh419 Ubuntu 5 07-14-2013 03:20 AM
Do I Need a Special UEFI Boot Partition? joncr SUSE / openSUSE 4 10-05-2012 09:15 AM
UEFI boot partition in mint 11 installer crashes. expat Linux Mint 2 10-09-2011 03:16 AM
Sharing /home partition in a multi-distro multi boot setup firewiz87 Linux - Distributions 6 08-24-2010 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration