UEFI BIOS dual boot - 12.3 works 12.2 is inaccessable!

Hello list, moderators!

Can I fix my attempted 12.2-64/12.3 dual boot without starting over?

I read a few of the UEFI posts to this list, but none of them gave me an answer to my dilemma. Understand up front that I have a wonderful 12.3 running on my HW, which reduces the urgency of a solution to a dual boot. My mobo is Asus P8Z77-M LK which has UEFI BIOS.

So here’s what I did and what I ended up with. Before I installed my 12.2-64 a week or so ago, I partitioned my new barebones 1TB Toshiba Sata with the latest, live gparted. Since 12.3 was almost released then, I created a pair of / partitions and a pair of /home partitions, all ext4.

With an install DVD, I installed the 12.2-64 on the second pair of / and /home, but mounted the first pair. it was the first OS on the new HW and worked OK. A week later I could order a 12.3 install DVD and when it came, I installed it into the second pair of / and /home. Again I mounted the first pair, this time as /12.2 and /home1.

Between the 12.3-64 and the 12.3 are two common partitions /boot and /swap.

Now when the system boots grub2 shows OSs and failsafe choices in the boot menu for each OS. Picking 12.2 is ignored - 12.3 always boots.

I’ve tried the function keys like F12 on bootup, without effect. F2 does open up the UEFI bios, but I don’t see references to 12.2 or 12.3. I’ve looked at /boot/grub2/grub.cfg. All four menus are in that, but only the / partition for the 12.3 is mentioned (sda10).

I think with the right syntax and alternate / partition edited into grub.cfg, my system would dual boot properly. Am I correct in that thought, or have I been trumped by my own UEFI? Heboland.

On Thu 28 Mar 2013 02:56:05 AM CDT, heboland wrote:

Hello list, moderators!

Can I fix my attempted 12.2-64/12.3 dual boot without starting over?

I read a few of the UEFI posts to this list, but none of them gave me
an answer to my dilemma. Understand up front that I have a wonderful
12.3 running on my HW, which reduces the urgency of a solution to a dual
boot. My mobo is Asus P8Z77-M LK which has UEFI BIOS.

So here’s what I did and what I ended up with. Before I installed my
12.2-64 a week or so ago, I partitioned my new barebones 1TB Toshiba
Sata with the latest, live gparted. Since 12.3 was almost released
then, I created a pair of / partitions and a pair of /home partitions,
all ext4.

With an install DVD, I installed the 12.2-64 on the second pair of /
and /home, but mounted the first pair. it was the first OS on the new HW
and worked OK. A week later I could order a 12.3 install DVD and when it
came, I installed it into the second pair of / and /home. Again I
mounted the first pair, this time as /12.2 and /home1.

Between the 12.3-64 and the 12.3 are two common partitions /boot and
/swap.

Now when the system boots grub2 shows OSs and failsafe choices in the
boot menu for each OS. Picking 12.2 is ignored - 12.3 always boots.

I’ve tried the function keys like F12 on bootup, without effect. F2
does open up the UEFI bios, but I don’t see references to 12.2 or 12.3.
I’ve looked at /boot/grub2/grub.cfg. All four menus are in that, but
only the / partition for the 12.3 is mentioned (sda10).

I think with the right syntax and alternate / partition edited into
grub.cfg, my system would dual boot properly. Am I correct in that
thought, or have I been trumped by my own UEFI? Heboland.

Hi
When UEFI booting /boot/efi is common, not boot, so you have
overwritten the 12.2 /boot during install of 12.3…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.3 (x86_64) Kernel 3.7.10-1.1-desktop
up 13:33, 3 users, load average: 0.04, 0.04, 0.05
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

Probably, if you are carefull with what you do.

As Malcolm has said, it was a mistake to share “/boot”.

I originally installed 12.3 RC2. Then, when I later installed 12.3 final, the installer failed to format “/boot” (and I failed to notice that). From my experience, not much will be overwritten. If your 12.2 system boots with “elilo”, then there is probably almost no overlap in what the two use from “/boot”.

I think both of those systems will have used “/boot/efi/EFI/opensuse” to store the efi boot files, so there is an overlap there too, and a potential risk if you ever update 12.2 in a way that causes the booting to be reinstalled.

Yes, you should be able to hand-craft a “grub.cfg” which will allow you to get into your 12.2 system (as well as the 12.3 system).

