Ubuntu – 3 OS’s on same HDD

12.10dual-bootgrub2partitioning

I've been all day around my laptop and just can't make it work,

I have one HDD 750 GB in size, and I would like to have the following partition table:

60 GB - Windows 7
150 GB - Windows 8
150 GB - Ubuntu 12.10
390 GB (Rest) - Logical drive for files

However for some reason (and I start by installing windows because I want grub for boot menu) it is not possible to begin the installation with this table and the problem is I cannot have more than four partitions on same disk, since windows automatically creates that annoying 100 MB extra partition.

So after many many trial – error installations and partitioning I got this:

part1: 100 MB - Windows (auto created)
part2: 60 GB - Windows 7 installed
part3: Extended partition with
    3.1: part5 150 GB -> Windows 8 installed
    3.2: part6 360 GB -> logical for files
    3.3: part7 8 GB   -> Swap
    3.4: part8 160 GB -> Ubuntu 12.10

All OS's were successfully installed I can see every partition's content on Ubuntu.

Since Ubuntu was installed last I managed to have grub, which shows windows 8 (fails to boot when selected: 'Error reading disk'), windows 7 doesn't show at all, and Ubuntu seems pretty fine to me.

Is there any way to make this work? I searched everywhere can only find dual boot solutions… I don't mind having to reinstall everything again.

Output of

sudo fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 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: 0x44ae409c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   127066111    63429632    7  HPFS/NTFS/exFAT
/dev/sda3       127068158  1465142699   669037271    f  W95 Ext'd (LBA)
Partition 3 does not start on physical sector boundary.
/dev/sda5   *   127068160   423938047   148434944    7  HPFS/NTFS/exFAT
/dev/sda6       423940096  1132926975   354493440    7  HPFS/NTFS/exFAT
/dev/sda7      1132929024  1149175807     8123392    7  HPFS/NTFS/exFAT
/dev/sda8      1149177856  1465142699   157982422    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders, total 15523840 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 identifier: 0x0006d557

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          62    15508989     7754464    b  W95 FAT32

Thanks

Best Answer

Since you are starting all over: Windows needs a primary partition to boot from but you can make sure that both windows 7 and windows 8 each have only one primary partition. You need to create a ntfs partition before you run the windows setup and set the boot flag (I recommend to use gparted). If you now select this partition during setup it won't ask you to create the extra partitions. See also this answer on superuser. Repeat this for your other windows installation.

Now you still have 2 primary partitions available, one of which I would use for an extended partition with ubuntu and swap, because Ubuntu doesn't mind booting from an extended partition. Then you still have one primary partition left to do with whatever you like...

So:

part1: 60 GB  - Windows 7 installed
part2: 150 GB - Windows 8 installed
part3: Extended partition with
    3.1: part5 160 GB -> Ubuntu 12.10
    3.2: part6 360 GB -> logical for files
    3.3: part7 8 GB   -> Swap
Related Question