Mailinglist Archive: opensuse (1108 mails)

< Previous Next >
Re: [opensuse] How to add a second openSUSE install to an EFI machine?
On 2018-08-04 19:46, Carlos E. R. wrote:


Well, for the restored from backup system I have to do the same after
chrooting to its root partition mounted from the "aux" system.

linux-9wbs:~ # mount --bind /proc /other/main/proc
linux-9wbs:~ # mount --bind /dev /other/main/dev
linux-9wbs:~ # mount --bind /sys /other/main/sys
linux-9wbs:~ # mount --bind /boot/efi/ /other/main/boot/efi/
linux-9wbs:~ # chroot /other/main/
linux-9wbs:/ # cd
linux-9wbs:~ #
linux-9wbs:~ # grep DISTRI /etc/default/grub
GRUB_DISTRIBUTOR=opensuse_main
linux-9wbs:~ # yast

YaST2 - menu @ linux-9wbs

┌─────────────────────────────────────────────────────────────────┐
│ YaST Control Center │
└─────────────────────────────────────────────────────────────────┘

┌──────────────────┐ ┌────────────────────────────────────────────┐
│Software │ │/etc/sysconfig Editor │
│System │ │Boot Loader │
│Hardware │ │Date and Time │
│Network Services │ │Fonts │
│Security and Users│ │Kernel Settings │
│Support │ │Language │
│Miscellaneous │ │Network Settings │
│ │ │Partitioner │
│ │ │Services Manager │
│ │ │ │
│ │ │ │
└──────────────────┘ └────────────────────────────────────────────┘

[Help] [Run][Quit]


F1 Help F9 Quit


=================

YaST2 - bootloader @ linux-9wbs

Boot Loader Settings
┌Boot Code Options──Kernel Parameters──Bootloader Options──────────┐
│ │
│ │
│ Timeout in Seconds [x] Probe Foreign OS │
│ ↓ 11↑ │
│ [ ] Hide Menu on Boot │
│ │
│ Default Boot Section │
│ opensuse_main▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒↓ │
│ ┌[ ] Protect Boot Loader with Password─────────────────────────┐ │
│ │ [x] Protect Entry Modification Only │ │
│ │ Password for GRUB2 User 'root' Retype Password │ │
│ │ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────┘
[Help] [Cancel] [ OK ]

F1 Help F9 Cancel F10 OK


linux-9wbs:~ # tree /boot/efi/
linux-9wbs:~ # tree /boot/efi/
/boot/efi/
├── BOOT
│   └── BOOT.SDI
└── EFI
├── Boot
│   ├── MokManager.efi
│   ├── bootx64.efi
│   ├── grub.cfg
│   └── grub.efi
├── Microsoft
│   ├── Boot
...
├── opensuse
│   ├── MokManager.efi
│   ├── boot.csv
│   ├── grub.cfg
│   ├── grub.efi
│   ├── grubx64.efi
│   └── shim.efi
├── opensuse_aux
│   ├── MokManager.efi
│   ├── boot.csv
│   ├── grub.cfg
│   ├── grub.efi
│   ├── grubx64.efi
│   └── shim.efi
└── opensuse_main <=======
└── grubx64.efi


linux-9wbs:/ # mount
/dev/sda11 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs
(rw,nosuid,size=1960060k,nr_inodes=490015,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /boot/efi type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
linux-9wbs:/ #


I think it has failed. The directory has been created, but doesn't have
all the needed files.

linux-9wbs:~ # exit
linux-9wbs:~ # efibootmgr
BootCurrent: 0002
Timeout: 2 seconds
BootOrder: 0004,0002,0001,2001,0003,2002,2003
Boot0000* EFI USB Device (TOSHIBA TransMemory)
Boot0001* Windows Boot Manager
Boot0002* opensuse-secureboot
Boot0003* openSUSE
Boot0004* opensuse_aux-secureboot
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
linux-9wbs:~ #

And the entry is not there :-(



Well, an alternative is to have the "aux" system use osprober to add
entries for the "main" system grub, boot it, and then try yast boot
module again, directly, no chroot.


linux-9wbs:~ # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-4.12.14-lp150.12.7-default
Found initrd image: /boot/initrd-4.12.14-lp150.12.7-default
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found openSUSE Leap 15.0 on /dev/sda11
Found openSUSE Leap 15.0 on /dev/sdb2
done
linux-9wbs:~ #


linux-9wbs:~ # mount | grep /dev/sda
/dev/sda10 on / type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot/efi type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda11 on /other/main type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /other/main/boot/efi type vfat
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
linux-9wbs:~ #


sda11 is the "main" system. Ok, it might boot.


[...]

Ok, it did boot, but I found two errors in fstab that I had forgoten
about, result of the rsync migration and changed names. And then yast
bootloader succeeded:

Legolas:~ # tree /boot/efi/
/boot/efi/
├── BOOT
│   └── BOOT.SDI
└── EFI
├── Boot
│   ├── MokManager.efi
│   ├── bootx64.efi
│   ├── fallback.efi
│   ├── grub.cfg
│   └── grub.efi
├── Microsoft
│   ├── Boot
│   │   ├── BCD
│   │   ├── BCD.LOG
│   │   ├── BCD.LOG1
...
├── opensuse
│   ├── MokManager.efi
│   ├── boot.csv
│   ├── grub.cfg
│   ├── grub.efi
│   ├── grubx64.efi
│   └── shim.efi
├── opensuse_aux
│   ├── MokManager.efi
│   ├── boot.csv
│   ├── grub.cfg
│   ├── grub.efi
│   ├── grubx64.efi
│   └── shim.efi
└── opensuse_main
├── MokManager.efi
├── boot.csv
├── grub.cfg
├── grub.efi
├── grubx64.efi
└── shim.efi

51 directories, 165 files
Legolas:~ #

Legolas:~ # efibootmgr
BootCurrent: 0004
Timeout: 2 seconds
BootOrder: 0000,0004,0002,0001,0003,2001,2002,2003
Boot0000* opensuse_main-secureboot
Boot0001* Windows Boot Manager
Boot0002* opensuse-secureboot
Boot0003* openSUSE
Boot0004* opensuse_aux-secureboot
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
Legolas:~ #


Now, to try reboot :-)

Yes! :-))

Thank you everybody for the clues :-)

--
Cheers / Saludos,

Carlos E. R.
(from 42.3 x86_64 "Malachite" at Telcontar)

< Previous Next >
Follow Ups