Thanks nrickert, malcolmlewis!

I’ve done some probing around since my original post. I don’t see an efi directory in /boot. This is /boot. Is ./efi buried in there somewhere?

root[514] ll
total 47688
-rw-r--r-- 1 root root     1484 Feb 26 06:33 boot.readme
-rw-r--r-- 1 root root   137539 Mar  1 05:16 config-3.7.10-1.1-desktop
-rw-r--r-- 1 root root   687142 Mar  1 06:44 symtypes-3.7.10-1.1-pae.gz
-rw-r--r-- 1 root root  2007259 Mar  1 07:26 System.map-3.7.10-1.1-desktop
-rw-r--r-- 1 root root  4958496 Mar  1 07:27 vmlinuz-3.7.10-1.1-desktop
-rw-r--r-- 1 root root   693512 Mar  1 07:27 symtypes-3.7.10-1.1-default.gz
-rw-r--r-- 1 root root  6326893 Mar  1 07:42 vmlinux-3.7.10-1.1-desktop.gz
-rw-r--r-- 1 root root      500 Mar  1 07:42 sysctl.conf-3.7.10-1.1-desktop
-rw-r--r-- 1 root root   239396 Mar  1 07:42 symvers-3.7.10-1.1-desktop.gz
-rw-r--r-- 1 root root   688005 Mar  1 07:44 symtypes-3.7.10-1.1-desktop.gz
-rw-r--r-- 1 root root   669395 Mar  1 09:11 symtypes-3.7.10-1.1-xen.gz
-rw-r--r-- 1 root root   621056 Mar  6 04:56 message
lrwxrwxrwx 1 root root        5 Mar  6 04:58 grub2-efi -> grub2
drwx------ 2 root root    16384 Mar 25 13:58 lost+found
lrwxrwxrwx 1 root root        1 Mar 25 14:02 boot -> .
drwxr-xr-x 2 root root     4096 Mar 25 14:02 grub
lrwxrwxrwx 1 root root       26 Mar 25 14:04 vmlinuz -> vmlinuz-3.7.10-1.1-desktop
-rw-r--r-- 1 root root      512 Mar 25 14:10 backup_mbr
-rw-r--r-- 1 root root 31651854 Mar 27 10:00 initrd-3.7.10-1.1-desktop
lrwxrwxrwx 1 root root       25 Mar 27 10:00 initrd -> initrd-3.7.10-1.1-desktop
drwxr-xr-x 6 root root     4096 Mar 27 10:00 grub2

