Dual-boot SLED 10 and OpenSUSE 11.0?

I’m running SLED 10 SP1 on my IBM Thinkpad R50e. I want to dual-boot my current SLED 10 and OpenSUSE 11.0.

I have the Install DVD and I’m ready. I want to know if it’s possible to dual-boot and if it is how. I can’t get rid of SLED 10 because this is a school laptop. They said I could do this as long as I don’t delete SLED 10.

Sure. This is possible.

You may just want to consider the bootloader. Currently you have SLED managing this, but by default OpenSuse 11.0 will take control, unless you manage it otherwise. Set grub to install to the root partition of suse 11.0
Then boot SLED to add the suse 11.0 to the bootloader. You can share the swap partition but create a new root and home for suse 11.0. You will have to create an extended volume and create the logical partitions within that.

I suggest you first do the partitioning for 11.0 from within SLED. Then at the 11.0 installation partitioning step, enter the dialog manually go to expert mode and assign the partitions to the 11.0 mount points. You can of course share the swap partition, so on a laptop you probably will only be using 2 new partitions, for root and /home.

The key to what you want to do is at the Boot Loader step. Enter the dialog, click on Boot Loader Installation tab, and in the Boot Loader Location column check “Boot from Root Partition”; be sure that all other boxes are cleared. That will install grub to the root partition boot sector while leaving the MBR untouched, where the SLED is already installed. IIRC the installation process will reboot itself but not loop back through the bios and MBR; it needs to reboot to finish. After it has finished reboot back into SLED. As root make a backup copy of /boot/grub/menu.lst. You can approach this in a couple of ways: In YaST Boot Loader you can click the Other button (bottom-right) and click on Propose New Configuration, click Other, click Edit Configuration Files; there is a new editing screen with a pull-down at top, choose menu.lst - there should be a new stanza added for booting 11.0. Clear the Boot Location boxes and click OK, Finish and menu.lst will be re-written as you saw it.

Personally, I just do the above by hand with a text editor as root in the /boot/grub/menu.lst file. You only need a stanza something like this:

###Don't change this comment - YaST2 identifier: Original name: openSUSE11.0###
title openSUSE 11.0
    root (hd0,6)
    chainloader +1

Of course, the “(hd0,6)” above needs to be whatever the root partition is for 11.0, in grub numbering (starting at zero). So the above is partition #7; change it as needed. That will caused the SLED grub to “chainload” to the 11.0 grub you installed in the boot sector. This way, you can make changes to the 11.0 menu.lst (which happens with every kernel update) and won’t have to change anything in SLED.

Finally, as an aside, be sure not to select the Automatic Configuration at the start; you’ll want the granular control and visibility setting up the hardware later.

Good luck.

Can you tell me how to do that? Step by step?

Sorry, I kind of thought that I had. But, sure, happy to help.

First, you need to decide which you want to control the boot, SLED or openSUSE. From what you wrote in your first post, I assumed you would want that to be SLED; yes? I think that may be safer, especially with a laptop. So SLED, right?

Assuming yes, we will do this in 2 distinct steps: What you do when installing openSUSE, and what you do afterward in SLED. This is not difficult, but you must be careful to do everything precisely.

But before we begin, because this is a laptop, I first want to see your partition table. So in SLED, open a terminal window, and as root run the following command:

fdisk -lu

And post the output back here. Then I can give you exact instructions, including for the partitioning.

I want SLED like you said. Here’s the output:

Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders, total 58605120 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 63 2313359 1156648+ 82 Linux swap / Solaris
/dev/hda2 * 2313360 23315039 10500840 83 Linux
/dev/hda3 23315040 58605119 17645040 83 Linu

Looking back at what the output was I saw it might not be easy to see. Here’s the screenshot of the terminal:

Thanks for the screenshot - you’re right, a simple terminal copy/paste can cause eye strain. :wink:

Before proceeding with the boot loader instructions, did you already have a plan as far as the partitioning? The disk is only 30GB, with swap being ~1GB, root being ~11GB, and /home being ~18GB. How much space were you planning for openSUSE? or, what do you plan to use openSUSE for? And how much free space do you have in your root and /home partitions:

df -H /dev/sda2
df -H /dev/sda3

