Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: About EFI

  1. #1
    Join Date
    Feb 2018
    Location
    Romania
    Posts
    484

    Default About EFI

    Hello,
    I want to install TW from scratch (or if I need to reinstall grub). GPT partitions and UEFI
    I need a little help with boot-efi, please.
    I read openSUSE doc, ArchLinux and Gentoo.

    openSUSE - grub2-install --target=x86_64-efi
    Arch and Gentoo -
    grub-install --target=x86_64-efi --efi-directory=/boot/efi (arch prefer /boot instead of /boot/efi).
    If I understand right, openSUSE grub2 = grub from Arch and Gentoo because oS keep both package "grub" and "grub2".
    Is it necessary to add efi-directory: grub2-install --target=x86_64-efi --efi-directory=/boot/efi, on oS install?

    Another question: /boot and /boot/efi partitions
    Is it necessary to make two different partitons: /boot - ext4 and /boot/efi - vfat or is enough a single partiton /boot/efi - vfat?
    I ask this because today I read a discution on Mailing list about Leap 15.0 /boot/efi partition. The kernels are in /boot and /boot/efi is only for bootloader. So, is it better to keep kernels on an Linux system that Windows one (two partitons /boot and /boot/efi than only one /boot/efi)?

    Thank you.

  2. #2
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    3,380
    Blog Entries
    1

    Default Re: About EFI

    Kernels always go in boot, whether boot is on a separate filesystem or not. On my systems, separate boot is sometimes used, and when it is, I always make it EXT2. /boot does not get written to very often, mostly only when a new kernel is installed, so I don't like to waste space for a journal.

    The VFAT EFI partition is intended for use by UEFI system components, the UEFI BIOS, and the bootloader. Usually it has an overabundance of space, so other things could be put there, but remember that VFAT does not support native ownerships and permissions. Mine is 320MB and almost entirely freespace even though the disk has 4 installed operating systems. I haven't yet needed to run grub2-install myself. I only have it on my UEFI system, always using Grub 0.97 on MBR disks.

    Whether /boot is a separate filesystem from / or not, /boot/EFI is always intended to be a VFAT filesystem distinct from its native parent filesystem.

  3. #3
    Join Date
    Feb 2018
    Location
    Romania
    Posts
    484

    Default Re: About EFI

    Thank you for the answer. I read your post on mailinglist.

    I thought that, if I will not make a separate /boot partition, only a /boot/efi, the kernel will be on /boot and bootloader on /boot/efi, both with vfat.
    Now I understand: if a make a separate /boot partition, kernels will be on that partition, if I not, kernels will be in directory boot on partition /. Never on /boot/efi (vfat).

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,681
    Blog Entries
    3

    Default Re: About EFI

    Quote Originally Posted by another_roadrunner View Post
    Now I understand: if a make a separate /boot partition, kernels will be on that partition, if I not, kernels will be in directory boot on partition /. Never on /boot/efi (vfat).
    Yes, that's exactly right.

    Some linux distros use systemd-boot instead of grub. For those distros, the kernel is in the EFI partition. But most distros use grub (or grub2-efi), which uses partitions exactly as you describe.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  5. #5
    Join Date
    Feb 2018
    Location
    Romania
    Posts
    484

    Default Re: About EFI

    Thank you.

  6. #6
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,306

    Default Re: About EFI

    Installed a new disk yesterday:

    Code:
    erlangen:~ # gdisk -l /dev/sda
    GPT fdisk (gdisk) version 1.0.1
    
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 976773168 sectors, 465.8 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): BEEDF98F-DA82-4488-A275-F581FA13B9F8
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 976773134
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 2014 sectors (1007.0 KiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1            2048          206847   100.0 MiB   EF00  
       2          206848        63121407   30.0 GiB    8300  
       3        63121408       976773134   435.7 GiB   8300  
    erlangen:~ #
    Cloned the system partition from /dev/sdc1 to /dev/sda2 and installed grub2 efi on /dev/sda. The new system would readily boot, but only when booting into /dev/sda2 from disk /dev/sdc. Only after installing legacy grub2 and switching back to grub2 efi the system now boots from /dev/sda. Any idea?
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,681
    Blog Entries
    3

    Default Re: About EFI

    Quote Originally Posted by karlmistelberger View Post
    Cloned the system partition from /dev/sdc1 to /dev/sda2 and installed grub2 efi on /dev/sda. The new system would readily boot, but only when booting into /dev/sda2 from disk /dev/sdc. Only after installing legacy grub2 and switching back to grub2 efi the system now boots from /dev/sda. Any idea?
    It's not completely clear what you did.

    In particular, I am not clear on whether you are now booting grub2 (legacy booting) or with grub2-efi (UEFI booting). And if it is the latter, then I don't know what it is that you are asking.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  8. #8
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,306

    Default Re: About EFI

    Quote Originally Posted by nrickert View Post
    It's not completely clear what you did.

    In particular, I am not clear on whether you are now booting grub2 (legacy booting) or with grub2-efi (UEFI booting). And if it is the latter, then I don't know what it is that you are asking.

    I upgraded the first disk from Samsung 840 Evo 250 GB MBR to 850 Evo 500 GB GPT. I now have:

    Drives: HDD Total Size: 2750.6GB (73.2% used)
    ID-1: /dev/sda model: Samsung_SSD_850 size: 500.1GB GPT
    ID-2: /dev/sdb model: ST2000DM001 size: 2000.4GB MBR
    ID-3: /dev/sdc model: Samsung_SSD_850 size: 250.1GB MBR

    Partition: ID-1: / size: 30G used: 16G (56%) fs: ext4 dev: /dev/sda2
    ID-2: /home size: 428G used: 227G (56%) fs: ext4 dev: /dev/sda3
    ID-3: swap-1 size: 16.78GB used: 0.00GB (0%) fs: swap dev: /dev/sdc3

    I copied a working instance of Tumbleweed from /dev/sdc1 (MBR) to /dev/sda2 (GPR) and installed grub efi on /dev/sda Then I updated the boot loader of the old system (/dev/sdc1) and got a nice menu. Upon rebooting the machine from disk /dev/sdc (MBR) I selected the entry /dev/sda2 and got a working system (as expected). The I tried to boot from disk /dev/sda. But I only got an error message from efi: no bootable disk (puzzling).

    After some trial and error I booted from disk /dev/sdc into /dev/sda2 and switched that partition from grub efi to grub and back again to grub efi. Now I was able to boot from disk /dev/sda.

    The system now does exactly what I want. However I am wondering for what reason the first attempt failed. And I am pretty clueless why switching the bootloader back and forth fixed the problem.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,681
    Blog Entries
    3

    Default Re: About EFI

    Quote Originally Posted by karlmistelberger View Post
    The system now does exactly what I want. However I am wondering for what reason the first attempt failed.
    It's hard to know. In spite of the detail you have given, I'm still not sure on exactly what you did.

    You have to keep in mind that the UEFI firmware (BIOS) mostly only runs during boot. So you could make a lot of changes, and the BIOS would not be aware of them until it next scanned the system and update whatever records it keeps in NVRAM. So possibly you had a system with everything in place, but the BIOS did not yet know about it.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  10. #10
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    3,306

    Default Re: About EFI

    Quote Originally Posted by nrickert View Post
    It's hard to know. In spite of the detail you have given, I'm still not sure on exactly what you did.

    You have to keep in mind that the UEFI firmware (BIOS) mostly only runs during boot. So you could make a lot of changes, and the BIOS would not be aware of them until it next scanned the system and update whatever records it keeps in NVRAM. So possibly you had a system with everything in place, but the BIOS did not yet know about it.
    Hope I am done with 4 years of legacy junk:

    • reset UEFI to defaults, enabled good night led and fan silent mode
    • converted disks to gpt
    • moved system partitions to ssd
    • switched all system partitions to grub efi with each disk using their own EFI system partition
    • updated signature

    @another_roadrunner: main disk now has
    Code:
    erlangen:~ # gdisk -l /dev/sda
    GPT fdisk (gdisk) version 1.0.1
    
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with protective MBR; using GPT.
    Disk /dev/sda: 976773168 sectors, 465.8 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): BEEDF98F-DA82-4488-A275-F581FA13B9F8
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 976773134
    Partitions will be aligned on 2048-sector boundaries
    Total free space is 2014 sectors (1007.0 KiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1            2048          206847   100.0 MiB   EF00  
       2          206848        63121407   30.0 GiB    8300  
       3        63121408       976773134   435.7 GiB   8300  
    erlangen:~ # df -h /dev/sda*
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda1       100M  126K  100M   1% /boot/efi
    /dev/sda2        30G   16G   13G  56% /
    /dev/sda3       428G  243G  164G  60% /home
    erlangen:~ #
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •