• [gentoo-user] Fwd: Installing: Boot partition: /boot or /boot/efi ?

    From Alan E. Davis@21:1/5 to All on Fri Mar 31 23:20:01 2023
    Hello:

    It's time to try running Gentoo again, after over a decade.

    I have gone through, I think, the steps, using the Gentoo LiveCD as a launchpad.

    Installing and configuring Grub has presented a little confusion, regarding
    the correct boot partition. I have other GNU/Linux installs on this
    machine; for all of them, I've fallen into the practice of setting up grub
    in /boot/efi. However, the Gentoo Handbook does not mention this approach,
    so I tried using just "/boot". As it turned out, when I
    rebooted---thinking all steps had been completed---the Gentoo system does
    not appear in the Grub Menu.

    I have found that manjaro's grub setup has been good at picking up any
    other installs, and, once a particular one has been booted, manjaro's grub defaults to that other install. Thinking that even if grub is not working, perhaps Manjaro would see Gentoo, I tried that.

    So far, no luck. I am planning to try to mount the boot partition to /boot/efi, now, and see what happens.

    Any problems with this?

    Thank you,

    --

    Alan Davis

    "The greatness of a nation and its moral progress can be judged by the way
    its animals are treated.”
    --- Mahatma Gandhi

    <div dir="ltr"><br><div class="gmail_quote"><br><div dir="ltr">Hello:<div><br></div><div>It&#39;s time to try running Gentoo again, after over a decade. </div><div><br></div><div>I have gone through, I think, the steps, using the Gentoo LiveCD as a
    launchpad.  </div><div><br>Installing and configuring Grub has presented a little confusion, regarding the correct boot partition.  I have other GNU/Linux installs on this machine; for all of them, I&#39;ve fallen into the practice of setting up grub
    in /boot/efi.  However, the Gentoo Handbook does not mention this approach, so I tried using just &quot;/boot&quot;.  As it turned out, when I rebooted---thinking all steps had been completed---the Gentoo system does not appear in the Grub Menu.</div><
    <br></div><div>I have found that manjaro&#39;s grub setup has been good at pickin
  • From Lee K@21:1/5 to Alan E. Davis on Sat Apr 1 00:20:01 2023
    On Fri, Mar 31, 2023 at 02:08:47PM -0700, Alan E. Davis wrote:
    Hello:

    It's time to try running Gentoo again, after over a decade.

    I have gone through, I think, the steps, using the Gentoo LiveCD as a launchpad.

    Installing and configuring Grub has presented a little confusion, regarding the correct boot partition. I have other GNU/Linux installs on this
    machine; for all of them, I've fallen into the practice of setting up grub
    in /boot/efi. However, the Gentoo Handbook does not mention this approach, so I tried using just "/boot". As it turned out, when I
    rebooted---thinking all steps had been completed---the Gentoo system does
    not appear in the Grub Menu.

    I have found that manjaro's grub setup has been good at picking up any
    other installs, and, once a particular one has been booted, manjaro's grub defaults to that other install. Thinking that even if grub is not working, perhaps Manjaro would see Gentoo, I tried that.

    So far, no luck. I am planning to try to mount the boot partition to /boot/efi, now, and see what happens.

    Any problems with this?

    Thank you,

    It should indeed pick it up, if you have properly built your kernel and it
    is in the /boot directory. Have you tried running grub-mkconfig manually on your manjaro distro?


    --
    Lee

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Sat Apr 1 12:23:33 2023
    On Friday, 31 March 2023 23:15:51 BST Lee K wrote:
    On Fri, Mar 31, 2023 at 02:08:47PM -0700, Alan E. Davis wrote:
    Hello:

    It's time to try running Gentoo again, after over a decade.

    Welcome back! :-)


    I have gone through, I think, the steps, using the Gentoo LiveCD as a launchpad.

    Installing and configuring Grub has presented a little confusion,
    regarding
    the correct boot partition. I have other GNU/Linux installs on this machine; for all of them, I've fallen into the practice of setting up grub in /boot/efi. However, the Gentoo Handbook does not mention this
    approach,
    so I tried using just "/boot". As it turned out, when I rebooted---thinking all steps had been completed---the Gentoo system does not appear in the Grub Menu.

    Which GRUB's menu is this? Has it been updated with any new kernels/OS now available?


    I have found that manjaro's grub setup has been good at picking up any other installs, and, once a particular one has been booted, manjaro's grub defaults to that other install. Thinking that even if grub is not
    working,
    perhaps Manjaro would see Gentoo, I tried that.

    Manjaro and other binary distros run the grub-mkconfig command as part of their kernel & initrd update scripts, whenever a new kernel is installed/ removed. In Gentoo you will need to do this manually AND point it to the appropriate mountpoint for ESP - see below.


    So far, no luck. I am planning to try to mount the boot partition to /boot/efi, now, and see what happens.

    Any problems with this?

    Thank you,

    It should indeed pick it up, if you have properly built your kernel and it
    is in the /boot directory. Have you tried running grub-mkconfig manually on your manjaro distro?

    When UEFI MoBos started becoming mainstream and an EFI System Partition (ESP) with a FAT32 filesystem on it was necessary for UEFI firmware to boot EFI capable OS/kernels, the convention was to use /boot/efi as a mountpoint directory to mount the ESP. This would be; e.g.:

    /dev/sda1 /boot/efi vfat noauto,noatime 0 2

    I understand this is now deprecated and it should be either:

    /dev/sda1 /boot vfat noauto,noatime 0 2

    or,

    /dev/sda1 /efi vfat noauto,noatime 0 2

    However, what you call the mountpoint directory in your OS for the ESP is your choice. It can be named anything you want it to be. What is important is to adhere to some logical consistency with the UEFI standard, when you store EFI executables in this mountpoint directory and any subdirectories within it.

    The UEFI firmware requires a FAT32 formatted partition, which is created with type 'ef00' EFI system partition GUID code C12A7328-F81F-11D2- BA4B-00A0C93EC93B. The UEFI firmware will scan this partition at boot time and expect to find a directory named \EFI at the root of its FAT32 filesystem, in which any EFI executables (including GRUB's grubx64.efi) will be stored. These are conventionally stored inside directories\subdirectories named according to the different OSs installed on the PC; e.g.

    ~ $ tree /boot
    /boot
    ├── BOOT
    │ └── boot.sdi
    └── EFI
    ├── Boot
    │ └── bootx64.efi
    ├── Gentoo
    │ ├── System.map-6.1.12-gentoo
    │ ├── System.map-6.1.19-gentoo
    │ ├── bootx64-6.1.12-gentoo.efi
    │ ├── bootx64-6.1.19-gentoo.efi
    │ ├── config-6.1.12-gentoo
    │ └── config-6.1.19-gentoo
    └── Microsoft
    └── Boot
    ├── BCD
    ├── BCD.LOG
    ├── BCD.LOG1
    ├── BCD.LOG2
    ├── BOOTSTAT.DAT
    [snip]

    When you install GRUB in your /boot directory you need to make sure you have mounted the ESP first and then you point the installer to the appropriate EFI root directory; i.e.

    Either use --efi-directory=/boot, if your ESP mountpoint is /boot;

    or --efi-directory=/boot/efi, if your ESP mountpoint is /boot/efi.

    Finally, running the grub-mkconfig stanza should pick up all bootable kernels within the \ESP and update the GRUB configuration file with available kernel entries.

    If you have already installed GRUB via manjaro, you will have the GRUB executable in the ESP and do not need to reinstall it via Gentoo. As already mentioned, grub-mkconfig run from within manjaro will probe the boot (and any other FAT32 formatted) partition and include bootable OS kernels in its configuration and menu.

    With the old /boot/efi mountpoint it used to be the case the /boot directory was on the root partition, or in any case formatted with a Linux filesystem which could use symlinks for vmlinuz, but /boot/efi was pointed to the ESP with its FAT32, where the x64.efi bootloader(s) were installed. When you run 'make install' as part of a new kernel installation the vmlinuz/initrd links would be refreshed, but GRUB would not know about any of them, until grub- mkconfig was run again.

    HTH.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmQoFDUACgkQseqq9sKV ZxmiGRAA07vOnTVBqp19OBYT5zPIOJhKq7RYHw3usMAflJXQMCM65Rl/APVyUAbn 95mfgygr9CdFv5r0aABnpcSCv7n0/Pdhr5axOIAtg+YKuvyjbJd9IuyNnFrUx3me 9f/i2TCc+oG3zl+R2RBIHsHkE3ObnNRx3VN6+aLRjL5/qU/kkj9BRdu2FVotsAa0 xQkNdhLM+3BphYwVrjpCI+6w8A36zyvRgDA3R/fapYyR4ET+HJau9OWDyr3YW+Mb ziRmuUIOIqP6xy4BhEDBs+4mRO38Zj2gOFYepd8wjAQTcSXtnO0U1+KpBqx0V0F4 8n7GApKdGe4EyaFs1vwo5zSP7VWi7H3NnYJ50y9TBpcB0x59WcRYfuSXBSfyBMhz liCTYkNvb1EK1K4jUaYCcCP9k+hQalPrEgVbFJaGeTBY0F9eaaZxPWhDgS5tCWbR YXVjV3G6Kf71uWa/1dD/BGOP3wPtbCTBB9ANSX3EcP39OtIKrgZUOfEoXxONGlpF bGW9WigbNPGGOM62LqQJtgssb19AQrH7EA43q2teclZYPBlZVbJ7CPph4hyvH/sM Jt+VI+v0/vMujRAqHIkH2Zfbf3W+BL5X0sCW3OLZ/d17NHLHAiLuprgnPbtrasnQ LHFNPmrzHrmIO8RHzvqM2cwytPNEySqdOdubWK8rSLShw0TtCV0=
    =ufCt
    -----END PGP SIGNATURE-----

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