If you have enough free space in sda3 (I have no idea what you are using SLED for), you may be able to downsize just that partition to make room for openSUSE, but again that depends on what you are going to do with openSUSE. Your space is tight, so you may need to downsize sda2, move sda3 to the left into that freed space, and then downsize sda3. A basic openSUSE Gnome or KDE installation requires ~3.5GB; that does not include space for user data or extra applications.

However you resize and/or move the partitions, you will have to do that from a LiveCD or LiveUSB (if your bios permits booting from USB): The partitions cannot be mounted when being modified this way. And note, if you must move sda3 into space freed by downsizing sda2 (as described above, if this is the only way to get as much space as you want for openSUSE), the CD will need to have the GParted partitioning tool. You can use the openSUSE LiveCD only if you are not moving sda3 because YaST cannot move partitions. Unless you have something like Knoppix, probably the best would be PartedMagic which is designed for only this purpose and is <100MB; it supports both CD and USB (the CD is definitely easier to create).

The final consideration is backup. While downsizing works fine by far most of the time, it is still possible to lose the partition (for example, there can be bad blocks on the disk or the file system can have some corruption in it, which interfere with moving the data). Therefore it is always strongly recommended to have a backup of anything you cannot replace, or the entire OS unless you are able to reinstall it.

These additional factors may not have been expected. I had no way of knowing until I saw the table.

So, how do you want to proceed?

I don’t need that much space for OpenSUSE. I’m just going to install a few things. All of my school work will be done in SLED. That’s like 65% of the time.

