How to install bootloader on extended (logical) partition

I’m trying to install Leap 15 on a partition of a pre-partioned MBR disk (specifically: sda7), and I’m not seeing how to do what I’ve always done with my OpenSuSE installs: install the bootloader only in the root partition. This so I can use a separate boot manager in the MBR.

Here’s my parted output for that disk:


# parted /dev/sda print
Model: ATA WDC WD10EZRX-00L (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  52.4GB  52.4GB  primary   fat32           type=0b
 2      52.4GB  105GB   52.4GB  primary   ntfs            type=07
 3      105GB   1000GB  895GB   extended                  boot, lba, type=0f
 5      105GB   136GB   31.5GB  logical   ext4            type=83
 6      136GB   138GB   2089MB  logical   linux-swap(v1)  type=82
 7      138GB   170GB   31.5GB  logical   ext4            type=83
 8      170GB   1000GB  830GB   logical   ext4            type=83

/dev/sda7 is where I’m trying to install Leap 15 to. /dev/sda5 contains my working OpenSuSE 13.1 root that I want to preserve so I can multi-boot it.

What I want to do is install my Leap 15 bootloader only to the “root” partition, as I’ve always done before (sda7 in this case), leaving the MBR alone!

My problem is this: in the Leap 15 Installer, the Bootloader Options only display these options:

  1. Install / Do not install bootcode into MBR
  2. Install / Do not install bootcode into a partition with /boot

If I select the 2nd option, it says it’s:

  • Status Location: /dev/sda3 (/boot)

That’s not what I want, and that’s not where /boot is going to live. I’ve only told Partitioner to create and mount a single partition (/) on sda7.

So in summary: how do I make Leap 15 install its bootloader code only on the root partition (sda7)? Thanks in advance for any tips!

I haven’t tried to do exactly what you are trying,
But what happens if in previous Installer screens when you are prompted to approve a disk layout,
Select the advanced options to use the Disk Partitioner,
Select the partition you wish to place the disk bootloader and then

  • There might be an option to use for the bootloader
  • If there is no option to use the partition as the bootloader, either
    • Leave the partition unformatted
    • Format with a supported disk format (IIRC EXT)

Sorry I can’t give you certain instructions, that might require someone who has actually built a system as you describe.
I’m not certain that placing in a logical drive in an extended partition should be a significant factor, but on some systems you might need to comply with INT BIOS 13 restrictions. My SOP is to observe that possible issue regardless whether it’s real on that particular hardware and place all my boot loaders in the first 8.9 GB of the disk… Makes for good practice so that if necessary I can pull the disk and install in any other hardware with a reasonable expectation the system will boot.

HTH,
TSU

I have not specifically tried this with the new partitioner/installer.

You should be able to use the option for a custom location to install booting. And set that custom location to “/dev/sda7”. And then ignore warnings that your system might not boot.

As indicated, I have not actually tested doing this. Perhaps I should. In any case, give it a try and let us know what happens.

Screenshot please and which medium exactly are you using. I just tested with Leap 15.0 DVD and I have “Custom Boot Partition” option when going into Boot Loader Settings on summary screen.

I said that I would test this. So I installed Leap 15.0 in a virtual machine. Here’s the partitioning that I used:


Device     Boot    Start      End  Sectors Size Id Type
/dev/sda1           2048 14682111 14680064   7G 83 Linux
/dev/sda2       14682112 41943039 27260928  13G  f W95 Ext'd (LBA)
/dev/sda5  *    14684160 35655679 20971520  10G 83 Linux
/dev/sda6       35657728 41943039  6285312   3G 82 Linux swap / Solaris

I went into the Booting section of the installer, and told it to:

  • Use a custom boot partition ("/dev/sda5")
  • Install generic boot code in the MBR
  • Set the active flag on the boot partition.

It got most of that right. But it set the active flag on “/dev/sda2” instead of on “/dev/sda5”.

The installed system would not boot, because of that active flag problem. So I rebooted the install media to the rescue system, and used “fdisk” to turn off the active flag for “/dev/sda2” and turn it on for “/dev/sda5”. After that, it booted without a problem. The partition table that you see above is from after I did that repair.

I should note that the generic code that was installed in the MBR is capable of recognizing the active flag on a logical partition, and booting that.

Needs bug report.

I should note that the generic code that was installed in the MBR is capable of recognizing the active flag on a logical partition, and booting that.

Yes, it is syslinux MBR which supports it.

I’m inclined to look at this as “I used an expert option, so I am expected to be an expert and to be able to fix what doesn’t work.”

It isn’t all that obvious what the installer should do.

If you have any doubts about the ability to have the 15.0 installer produce what you want, choose its no bootloader option. Then you can boot using the 13.1 bootloader, either to load the 15.0 kernel & initrd directly (easy to configure using the openSUSE-standard vmlinuz and initrd symlinks), or to use the configfile or chainloader method after chrooting into your new 15.0 installation to install bootloader to partition from within it. In general terms, this is what I have always done since either 13.2 or 42.1.

Getting back to this question:

You need to actually click on the “Booting” header of the summary screen. That gives more locations.

Uncheck the box for MBR.
Uncheck the box for partition containing “/boot”.
Uncheck the box for putting generic code into the MBR (unless you really want that).
Uncheck the box for setting the active flag.

Check the box to boot from a custom partition
Enter “/dev/sda7” in the space for the custom partition.
Save those changes.

Then click on Booting once again, and recheck that it got everything right.

If you also need to set the active flag, best to do that later after the install (you can boot the rescue system and use “fdisk” for that).

I would accept it if installer did not change current active partition.

It isn’t all that obvious what the installer should do.

Certainly not setting as active some random partition.

I probably just forgot to uncheck the box on setting active flag. I suppose I could redo my tests to check this.

Thank you! This is exactly what I needed! It wasn’t clear to me before that you could click on the “Booting” section header and get advanced booting options.

Just now, I followed these exact steps and it performed flawlessly, installing Leap 15 to /dev/sda7, writing the boot code to /dev/sda7, and not overwriting the MBR. After install I was immediately able boot my system into the already-installed MBR boot loader (currently SPFDisk), select the Leap 15 partition (/dev/sda7), and boot up Leap 15.

If you also need to set the active flag, best to do that later after the install (you can boot the rescue system and use “fdisk” for that).

I probably just forgot to uncheck the box on setting active flag. I suppose I could redo my tests to check this.

Thanks, and I wouldn’t bother doing that test. Before and after my install, the Extended partition (sda3) was/is marked active. But I don’t really care about this as my MBR bootloader handles selecting which OS is booted, independent of the active flag.

I did uncheck the “set the active flag” checkbox during install as you suggested, so it’s entirely possible that was honored. Just not clear from the state that I started in.

Thanks to the others that replied to this post with tips as well!

Looking at your quote of my post, I see that I wrote “locations” where I meant “options”. I should proof read more carefully.

You can click on the headers of the summary page for more detail. This is most useful with the software selection, but it can be useful for some of the other sections.

In any case, I’m glad to hear that you have it all working the way that you wanted.