OpenSUSE and Ubuntu dual boot

Hi all.

I’m about to create a dual boot system from scratch with openSUSE and Ubuntu on a Dell Latitude D820 (the reason for this is both professional and private). I’m an openSUSE user since many years back.

I’ve installed Ubuntu 10.10 (I’m in there right now writing this). This resulted in the following partition table.


micke@nostromo:~$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003d31c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       18693   150148096   83  Linux
/dev/sda2           18693       19458     6139905    5  Extended
/dev/sda5           18693       19458     6139904   82  Linux swap / Solaris
micke@nostromo:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             141G  2.8G  132G   3% /
none                 1001M  296K 1000M   1% /dev
none                 1006M  1.4M 1005M   1% /dev/shm
none                 1006M  168K 1006M   1% /var/run
none                 1006M     0 1006M   0% /var/lock
/dev/sr0              158M  158M     0 100% /media/openSUSE-NET-x86_64.0701..001
micke@nostromo:~$ 

I’m a bit confused about the sda2 partition of type Extended. As I understand it it’s only the sda5 (swap) partition that is part of this Extended partition. This feels weird. Is this a normal layout for a Linux system in general and a Ubuntu system in particular or have I completely misunderstood things?

Now I would like to install openSUSE 11.3 (64 bit) so I need to squeeze the Ubuntu partition down. Since I’m not going to store any data in the Ubuntu system I was thinking of using only 20G for Ubuntu and give the rest to openSUSE. But the installer does not give me any option to resize partition sda1, it does not seem to understand there is another OS already present. Is this the correct behaviour? I should add that although I’ve used Linux for quit a while now I do not feel fully comfortable with this kind of hard core administration, I’m more of a user. So I might do something wrong here.

If I finally manage to get things right and install openSUSE I guess I will be overwriting the bootloader, GRUB (or whatever Ubuntu uses, I haven’t seen it) installed along with Ubuntu. Will this be a problem? Will openSUSE GRUB bootloader automatically detect the Ubuntu system and add an entry for it, kind of like the openSUSE installer does when there’s a Windows system present?

 Regards, Micke.

