[opensuse] How to add a second openSUSE install to an EFI machine?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0) Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition. Because both openSUSE installs use the same dirs and files in EFI... Ideas? - -- Cheers Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAltlq5AACgkQtTMYHG2NR9VeogCdF9RdevRs3nQKfXpwPxfoyIsF ZOsAniyL0muq11CjPFuu0MKdngVjp3tq =u7G4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op zaterdag 4 augustus 2018 15:35:04 CEST schreef Carlos E. R.:
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
-- Cheers
Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) Let YaST do the job ?
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Отправлено с iPhone
4 авг. 2018 г., в 16:40, Knurpht-openSUSE <knurpht@opensuse.org> написал(а):
Op zaterdag 4 augustus 2018 15:35:04 CEST schreef Carlos E. R.:
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
-- Cheers
Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) Let YaST do the job ?
Try to think before jumping to keyboard? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-04 15:40, Knurpht-openSUSE wrote:
Op zaterdag 4 augustus 2018 15:35:04 CEST schreef Carlos E. R.:
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
Let YaST do the job ?
Under chroot? I'm trying to restore a backup. Will YaST restore EFI files? Or will it think that the current "opensuse" directory is his, instead of creating a new one with a different name...? -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [08-04-18 09:38]:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
- -- Cheers
Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iEYEARECAAYFAltlq5AACgkQtTMYHG2NR9VeogCdF9RdevRs3nQKfXpwPxfoyIsF ZOsAniyL0muq11CjPFuu0MKdngVjp3tq =u7G4 -----END PGP SIGNATURE-----
efibootmgr might help. you can assign descriptive names for the distros if you wish, and the order they appear iirc. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-04 15:49, Patrick Shanahan wrote:
* Carlos E. R. <> [08-04-18 09:38]:
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
efibootmgr might help. you can assign descriptive names for the distros if you wish, and the order they appear iirc.
That I know, but what files do I copy from the backup to the restored system under /efi partition? And where? Do I rename them? Once the files are restored, efibootmgr might be used to choose options. The backup has: linux-9wbs:/mnt/efi # tree . └── EFI ├── boot │ ├── bootx64.efi │ └── fallback.efi └── opensuse ├── MokManager.efi ├── boot.csv ├── grub.cfg ├── grub.efi ├── grubx64.efi └── shim.efi 3 directories, 8 files linux-9wbs:/mnt/efi # /boot/efi ├── BOOT │ └── BOOT.SDI └── EFI ├── Boot │ └── bootx64.efi ├── Microsoft │ ├── Boot │ │ ├── BCD │ │ ├── BCD.LOG │ │ ├── BCD.LOG1 │ │ ├── BCD.LOG2 │ │ ├── BOOTSTAT.DAT │ │ ├── Fonts │ │ │ ├── chs_boot.ttf ... │ └── Recovery │ ├── BCD │ ├── BCD.LOG │ ├── BCD.LOG1 │ └── BCD.LOG2 └── opensuse ├── MokManager.efi ├── boot.csv ├── grub.cfg ├── grub.efi ├── grubx64.efi └── shim.efi As you see, both have an "opensuse" directory. I can not overwrite one with the other. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [08-04-18 10:02]:
On 2018-08-04 15:49, Patrick Shanahan wrote:
* Carlos E. R. <> [08-04-18 09:38]:
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
efibootmgr might help. you can assign descriptive names for the distros if you wish, and the order they appear iirc.
That I know, but what files do I copy from the backup to the restored system under /efi partition? And where? Do I rename them?
Once the files are restored, efibootmgr might be used to choose options.
The backup has:
linux-9wbs:/mnt/efi # tree . └── EFI ├── boot │ ├── bootx64.efi │ └── fallback.efi └── opensuse ├── MokManager.efi ├── boot.csv ├── grub.cfg ├── grub.efi ├── grubx64.efi └── shim.efi
3 directories, 8 files linux-9wbs:/mnt/efi #
/boot/efi ├── BOOT │ └── BOOT.SDI └── EFI ├── Boot │ └── bootx64.efi ├── Microsoft │ ├── Boot │ │ ├── BCD │ │ ├── BCD.LOG │ │ ├── BCD.LOG1 │ │ ├── BCD.LOG2 │ │ ├── BOOTSTAT.DAT │ │ ├── Fonts │ │ │ ├── chs_boot.ttf ... │ └── Recovery │ ├── BCD │ ├── BCD.LOG │ ├── BCD.LOG1 │ └── BCD.LOG2 └── opensuse ├── MokManager.efi ├── boot.csv ├── grub.cfg ├── grub.efi ├── grubx64.efi └── shim.efi
As you see, both have an "opensuse" directory. I can not overwrite one with the other.
this may or may not work as it has been some time since I have used efibootmgr, man pages may help. do not copy the efi info from the second openSUSE system, add it with efibootmgr. a quick scan indicates a create option, "-c". -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Отправлено с iPhone
4 авг. 2018 г., в 16:35, Carlos E. R. <robin.listas@telefonica.net> написал(а):
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
After openSUSE is installed, you can change directory by setting GRUB_DUSTRIBUTOR in /etc/default/grub; the first word will be used as directory name on ESP. Unfortunately, YaST setting was removed, so it is challenging to do during installation. Check archives, it was discussed recently, I think on yast-devel. IIRC the only option is to switch to terminal before final stage and manually edit file on root. Or you can rename existing installation in advance - this is probably easier and makes sure it won’t accidentally conflict with future installs. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andrei Borzenkov composed on 2018-08-04 17:08 (UTC+0300):
IIRC the only option is to switch to terminal before final stage and manually edit file on root.
No success for me with such method: https://bugzilla.opensuse.org/show_bug.cgi?id=1101756 enable specification of custom GRUB_DISTRIBUTOR= in UEFI bootloader installation
Or you can rename existing installation in advance - this is probably easier and makes sure it won’t accidentally conflict with future installs.
Such has been the only reliable method for me. On host gb250, which is my only UEFI with RAM in it ATM, and as yet has only TW, I currently have: BootCurrent: 0001 Timeout: 1 seconds BootOrder: 0001,0002,0003,000A,000B,0007,0009 Boot0001* opensusetw Boot0002* debian Boot0003* tubuntu Boot0007* Hard Drive Boot0009* CD/DVD Drive Boot000A* ubuntu Boot000B* opensuse After kernel installations I check with efibootmgr and usually find the order shuffled and so need to move my preference (opensusetw) back to first priority, and sometimes use -B on functional duplicates (as shown above, currently needed). Also I have reconfigured /etc/grub.d/ so that custom.cfg content is the first shown regardless which is actually controlling boot. Also I disable os-prober, since custom.cfg is doing all I need done. Maybe this helps Carlos: <https://nwrickert2.wordpress.com/2017/12/19/handling-multiple-opensuse-version-with-uefi/> -- "Wisdom is supreme; therefore get wisdom. Whatever else you get, get wisdom." Proverbs 4:7 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-08-04 17:25, Felix Miata wrote:
Andrei Borzenkov composed on 2018-08-04 17:08 (UTC+0300):
IIRC the only option is to switch to terminal before final stage and manually edit file on root.
No success for me with such method: https://bugzilla.opensuse.org/show_bug.cgi?id=1101756 enable specification of custom GRUB_DISTRIBUTOR= in UEFI bootloader installation
Or you can rename existing installation in advance - this is probably easier and makes sure it won’t accidentally conflict with future installs.
Such has been the only reliable method for me. On host gb250, which is my only UEFI with RAM in it ATM, and as yet has only TW, I currently have:
BootCurrent: 0001 Timeout: 1 seconds BootOrder: 0001,0002,0003,000A,000B,0007,0009 Boot0001* opensusetw Boot0002* debian Boot0003* tubuntu Boot0007* Hard Drive Boot0009* CD/DVD Drive Boot000A* ubuntu Boot000B* opensuse
After kernel installations I check with efibootmgr and usually find the order shuffled and so need to move my preference (opensusetw) back to first priority, and sometimes use -B on functional duplicates (as shown above, currently needed). Also I have reconfigured /etc/grub.d/ so that custom.cfg content is the first shown regardless which is actually controlling boot. Also I disable os-prober, since custom.cfg is doing all I need done.
Maybe this helps Carlos: <https://nwrickert2.wordpress.com/2017/12/19/handling-multiple-opensuse-version-with-uefi/>
Thank you everybody :-))) This link indicates several possibilities, and there is one that I like, similar to what others told here, but more detailed: Edit "GRUB_DISTRIBUTOR=secondinstall" (for example), then run yast boot loader module touching something minor in the config that makes it write it all again :-) [...] /etc/default/grub: GRUB_DISTRIBUTOR=openSUSE_aux I run YaST "boot loader", change the "timeout" from 8 to 9 in the bootloader options, hit "OK", and then... I get: linux-9wbs:/boot/efi # tree /boot/efi/ /boot/efi/ ├── BOOT │ └── BOOT.SDI └── EFI ├── Boot │ └── bootx64.efi ├── Microsoft │ ├── Boot │ │ ├── BCD │ │ ├── BCD.LOG ... ├── 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 50 directories, 155 files linux-9wbs:/boot/efi # A new directory created at the proper place. And the entries: 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:~ # What is strange is what would be the entry in non-secure boot mode. I think it might be #3 Well, for the restored from backup system I have to do the same after chrooting to its root partition mounted from the "aux" system. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
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)
In case your efi entries disappear after a bios/efi update or a windows repair action. Boot some linux on a usbstick with the efibootmgr and ad simple add your entries by hand. Example: efibootmgr -c -l \\EFI\\leap15\\grubx64.efi -L leap15 -d /dev/sdn ( sdn is the device containing the efipartition) Nice to read about efi and gpt on http://www.rodsbooks.com/refind/ ---- On 04-08-18 21:16, Carlos E. R. wrote:
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 :-)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04-08-18 19:46, Carlos E. R. wrote:
On 2018-08-04 17:25, Felix Miata wrote:
Andrei Borzenkov composed on 2018-08-04 17:08 (UTC+0300):
IIRC the only option is to switch to terminal before final stage and manually edit file on root. No success for me with such method: https://bugzilla.opensuse.org/show_bug.cgi?id=1101756 enable specification of custom GRUB_DISTRIBUTOR= in UEFI bootloader installation
Or you can rename existing installation in advance - this is probably easier and makes sure it won’t accidentally conflict with future installs. Such has been the only reliable method for me. On host gb250, which is my only UEFI with RAM in it ATM, and as yet has only TW, I currently have:
BootCurrent: 0001 Timeout: 1 seconds BootOrder: 0001,0002,0003,000A,000B,0007,0009 Boot0001* opensusetw Boot0002* debian Boot0003* tubuntu Boot0007* Hard Drive Boot0009* CD/DVD Drive Boot000A* ubuntu Boot000B* opensuse
After kernel installations I check with efibootmgr and usually find the order shuffled and so need to move my preference (opensusetw) back to first priority, and sometimes use -B on functional duplicates (as shown above, currently needed). Also I have reconfigured /etc/grub.d/ so that custom.cfg content is the first shown regardless which is actually controlling boot. Also I disable os-prober, since custom.cfg is doing all I need done.
Maybe this helps Carlos: <https://nwrickert2.wordpress.com/2017/12/19/handling-multiple-opensuse-version-with-uefi/> Thank you everybody :-)))
This link indicates several possibilities, and there is one that I like, similar to what others told here, but more detailed:
Edit "GRUB_DISTRIBUTOR=secondinstall" (for example), then run yast boot loader module touching something minor in the config that makes it write it all again :-)
[...]
/etc/default/grub:
GRUB_DISTRIBUTOR=openSUSE_aux
I run YaST "boot loader", change the "timeout" from 8 to 9 in the bootloader options, hit "OK", and then... I get:
linux-9wbs:/boot/efi # tree /boot/efi/ /boot/efi/ ├── BOOT │ └── BOOT.SDI └── EFI ├── Boot │ └── bootx64.efi ├── Microsoft │ ├── Boot │ │ ├── BCD │ │ ├── BCD.LOG ... ├── 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
50 directories, 155 files linux-9wbs:/boot/efi #
A new directory created at the proper place. And the entries:
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:~ #
What is strange is what would be the entry in non-secure boot mode. I efibootmgr -v The secureboot is loaded by shim.efi The non secureboot by grubx64.efi think it might be #3
Well, for the restored from backup system I have to do the same after chrooting to its root partition mounted from the "aux" system.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op zaterdag 4 augustus 2018 15:35:04 CEST schreef Carlos E. R.:
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
I have a laptop with EFI with Windows and three openSUSE systems. I simply have at least 9 partitions on the disk. After starting the laptop I get a GRUB menu in which to choose which system to boot. Once I reformatted two of these partitions, so they appear empty. Booting one of the remaining openSUSE system and using the bootloader of that system removes the non-existent system from the GRUB menu. I copied the system and home partition, using rsync, to the empty partitions. While formatting I gave the empty partitions a new unique name. After rsync I did put another name in /etc/hostname on the new system partition and changed also the label name of / and /home in /etc/fstab. In /etc/fstab I use labels to mount partitions. After that I used bootloader to get this new system in the GRUB menu, which did not quite succeeded. After boot, having the GRUB boot menu and selecting the new system I needed to edit in GRUB the entry for the new system. The reason was that that there was an inconsistency in the two lines in the menu. It might be that the UUID mentioned in both lines did not match. Changing the UUID in the second line to equal the one in the first line, made the new system boot. Using bootloader in that system repaired the GRUB menu. Hope this works for you too. Apparently an openSUSE system uses equal versions in EFI. So AFAIK EFI starts GRUB and you select in GRUB the preferred system. -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 04/08/2018 à 15:35, Carlos E. R. a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ok,
now I have an EFI laptop that successfully boots Windows and Linux freshly installed (leap 15.0)
Now I also want to copy another openSUSE install from an external backup to the internal disk (using rsync). I have no issues with root and home, but I do not know how to handle the EFI partition.
Because both openSUSE installs use the same dirs and files in EFI...
Ideas?
yes, this is a real question. A new openSUSE install erase the old one. so what one need is to save the present install. For example copy the efi/opensuse folder for, as example, efi/leap15CER, and add a nvram entry with efibootmgr to this new folder. I don't remember exactly how, but I already did. Test the result: you should have two menu entries for the same install. then make your new install. It will substitute the old entry with the new, but you have still the newly created one to boot. that said I dunno how it works to recover a backup :-( jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 04/08/2018 à 18:42, jdd@dodin.org a écrit :
yes, this is a real question. A new openSUSE install erase the old one.
may be each install should hava an unique efi folder? jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (8)
-
Andrei Borzenkov
-
Carlos E. R.
-
Felix Miata
-
Freek de Kruijf
-
jdd@dodin.org
-
JJM de Faber
-
Knurpht-openSUSE
-
Patrick Shanahan