I did reformat /boot as ext2 when I install 12.3. The 12.3 slash partition is actually /dev/sda8. The 12.2-64 slash partition is /dev/sda10. The grub2.cfg references to sda10 must be because grub2 discovered it. This is an excerpt from grub2.cfg.

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'openSUSE 12.2 (x86_64) (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ddf01b04-f975-4d31-9c33-064f8454ca89' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if  x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2'  7f4b6ff0-2ff4-49e4-beb9-9306d7a92a2e
        else
          search --no-floppy --fs-uuid --set=root 7f4b6ff0-2ff4-49e4-beb9-9306d7a92a2e
        fi
        linux /vmlinuz-3.7.10-1.1-desktop root=UUID=a76f61b7-41a1-4be6-a921-8f2e604852ae resume=/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 splash=off quiet showopts
        initrd /initrd-3.7.10-1.1-desktop
}
submenu 'Advanced options for openSUSE 12.2 (x86_64) (on /dev/sda10)' $menuentry_id_option 'osprober-gnulinux-advanced-ddf01b04-f975-4d31-9c33-064f8454ca89' {
        menuentry 'openSUSE 12.3 (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.7.10-1.1-desktop--ddf01b04-f975-4d31-9c33-064f8454ca89' {
                insmod part_msdos

To me this is all pretty complicated syntax to experiment with. I’m probably pretty safe experimenting with sda10 settings, but maybe not! Can you guys point me to a grub2 howto?

malcolmlewis, it seems your advice is for future installs. That would be to add another boot partition. Can 12.3 boot from a partition anywhere on the HDD, even if that /boot is on an extended partition?

nrickert, I’m interested in your comments about using elilo to boot the 12.2-64. I remember when lilo was the only loader, but I haven’t used it since grub became the default. I see I can install elilo. If I were to install it, how would I use it? Does elilo then replace grub2 as the default bootlooder? Maybe I have to select beweeen the two from yast>systemconfig>bootloader?

I’ll poke around some more with this dilemma and watch this post for more help. Heboland.

I mentioned that, because it was my understanding that a 12.2 UEFI install default would be using elilo, and the switch to grub2-efi was for 12.3. However, it is possible that I am mistaken on that.

If your install used elilo, then my understanding is that the kernel and initrd files are stored in the EFI partition. If your 12.2 install used grub2-efi, then the kernel and initrd files were installed on “/boot” and if you reformatted that for 12.3, you have lost those and won’t be able to boot 12.2 without first restoring them. You would have to boot from the install DVD in rescue mode, or from a live CD, to be able to restore the kernel and rebuild the initrd.

For 12.3, you should stay with grub2 (really, grub2-efi).e

You should be able to mount the 12.2 root partition, and then look at the file “/etc/sysconfig/bootloader” for your 12.2 system. That should tell you what you used for booting.

I guess I shouldn’t comment more till you check that.e

Thanks nrickert!

I’m pretty sure the 12-2-64 used grub2 for a boot loader.

Before my last post I looked at the 12-2-64/ect/sysconfig/bootloader. I couldn’t make much sense out of it, but here’s an excerpt:

#
LOADER_TYPE="grub2"


## Path:        System/Bootloader
## Description: Bootloader configuration
## Type:        list(floppy,mbr,root,boot,custom,none)
## Default:     mbr
#
# Location of boot loader.
# For making the change effect run bootloader configuration tool
#
#
LOADER_LOCATION=""

## Path:        System/Bootloader
## Description: Bootloader configuration
## Type:        string
## Default:     "splash=silent quiet showotps"
#
# Arguments for kernel which is used like default boot section.
# If the options is commented perl-Bootloader uses his default arguments
# for kernel.
#
DEFAULT_APPEND="resume=/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 splash=silent quiet showopts"

For the record, part7 is swap for both OSs. why would swap be referenced in the bootloader?

The only live CD I have is the gparted I used to partition the virgin hdd. My guess is that gparted is a single purpose live cd. My internet connection here is <1Mb/sec, so I can’t download anything very big.

I do have the 12.2-64 install DVD. My concern about doing a recovery with it, is the possible loss of my 12.3. Guess if that happens, I could recover the 12.3 with it’s install DVD.

What do you think? Heboland.

On Thu 28 Mar 2013 08:26:01 PM CDT, nrickert wrote:

heboland;2542222 Wrote:
> nrickert, I’m interested in your comments about using elilo to boot
> the 12.2-64.
I mentioned that, because it was my understanding that a 12.2 UEFI
install default would be using elilo, and the switch to grub2-efi was
for 12.3. However, it is possible that I am mistaken on that.

If your install used elilo, then my understanding is that the kernel
and initrd files are stored in the EFI partition. If your 12.2 install
used grub2-efi, then the kernel and initrd files were installed on
“/boot” and if you reformatted that for 12.3, you have lost those and
won’t be able to boot 12.2 without first restoring them. You would have
to boot from the install DVD in rescue mode, or from a live CD, to be
able to restore the kernel and rebuild the initrd.

For 12.3, you should stay with grub2 (really, grub2-efi).e

You should be able to mount the 12.2 root partition, and then look at
the file “/etc/sysconfig/bootloader” for your 12.2 system. That should
tell you what you used for booting.

I guess I shouldn’t comment more till you check that.e

Hi
For 12.2 it’s grub2-efi for me. ELILO is just used to boot the
system… However for 12.3 grub2-efi is a symlink on 12.2 it’s a
directory.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.3 (x86_64) Kernel 3.7.10-1.1-desktop
up 1 day 7:47, 5 users, load average: 0.27, 0.12, 0.07
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

It’s up to you whether you want to try recovering.

Here’s what I would do, if I wanted to recover:

1: I would mount the root partition for 12.2, and comment out the mount statement for “/boot”, but leave the mount statement for “/boot/efi”. You would have to also “mkdir /boot/efi”. This assumes that you have enough free space in the root partition. That way, there would be no overlap of “/boot” partitions.

If you installed to use “grub2” rather than “grub2-efi”, then with that change for “/boot” there is probably no overlap. But booting would be in MBR mode, rather than in UEFI mode.

2: The next step would be to boot from the install DVD, mount 12.2 root to “/mnt”, mount other partitions (home to “/mnt/home”, maybe use “swapon” to add swap.

Then you would need:


mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt

That should give you a shell with “/mnt” looking to be the root. Run “yast” from there. You will get the command line version. You will need to use software manager, search for “kernel” and then reinstall the kernel that it thinks you have. You probably also have to reinstall grub2, since some of its files are on “/boot” and will have been loste.

Hmm, there’s a complication if it was installing grub on “/boot” since you are no longer using that partition. I think you may have to change that in “/etc/default/grub_installdevice”.

Once you have the kernels back, you could actually boot from the grub menu for your 12.3 system which should have an entry for your 12.2 system.

Thanks for all the details, nrickert!

1: I would mount the root partition for 12.2, and comment out the mount statement for “/boot”, but leave the mount statement for “/boot/efi”. but leave the mount statement for “/boot/efi”. You would have to also “mkdir /boot/efi”.

So reading between the lines, you want me to boot the 12.3 and mount the 12.2 slash partition. That “automounts” as I configured it that way with the disk tool on the DVD during the 12.3 install.

Then you are telling me to comment out the /boot line from the 12/2/etc/fstab? There isn’t a /boot/efi line to leave! See 12.2 fstab:

/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part10 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part2 /boot                ext2       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part8 /slash2              ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part9 /home2               ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part11 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part1 /dos                 vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part3 /ntfs                ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part6 /share               vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/ata-TOSHIBA_DT01ACA100_139AVYSRS-part5 /usr1                ext4       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

I have all the grub2s installed including grub2-efi. Apparently you can tell from the missing ./efi that grub2-efi wasn’t used by 12.3 automatic install configuration. My /boot partition is so there should be room for mkdir efi.

2: The next step would be to boot from the install DVD, mount 12.2 root to “/mnt”, mount other partitions (home to “/mnt/home”, maybe use “swapon” to add swap.

I assume I take the repair option on the 12.2 DVD?

That should give you a shell with “/mnt” looking to be the root. Run “yast” from there. You will get the command line version. You will need to use software manager, search for “kernel” and then reinstall the kernel that it thinks you have. You probably also have to reinstall grub2, since some of its files are on “/boot” and will have been lost.

What would be the yast command line command to invoke software manager? Should there be mutiple choices for kernel here? So then I use the cli yast > swmgr to search for grub and have it install grub2?

Hmm, there’s a complication if it was installing grub on “/boot” since you are no longer using that partition. I think you may have to change that in “/etc/default/grub_installdevice”.

So this last step must be an edit in 12.2/etc/default? I should be able to edit that from the 12.3.

Do I have the gist of this white knuckle process, or have I drifed astray? Heboland.

Yast will come up with a graphic screen. But it will be managed with the curses library. That is, the screen will be built with ascii characters.

You make the same menu selections as you normally would. Navigation is a bit trickier. Use the tab key to move around to the next entry field. And I think a space selects the current entry.

It’s your choice whether to do this. If you don’t have a good reason to get 12.2 running again, then don’t bother with it.

Thanks again, nrickert!

I expect that I can practice with command line yast and maybe SW manager but just invoking them from level5 console. That’s a good exercise to try anyway.

When I partitioned my hdd, installed 12.2, and then 12.3, I wasn’t aware that my UEFI bios had a role to play. May I ask how you were able to cause the different boot choices in your two installs? Do I have to uncheck automatic (configuration | installation)? I can’t remember the title of that install checkbox.

I have collected your instructions, but probably the time to attempt this is when 12.4 or 13.0 comes out. At that time I would like to overwrite the 12.2 with with whatever the next will be, but I would like to leave the 12.3 operational.

If I have to add a second boot partition for say 12.4 to save the 12.3, then it would have to be “right” on the drive of the 12.3 partitions, so as not to change the 12.3 mount points.

malcolmlewis never answered my question about the acceptable hdd locations for say a 12.3/boot.

Another approach for the future 12.4 install might be to learn how to force that install to use the existing /boot/efi for its boot partition. That might leave the existing 12.3/boot capable of still booting 12.3 after the 12.4 install.

FWIW I may have to surrender my internet connection. If so I may be offline until 15.4! nrickert, I really appreciate your detailed instructions! if and when I get to try them, I’ll try to find this thread and post the outcome. Heboland.

One of the two boots directly (started by the UEFI BIOS). The other is started from the grub menu for the first.

This was all a bit buggy. I have a couple of bug reports. I had to edit “grub.cfg” to get it to work correctly for booting the second system.

No, that is unrelated. I did uncheck, because that allows me to assign a hostname. Otherwise it gets a randomized hostname, and I have to change that later. But it makes very little difference.

It will be 13.1, and it is supposed to be out in November. By that time, using UEFI should be a bit smoother than it
currently is.

If I have to add a second boot partition for say 12.4 to save the 12.3, then it would have to be “right” on the drive of the 12.3 partitions, so as not to change the 12.3 mount points.

For UEFI, it should be in an EFI partition.

It’s best to be careful about that. In the Boot configuration page, there is a Distributor field. You can change that distributor field for the new (13.1) install, to say “opensuse_alt 13.1” in place of “opensuse 13.1”. That way the boot entry will be named “opensuse_alt” rather than “opensuse”, and that avoids a name conflict. (Thanks to Michael Chang for pointing out that trick).

Thanks again nrickert!

I think you understand my current /boot is ext2 on sda2. sda4 is an extended partition. swap is sda7, 12.3/ is sda8. If I have to add another boot partition adjacent to sda2, that will move swap and 12.3/. I’m trying to avoid that as that would wreck the 12.3.

                        For UEFI, it should be in an EFI partition.

My interpretation of this statement is that I need a partition mounted as /efi? Surely there is not an efi format like ext2!

Can I get away with creating a /efi directory in my existing /boot and then mounting /boot/efi as /efi? Heboland.

No, that won’t work.

Here’s what I did with two systems.

Looking in “/etc/default/grub”, I see:


GRUB_DISTRIBUTOR="openSUSE 12.3"

That’s near the top of the file.

For my second install, I instead have:


GRUB_DISTRIBUTOR="openSUSE_alt 12.3"

The way you set that, during install, is you click on “Booting”, then on “Boot options”. You can test that out now in Yast. Go to Yast → System → Bootloader
You will see pretty much the same screen as you see during install. Click the options button to see where the “Distributor line” is. And then cancel out of everything, since you don’t really want to change what is currently working.

These GRUB_DISTRIBUTOR definitions give me directories:
“/boot/efi/EFI/opensuse” and “/boot/efi/EFI/opensuse_alt” and that avoids name conflicts.

Thanks again nrickert!

I looked at the yast>system>bootloader. I have openSUSE 12.3 on the distributer line.

My /etc/default/grub shows GRUB_DISTRIBUTOR=“openSUSE 12.3”.

I’m familiar with the booting section of the install process.

On piece to the puzzle still remains for me! Why don’t I have an efi directory in /boot?

I did find the BIOS option of legacy boot only, efi boot only, or both. My BIOS is set to both. Could this be why I didn’t get an efi directory in /boot?

Would you hazard a guess as to what would happen now if I changed that setting to efi only? Heboland.

My BIOS is also set for both.

I currently have secure-boot enabled, so I only see the UEFI possibilities. If I disable secure-boot, insert the install media, reboot, hit F12 during boot, I see a boot menu from the BIOS. And the opensuse installer can be selected either in UEFI mode or in MBR mode.

I installed after booting UEFI mode. If I have booted MRB mode, then I would have had an MBR install with no use of EFI.

For what you should do? May I suggest the maxim “If it ain’t broke, don’t fix it.”

Thanks nrickert!

I’m a great believer in the maxim you mentioned!

I’ve captured the dialog from this thread for my next install, whenever that might be.

I do have a Secure Boot option in my BIOS, which will be a good starting point for the next install. The likelihood of being able to salvage my 12.3 in a new install doesn’t seem very promising, so I won’t expect to preserve it.

Probably there is a UEFI tutorial somewhere that would describe the steps you shared with me here.

It’s apt to be a while before I get to experiment with your advice.

I think you have given me all I need. Thanks again for that! Heboland.

You can try this one: Dual boot opensuse 12.3 and Windows 8 on a UEFI box

That is not quite your situation. By the time the next release (should be 13.1) is out, the use of UEFI should be a bit smoother, and there will probably be newer guides.