I have made directions about dual boot. But the are in greek
Dual Boot Windows με Linux and about settings for grub Ρύθμιση και Επαναφορά του GRUB](http://forums.opensuse.org/greek/i-i-i-i/i-i-i-iui-i-i-i-i-i-i-i-i-i-i-i-i-isi-i-i-ioei-i-i-i-i/i-iui-i-i-i-i-i-i-i-documentation/453405-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-grub.html)

Micke,

How would you feel about starting all over again?
What you have is what I would expect from a default Ubuntu install, but it’s far from ideal.
So starting again would be my favoured approach.

But: You could delete sda5 and sda2, then resize sda1. By that I mean shrink it. The extent to which you could shrink sda1 shouldn’t exceed half of the free space. So going by your figures, it would allow you to grab about 65GB
Now create an extended partition in all the free space and then inside the extended:
swap 2GB
15GB ext4 (which will be for suse / )
all the rest to ext4 ( for suse /home)

You can now install SUSE to the new partitions
No, SUSE will not pick up ubuntu
You can add it later (lets come to that if you decide to go ahead)

SUSE uses a different grub than ubuntu

As I know, the default ubuntu installation does that only when you ask it to “Use the entire disk and manage/configure partitions automatically”. This setting is helpful when you are not planning for any other OS installation, whether windows / any other distro. It is a complicated setup to change and modify later on.

Since you are clear that you need to install ubuntu and openSuSE both, it is better to do a manual partitioning (whether you want to do it in ubuntu or in opensuse, that is up to you). That gives you full power as well as flexibility.

You need to do manual configuration always later also. suse installer is a good one at that too.

Regarding bootloader:
ubuntu uses grub2 while suse uses grub legacy. both can work well and usually detect other configurations well. you can build up the grub from the livecds also (in case something bad happens).

My suggestion for you:

  1. If you havent done any major changes since the installation in your ubuntu. Then, you can reinstall. Otherwise, you can use the gparted within the ubuntu live-cd ( i think it is there, not very sure, atm OR you can dl a parted-magic iso and then go on from there) to decrease the size of the root partition of ubuntu to whatever you need (20gig is more than enough).

  2. Proposed partition - sda1= ubuntu root partition (15/20gig), sda2= opensuse root partition (15/20 gig), sda3= opensuse home partition (max available), sda4=linux swap (=depending upon the RAM (usually keep it =RAM on modern systems and so that you can use hibernate/suspend without any issues).

  3. Install/keep the ubuntu root partition. No need for any separate home partition! Install the ubuntu-grub in the MBR which it should have done already.

  4. Install opensuse (Net-install) with manual disk configuration. Keep sda2 as root (ext4) and sda3 (ext3/ext4) as home. Linux swap it will recognise on its own.

  5. Now you have two choices. either let suse-installer automatically detect the ubuntu installation and keep an entry for it. Or you can let go of that.
    And later configure the ubuntu grub to detect it automatically and set it up for you (follow this guide- https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202)

Also refer to this excellent guide. GRUB 2 bootloader - Full tutorial

One more short guide.
http://ubuntu-utah.ubuntuforums.org/showpost.php?p=9537141&postcount=2

Hope this helps you.
reo

While installing two Linux distros or more, there is a golden rule that too many people tend to ignore: never let any setup do what you can do yourself!
You can follow this method (or another one). But here’s the one I suggest:

  • Take the time to think about how many partitions you need or want. For this part, there is indeed no rule. You can use 2 or 20 partitions. A separate /home is advisable. You can also share the same home partition (but NOT the same /home directory!) between different distros. I’ve been explaining how in this thread: Installation of 11.3 on IBMx3400 Crash and Partitioning Question. (among others).
  • Take a sheet of paper and write the partitions with size and destination (mount point) you’re planing to use. Example:
sda1   -   20GB    /  (openSUSE)
sda2   -   20GB   /   (Ubuntu) 
sda3   -   20GB   ( free for now )
sda4   -   extended 
sda5   -   8GB    /var   (openSUSE )
sda6   -   8GB    /tmp  (both)
sda7   -  the rest - 2 GB  /home ( later divide in /home/openSUSE and /home/Ubuntu)
sda8    - 2 GB   swap

This is of course just an example that some may find far too complicated and other far too simple.

  • boot PartedMagic to create these partitions (all of them), so that partitioning and installing remain two separate things.
  • When you know what you are doing the order in which you install doesn’t matter. When you’re unsure, install openSUSE first (because it’s a MBR killer, just like Windows)
  • In openSUSE partitioner setup, choose the last option “Create partiton setup”. If you do so, you stay the boss. You can pick the partitions you want to use for openSUSE, assign mount points and check “format”.
  • In Advanced boot options or Grub options (I never know), select to install Grub in the root partition. Feel free to activate or not this partition. Ok … to make it simpler, activate it.
  • I forgot to say that if you choose to share your /home partition (which is an option but you don’t have to), you should create a dummy user during setup and not the user you’re planing to use later. Same goes for Ubuntu.
  • When you’re done with openSUSE, install Ubuntu. Same thing, choose the last option “Custom Partitioning” and nothing else. Again, I don’t remember the name exactly but it is the last option. By doing so, you stay the boss. As for openSUSE, select the partitions you want to use for Ubuntu.
  • Grub will be installed by default in MBR and that’s what we want.
  • Entries to boot openSUSE will be added automatically in Ubuntu’s Grub2 menu (which if the file /etc/grub/grub.cfg under Ubuntu).

Good luck.

@ thermopyle
My guess is you are now quite confused

@ please_try_again
Whilst I understand what you say. I find it quite unconventional advice for an obvious beginner.
It’s not an approach I would recommend in this instance, sorry.

Also I forgot to say: whenever you see anything saying “Expert mode”, select it! When you’re installing 2 Linux or more, you are an expert (even if you don’t feel like one).

That’s the only really safe way to do it. Dual or multibooting is something Linux setups don’t expect… except openSUSE, which expects Windows but certainly not Ubuntu. Installing Ubuntu after openSUSE is safer since Ubuntu never writes a generic bootcode into MBR unlike openSUSE. If Ubuntu overwrites the MBR, at least it puts another Grub there. With openSUSE, if you don’t pay attention, check “write generic boot code in MBR” (some people do) and don’t activate a partition, the result is an absolute NO BOOT situation. This won’t never happen if you install Ubuntu last.

Not to mention that puting / in a logical partition while you can avoid it is not an approach I would recommend in this or any other instance, as soon as there are other options.

The partitoning example I gave was not a suggestion, just an example, actually a bad one. But that wasn’t the point.

Thanks for all the answers!

I don’t mind starting from scratch again, and yes; I do feel a bit confused right now but since one of my goals here is to learn something new it’s not a problem.

I will read through all the info here and work out a layout for the partitions and present it here. If you guys are still around you’re most welcome to comment on it.

Thanks again for your effort!

Regards, Micke.

Micke,

No worries.
We look forward to being of assistance if and when you need it.