• EFI partition - some questions

    From Hans@21:1/5 to All on Wed Jan 22 14:30:01 2025
    This is a multi-part message in MIME format.

    Hi folks,

    I am using UEFI now for the first time. Everything is worḱing fine, but I do not understand
    everything. Please allow me to ask:

    1. In /etc/fstab there is my entry
    UUID=5ABD-D634 /boot/efi vfat umask=0077 0 1

    and df -h shows

    /dev/nvme0n1p1 96M 32M 65M 33% /boot/efi

    which is correct so far. But I also find the directory

    /efi

    which has the same content as /boot/efi. It shows, both are the same.

    Questions:
    1. Is the folder /efi correct and who is creating it?

    2. If not, how can I get rid of it?

    3. Which packages of debian must I install, to automate all settings of UEFI during grub-install
    or update-grub. I read of grub-efi, grub-efi-amd64, grub-efi-amd64-bin and grub-efi-amd64-
    signed. But which one I should install to get no pain. At the moment only grub-efi-amd64-bin
    and grub-efi-amd64-signed and of course grub2-common are installed. Do I need more?

    Thanks for enlightening me!

    Best

    Hans

    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    </head>
    <body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hi folks, </p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I am using UEFI now for the first time. Everything is worḱing fine, but I do not understand everything. Please allow me to ask:</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">1. In /etc/fstab there is my entry</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span style="background-color:#ffffff;"><span style="color:#000000;"><span style="font-family:monospace;">UUID=5ABD-D634  /boot/efi       vfat    umask=0077      0    
       1</span></span></span><br /></p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">and df -h shows</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><span style="background-color:#ffffff;"><span style="color:#000000;">/dev/nvme0n1p1                 96M     32M   65M   33% /boot/efi</span></span><br /></

    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">which is correct so far. But I also find the directory</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">/efi</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">which has the same content as /boot/efi. It shows, both are the same.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Questions: </p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">1. Is the folder /efi correct and who is creating it? </p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">2. If not, how can I get rid of it?</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">3. Which packages of debian must I install, to automate all settings of UEFI during grub-install or update-grub. I read of grub-efi, grub-efi-amd64, grub-efi-amd64-bin and grub-
    efi-amd64-signed. But which one I should install to get no pain. At the moment only grub-efi-amd64-bin and grub-efi-amd64-signed and of course grub2-common are installed. Do I need more?</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Thanks for enlightening me!</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Best</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hans</p>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Miata@21:1/5 to All on Wed Jan 22 16:30:01 2025
    Hans composed on 2025-01-22 14:20 (UTC+0100):

    I am using UEFI now for the first time. Everything is worḱing fine, but I do not understand
    everything. Please allow me to ask:

    1. In /etc/fstab there is my entry
    UUID=5ABD-D634 /boot/efi vfat umask=0077 0 1

    and df -h shows

    /dev/nvme0n1p1 96M 32M 65M 33% /boot/efi

    which is correct so far. But I also find the directory

    /efi

    which has the same content as /boot/efi. It shows, both are the same.

    Questions:
    1. Is the folder /efi correct and who is creating it?

    AFAICT, it is there for use by systemd-boot and possibly other alternatives to grub-efi. I'm not sure of the source, but it could possibly have been from having
    installed the usrmerge package.

    2. If not, how can I get rid of it?

    I don't like seeing it in / directory lists, so obfuscate it by removal and replacement by an empty immutable regular file by that name.

    3. Which packages of debian must I install, to automate all settings of UEFI during grub-install
    or update-grub. I read of grub-efi, grub-efi-amd64, grub-efi-amd64-bin and grub-efi-amd64-
    signed. But which one I should install to get no pain. At the moment only grub-efi-amd64-bin
    and grub-efi-amd64-signed and of course grub2-common are installed. Do I need more?

    AFAICT, if you are already UEFI booting via Debian's grub-efi-amd64, you already
    have all you need. Simply

    grub-install

    sets up the UEFI BIOS and the required file(s) on the ESP filesystem. Whether grub
    itself is fully and properly installed and menuing or not, if your UEFI BIOS BBS
    hotkey presents an entry described as UEFI debian, it should successfully boot your Debian installation. If you will have multiple Debian installations in the same computer, I recommend editing /etc/default/grub and giving GRUB_DISTRIBUTOR=
    a unique string value, e.g. "trixie-p03n", to give each a unique ESP entry, thus
    keeping each from overwriting any other(s). This is best done and applied /prior/
    to any second or subsequent installation.
    --
    Evolution as taught in public schools is, like religion,
    based on faith, not based on science.

    Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

    Felix Miata

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Hans on Wed Jan 22 16:50:01 2025
    On Wed, 22 Jan 2025 14:20:22 +0100
    Hans <hans.ullrich@loop.de> wrote:

    Hi folks,

    I am using UEFI now for the first time. Everything is worḱing fine,
    but I do not understand everything.

    That's alright, nobody else does either.

    Please allow me to ask:

    1. In /etc/fstab there is my entry
    UUID=5ABD-D634 /boot/efi vfat umask=0077 0 1

    Looks about normal.


    and df -h shows

    /dev/nvme0n1p1 96M 32M 65M 33% /boot/efi

    which is correct so far.

    So far, so good. However, please show us the complete command and
    output by copy and paste. E.g.:

    root@peregrine:~# grep efi /etc/fstab
    # /boot/efi was on /dev/nvme0n1p1 during installation
    UUID=91AE-3A24 /boot/efi vfat umask=0077 0 1 root@peregrine:~# df -h /boot/efi/
    Filesystem Size Used Avail Use% Mounted on
    /dev/nvme0n1p1 93M 5.9M 87M 7% /boot/efi
    root@peregrine:~#

    For example, the output I show confirms that the correct partition is
    mounted on /boot/efi.

    But I also find the directory

    /efi

    which has the same content as /boot/efi. It shows, both are the same.

    "It shows" ??? What shows? How?



    Questions:
    1. Is the folder /efi correct and who is creating it?

    I have no idea whether it is correct or not. I can tell you that I have
    several UEFI machines here and not one of them shows it.

    How did you install your system? Which distribution? I used a Debian
    netinst installer to install all of mine. You didn't tell us what
    distribution of Linux your are using; for all I know you are using some distribution that creates /efi for you.



    2. If not, how can I get rid of it?

    That depends on what it is. If it is a regular directory, then "rm -r
    /efi" should do it. However, if your EFI partition is also mounted on
    /efi, or /efi is a symbolic or hard link to /boot/efi, that would be catastrophic.



    3. Which packages of debian must I install, to automate all settings
    of UEFI during grub-install or update-grub. I read of grub-efi, grub-efi-amd64, grub-efi-amd64-bin and grub-efi-amd64- signed. But
    which one I should install to get no pain. At the moment only grub-efi-amd64-bin and grub-efi-amd64-signed and of course
    grub2-common are installed. Do I need more?

    Probably not. If you used a Debian 12 (bookworm) netinst installer, you
    should have everything you need. For most people, grub and efi are
    "fire and forget" systems: the system is set up once and runs
    automatically as needed.



    Thanks for enlightening me!

    Best

    Hans



    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans@21:1/5 to as it on Wed Jan 22 17:10:01 2025
    Hi Charles,
    So far, so good. However, please show us the complete command and
    output by copy and paste. E.g.:

    root@peregrine:~# grep efi /etc/fstab
    # /boot/efi was on /dev/nvme0n1p1 during installation
    UUID=91AE-3A24 /boot/efi vfat umask=0077 0 1 root@peregrine:~# df -h /boot/efi/
    Filesystem Size Used Avail Use% Mounted on
    /dev/nvme0n1p1 93M 5.9M 87M 7% /boot/efi
    root@peregrine:~#


    grep efi /etc/fstab
    # /boot/efi was on /dev/nvme0n1p1 during installation
    UUID=5ABD-D634 /boot/efi vfat umask=0077 0 1


    For example, the output I show confirms that the correct partition is
    mounted on /boot/efi.

    But I also find the directory

    /efi

    which has the same content as /boot/efi. It shows, both are the same.

    "It shows" ??? What shows? How?

    See:

    root@protheus3:~# ls -la /boot/efi/
    insgesamt 7
    drwx------ 4 root root 1024 1. Jan 1970 .
    drwxrwxrwx 5 root root 4096 19. Jan 20:28 ..
    drwx------ 5 root root 1024 18. Jan 12:10 EFI
    drwx------ 2 root root 1024 18. Jan 12:43 'System Volume Information'

    root@protheus3:~# ls -la /efi/
    insgesamt 7
    drwx------ 4 root root 1024 1. Jan 1970 .
    drwxr-xr-x 26 root root 4096 22. Jan 16:43 ..
    drwx------ 5 root root 1024 18. Jan 12:10 EFI
    drwx------ 2 root root 1024 18. Jan 12:43 'System Volume Information' root@protheus3:~#


    2. If not, how can I get rid of it?

    That depends on what it is. If it is a regular directory, then "rm -r
    /efi" should do it. However, if your EFI partition is also mounted on
    /efi, or /efi is a symbolic or hard link to /boot/efi, that would be catastrophic.

    Please take a look:

    df
    Dateisystem 1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf
    udev 8058456 0 8058456 0% /dev
    tmpfs 1618552 2812 1615740 1% /run /dev/nvme0n1p7 19046484 4556432 13497184 26% / /dev/mapper/nvme0n1p9_crypt 57342056 29104168 25292660 54% /usr
    tmpfs 8092744 2420 8090324 1% /dev/shm
    tmpfs 5120 8 5112 1% /run/lock
    shm 8092744 0 8092744 0% /run/shm
    tmp 8092744 28 8092716 1% /tmp /dev/nvme0n1p5 3764408 81732 3470964 3% /boot /dev/nvme0n1p1 98304 31927 66377 33% /efi /dev/mapper/nvme0n1p8_crypt 152671760 116433088 28410604 81% /home /dev/mapper/nvme0n1p10_crypt 28644260 12251508 14912356 46% /var
    tmpfs 1618548 216 1618332 1% /run/user/ 1000
    tmpfs 1618548 180 1618368 1% /run/user/0

    Note: you see,

    /dev/nvmne0n1p1 is mounted to /efi
    and
    /dev/nvme0n1p5 is mounted to /boot

    /boot is ext4 formatted and it should mount according to /etc/fstab to /boot/ efi. Strange thing is, somtimes the efi-üpartition is mounted to /boot/efi AND /
    efi, too.

    However, in that state, using df -h, it does NOT show, that /efi is mounted somewhere, so it should be able to delete the folder /efi. BUT this canniot be done, as it says, it is mounted. Weired!




    Probably not. If you used a Debian 12 (bookworm) netinst installer, you should have everything you need. For most people, grub and efi are
    "fire and forget" systems: the system is set up once and runs
    automatically as needed.

    The installation I did was a little bit tricky. As I needed to transfer my old Debian from ssd to nvme and it is dual-boot, I first installed Windows, then installed debian. After ist, backuped /etc to somewhere. Then rsynced / , / home, /var, /usr and so on to the NVME. After ist, rsynced the backupped /etc back, so that I got all the devicenames back.

    This worked well so far. Instead of this little issue.


    Best

    Hans

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans@21:1/5 to All on Wed Jan 22 17:30:01 2025
    Here is another clue, please see:


    df


    Dateisystem 1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf
    udev 8058456 0 8058456 0% /dev
    tmpfs 1618552 2620 1615932 1% /run /dev/nvme0n1p7 19046484 4556432 13497184 26% / /dev/mapper/nvme0n1p9_crypt 57342056 29104168 25292660 54% /usr
    tmpfs 8092744 1052 8091692 1% /dev/shm
    tmpfs 5120 8 5112 1% /run/lock
    shm 8092744 0 8092744 0% /run/shm
    tmp 8092744 4 8092740 1% /tmp /dev/nvme0n1p5 3764408 81732 3470964 3% /boot /dev/nvme0n1p1 98304 31927 66377 33% /efi /dev/mapper/nvme0n1p10_crypt 28644260 12378060 14785804 46% /var /dev/mapper/nvme0n1p8_crypt 152671760 116420552 28423140 81% /home
    tmpfs 1618548 188 1618360 1% /run/user/155 tmpfs 1618548 180 1618368 1% /run/user/0

    But now take a look here:

    cat /proc/self/mounts | grep efi
    efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0 systemd-1 /efi autofs rw,relatime,fd=51,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=16732
    0 0

    /dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-
    ro 0 0

    /dev/nvme0n1p1 /efi vfat rw,nosuid,nodev,noexec,relatime,nosymfollow,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-
    ro 0 0


    See, what I mean? /dev/nvme0n1p1 is mounted twice! But df does not show it! That looks strange for me.

    Hans

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Klaus Singvogel@21:1/5 to Hans on Wed Jan 22 17:40:01 2025
    Hans wrote:

    See, what I mean? /dev/nvme0n1p1 is mounted twice! But df does not show it! That looks strange for me.

    This isn't strange, this is intended.

    Read the df manual and look for the -a option:
    "include pseudo, duplicate, inaccessible file systems"

    Best regards,
    Klaus.
    --
    Klaus Singvogel
    GnuPG-Key-ID: 1024R/5068792D 1994-06-27

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe@21:1/5 to Cindy Sue Causey on Wed Jan 22 19:00:01 2025
    On Wed, 22 Jan 2025 10:44:25 -0500
    Cindy Sue Causey <butterflybytes@gmail.com> wrote:



    Lastly, there's that efibootmgr package. I installed it while battling
    my past fails but never used it. I've seen it mentioned here at
    Debian- User so someone here likely knows if and/or how it might help somehow.



    You probably only need this if something goes wrong. It allows display
    and manipulation of the list of bootable things on the system,
    obviously including any OSes installed. It allows (assuming competent
    UEFI firmware in the computer) setting of DefaultBoot and NextBoot
    (one-off boot, then revert to default boot) and a few other things.

    I wish there was an easily-accessible equivalent in Windows. I had a
    fair bit of trouble with a netbook which does *not* have competent
    firmware and was running dual-boot.

    --
    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Hans on Wed Jan 22 19:30:01 2025
    On Wed, 22 Jan 2025 17:06:34 +0100
    Hans <hans.ullrich@loop.de> wrote:

    "It shows" ??? What shows? How?

    See:

    root@protheus3:~# ls -la /boot/efi/
    insgesamt 7
    drwx------ 4 root root 1024 1. Jan 1970 .
    drwxrwxrwx 5 root root 4096 19. Jan 20:28 ..
    drwx------ 5 root root 1024 18. Jan 12:10 EFI
    drwx------ 2 root root 1024 18. Jan 12:43 'System Volume Information'

    root@protheus3:~# ls -la /efi/
    insgesamt 7
    drwx------ 4 root root 1024 1. Jan 1970 .
    drwxr-xr-x 26 root root 4096 22. Jan 16:43 ..
    drwx------ 5 root root 1024 18. Jan 12:10 EFI
    drwx------ 2 root root 1024 18. Jan 12:43 'System Volume Information' root@protheus3:~#

    Ah. I would have done something like "diff -r /efi /boot/efi". Since
    you have a Windows installation, there's a lot below that EFI directory.

    The installation I did was a little bit tricky. As I needed to
    transfer my old Debian from ssd to nvme and it is dual-boot, I first installed Windows, then installed debian. After ist, backuped /etc to somewhere. Then rsynced / , / home, /var, /usr and so on to the NVME.
    After ist, rsynced the backupped /etc back, so that I got all the
    devicenames back.

    This worked well so far. Instead of this little issue.

    I'm glad it's working well. My usual process for such a situation is a
    bit more complicated and probably safer. I back up a lot of the same
    stuff you do. I then restore it to /crc/<hostname>, and compare them
    with what the installer has put in place. In particular, a lot of "find /crc/<hostname> -name "*~" to locate files I have edited in the past. I
    then diff those against their new replacements and accept the changes I
    want. Tedious, but probably safer, and it gets me thinking about my customization.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)