Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Apologies first of all. I'm a newbie, and I'm sure it will be obvious there are many things I don't understand.

I'd like to install both Ubuntu and CentOS on a new machine. Ubuntu is what I am used to and comfortable with (and what is currently connecting to the network in an unproblematic way), but for some software/work reasons I'd like the option of booting into CentOS.

Basic setup of the machine: two 2-terabyte hard drives, /dev/sda1, /dev/sda2

I installed CentOS first. Now I am trying to install Ubuntu. Ubuntu isn't seeing my CentOS installation. In order to not just write over CentOS, I went into the partition editor. But I don't know how to edit my partitions. I see that there's a /dev/sda1 on with 524 MB allocated to it, ext4 filesystem, 52 MB used. I presume that's where CentOS is installed. then I have 1999873 MB unallocated free space.

How do I set up /dev/sda so that Ubuntu installs nicely alongside CentOS? I assume I have to set up partitions in the unallocated free space. Do I set up another 524 MB partion, say its ext4, and say that the mount point (confused on this concept) is /boot? Then do I set up another partition with the rest of the space, with mount point / ? Do I set up my swap space at the end of /dev/sda as a last partition?

Thanks, and apologies for my ignorance. I have been trying to read about this online but it is hard to find discussions of the issues pitched to my level and it would be helpful to have a dialogue.


Thanks for all the responses. My question has now evolved. Before I knew that anyone had replied, I decided to install Ubuntu as the first OS, allowed it to wipe CentOS, then reinstalled CentOS, pointing it the same disk /dev/sda (thanks for the correction) as the Ubuntu installation. I installed grub and now I can boot into both OSs. So I'd be a happy clam if it weren't for Adaephon's comment below. According to what I can glean from looking at the display in gparted, when I installed Ubuntu from my Live CD, it took a 487 MB partition for /boot/efi and says it's using 3.04 MiB of space. I let CentOS make its own decisions,and it took 500 MB for its boot partion, after a 6.95 GB root partition. I don't know if that was enough space or whether I am going to have problems down the road. Definitely better to fix them now if so!

Here is the output of fdisk -l /dev/sda /dev/sdb (from Ubuntu):

Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  3907029167  1953514583+  ee  GPT Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 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: 0x000315ee

   Device Boot      Start         End      Blocks   Id  System /dev/sdb1            2048  3907029167  1953513560   8e  Linux LVM

Here is the output of df -l -xtmpfs -xdevtmpfs

 Filesystem     1K-blocks    Used Available Use% Mounted on /dev/sda2  7037432 3323776   3333088  50% / /dev/sda1         497696    2116    495580   1% /boot/efi

It seems it is an EFI machine.

share|improve this question

closed as unclear what you're asking by chaskes, Braiam, laurent, waltinator, Amith KK Apr 21 '14 at 5:59

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

If you have two hard drives they should be /dev/sda and /dev/sdb. /dev/sda1 and /dev/sda2 are the first two partititons on the first hard drive. Also, it is unlikely (quite impossible) that the 52 MB are the complete CentOS installation. Even 524 MB is a rather tight fit. Can you boot CentOS and update your question with the outputs of fdisk -l /dev/sda /dev/sdb and df -l -xtmpfs -xdevtmpfs? – Adaephon Mar 26 '14 at 15:45
Is this an EFI or traditional BIOS machine? – chaskes Mar 26 '14 at 16:12
Thank you both. I updated my question with the answers to yours. – Katie Mar 26 '14 at 18:46
I think your question boils down to How Do I Install CentOS and is therefore off-topic. But here's why I asked about EFI. My experience with any RH-based distro and EFI is that (unlike Ubuntu) you need to create/mount a separate /boot and specifically mount the existing /boot/efi during the install. – chaskes Mar 26 '14 at 18:53
In other words, don't let CentOS automatically set up it's own partitions, choose Edit Partition Setup (or similar, forget exact option title), and make sure you've chose standard partitions not LVM. Create a 500 MB partition for CentOS /boot. – chaskes Mar 26 '14 at 18:56

2 Answers 2

I am not an expert on linux but I found this online, which might be helpful.

As far as I understand, for a linux installation, you basically need a system partition, in ext4 format and a swap area. You can also build separate partition for your home folder and other files, but not necessarily. The system partition houses the OS and should be marked as primary and mounted at "/". You need few up to 20 GB since you will install other software and store files later. The swap area needs from few hundreds MB up to twice of your RAM, depending on your needs. The mount point is just where your system will boot from.

But I am a little surprised that your CentOS partition is only 500+ MB. Not sure if that's enough for later usage.

And make sure you set up the bootloader correctly. For ubuntu it's Grub.

Good luck.

share|improve this answer

I installed dual-boot XP and Ubuntu 12.0.4. I found that I could select "something else" when it came to where to install Ubuntu. After that, select the drive and partition that you do not want disturbed, and select edit or something like that and select "do not use" (do not make any other changes to it). Do the same on all of the partitions used by your other operating system that you do not want disturbed.

Then be sure to select where to install grub (which is the bootloader -- one is required to start any Linux OS). Incidentally, ubuntu uses grub2 and calls it grub.

Finally, select where you want to install Ubuntu to (so that it is highlighted) and edit or create or something like that and select format and ext4 and make it the / partition.

Now click install.

I am not using an EFI machine, so this may or may not be helpful.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.