When I try the code it says this:
df: `/dev/sda2’: No such file or directory

for both codes.

Here’s what it says for /dev/hda instead of /dev/sda:

Rfiftye8TwentyN:/home/samuel.pepose # df -H /dev/hda1
Filesystem Size Used Avail Use% Mounted on
udev 393M 148k 393M 1% /dev
Rfiftye8TwentyN:/home/samuel.pepose # df -H /dev/hda2
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 11G 5.2G 5.6G 49% /
Rfiftye8TwentyN:/home/samuel.pepose # df -H /dev/hda3
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 19G 377M 18G 3% /home

I looked with nautilius and it’s not there. I tried as root too.

I already have my important stuff backed up. I can always get my computer reimaged if I break anything.

I like to live on the edge. I’ll really want OpenSUSE!

OK. I’m sure you understand my conservative approach - not a good idea to presume what is acceptable for another user.

And sorry about the “sda”, that’s habit and I didn’t catch the “hda” in your fdisk. You are using an older kernel that pre-dates the major libata/scsi emulation change (introduced somewhere around the 2.6.18 kernel); now the “h” even for IDE/PATA hard disk is an “s” (the same as SATA). The “h” is still used for optical drives, however.

Since you have almost nothing in hda3, you can downsize it to fit openSUSE. That still leaves the problem of not being able to resize a mounted partition (that can corrupt the filesystem, so the tools will not permit it). Therefore the need to do it with external code such as a LiveCD. By the way, with a partition so small, you could just delete it, re-recreate it small, and then restore it with a backup; but again, that would need to be done with an external tool, too.

I can think of 1 other possibility, although this is an outside chance: Booting into SLED to runlevel 3 (i.e., not starting X), dismounting hda3, running the YaST partitioner in ncurses mode to downsize it. Since you’re an “on the edge” kinda guy, and you have backups, you could try this. If you want, I will try it for you on one of my test setups.

As far as the amount of space, with how much you have unused in hda3, seems you have flexibility there. If you just want to play around with openSUSE, ~6GB should do. If you intend to put this to real “production” use with email, downloads, etc. you will need as much as you can spare. Probably not good to go over 15GB.

Once you’ve decided on how to resize hda3, we can revisit the boot loader setup. You’ll do this in 2 pieces, modifying the default boot loading installation during the openSUSE process, and then seting up SLED to boot openSUSE accordingly.

Did you want me to test that alternate resizing idea for you, or do you want to just go ahead with the LiveCD?

Which would be better? I have the livecd and the dvd. And like I said I don’t care if it corrupts stuff; I’ll just reinstall everything.

DVD always the best choice

The openSUSE LiveCD will be a lot easier than the DVD. However, the YaST Partitioner is not nearly as easy to use as GParted that’s on the PartedMagic CD or e.g., on Knoppix. But YaST can do the job; I just double-checked it. Just boot into the LiveCD, navigate to YaST/System/Partitioner. Click on sda3 (hda3 in SLED) and click on Resize. The slider may not work in this case, so you may have to use the box to its right instead. Enter the amount of space in KB you want to reclaim; the graphic above should move accordingly. Click OK. The partition table will be displayed again with the change; double-check there.

For the openSUSE installation: (1) At the partitioning step, make sure the “suggestion” uses the existing swap partition and puts all of openSUSE on a single partition in the space you created. It may not. E.g., it may try to create an extended primary and split openSUSE between a root and a /home on 2 logicals; you don’t want that. So if it needs to be changed, click on the title and then navigate to “Expert”. The current partition table will be displayed with no changes. Click on the swap partition and on the next screen specify “swap” in the “mount point” field. Then back on the table screen click on “Add” and add a single primary (not an extended) taking the full space available, and specify root (i.e., /) for the mount point. Click OK all the way back to the summary screen and it should display what you want it to do.

Later at the Boot Loader installation step, again click on the title and enter the dialog screens. Click on the Boot Loader Installation tab. Under Boot Loader Location, probably “Boot from Master Boot Record” will be checked; uncheck that. Instead check “Boot from Root Partition”. Click Finish. Grub will now be installed to the sda4 (hda4 in SLED) PBR (Partition Boot Sector).

Note: openSUSE must reboot itself to run the final installation scripts. Usually it does this in-place, that is, without cycling all the way back through the bios and MBR. But I have seen it do the latter. If that happens, since the openSUSE grub is not in the MBR, SLED will boot. Once SLED is set up to boot openSUSE, at first openSUSE boot the installation will complete.

Now in SLED: Open /boot/grub/menu.lst with a text editor as root. Copy paste the following as a new stanza below the SLED stanza (be sure there is at least 1 blank line between):

###Don't change this comment - YaST2 identifier: Original name: opensuse###
title openSUSE 11
    root (hd0,3)
    chainloader (hd0,3)+1

Save the file. Reboot. Now you should see a new entry on the SLED boot screen, for booting openSUSE. When you select this, the SLED grub that is in the MBR will transfer control (“chainload”) to the openSUSE grub you installed to sda4 (hda4).

That’s all there is to it. Good luck.

To clarify: Use the DVD to do the installation, for sure. But use the LiveCD to do the partition resizing we’ve been discussing.

Yes. I see, I needed to go back a post or two and didn’t. My favorite is Parted Magic to do serious work there. But I always find the suse install partitioner very good, though I can understand some getting lost there.
I’ll not stick my nose in here anymore mingus:X

Can’t I use SLED to do the partition resizing?

And how much should I make the bar to? How many kb?

I read your previous post. So I need 6gb to play around with it and no more than 15gb. Should I just use 11gb? Move the bar so it says 11gb? and can I do this from sled?

Pls review my earlier posts - you cannot resize a partition that is mounted. That is liable to corrupt the filesystem, and a partitioner will block you from doing it. So you cannot do it from within SLED because hda3 is mounted at /home. I offered to try an experiment of booting into runlevel 3 (which will not start X which opens a lot of files in /home), dismounting that partition, and then running the YaST Partitioner from the command line - there is an outside chance that may work. I would not want to do this unless you have a backup of that partition; you indicated you did. But you declined, saying you have a LiveCD. Even if the experiment works, you’ll find it much easier to do with the LiveCD than running YaST from the command line.

If you use the openSUSE LiveCD YaST Partitioner, the resizing will be self-evident. If the slider doesn’t work, just type in the right-side box the amount of space you want reclaimed. I don’t recall offhand if the amounts are in KB (kilobytes, not Kb or kb, which is kilobits) or in MB; as I think about it, probably MB. It should be apparent from the numbers and the illustration. Also, after you “OK” the resize request, you’ll see the revised partition table; look there for the new partition size - it will use GB, so you can verify there. Then hit Apply, you’ll be returned afterward to the table screen where you can again check the result.

Naw, I always welcome more help. Can’t use the DVD for this task because the partition will have been mounted.

Should I just use 11gb?

Sounds good.