Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
uefi boot install problem
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3202
Location: Illinois, USA

PostPosted: Sun Mar 11, 2018 3:06 am    Post subject: Reply with quote

skellr wrote:

It already assumes /boot/efi is the default, but it never hurts to say it again, it's not like you're married to it.
If I was married to it, it would tell me multiple times. Loudly!
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 164

PostPosted: Sun Mar 11, 2018 7:43 am    Post subject: Reply with quote

skellr wrote:
Why not tell it multiple times just to make sure it knows what is wanted?
Code:
# grub-install --efi-directory=/boot/efi  --efi-directory=/boot/efi --efi-directory=/boot/efi


It already assumes /boot/efi is the default, but it never hurts to say it again, it's not like you're married to it.

:lol: Hey, I was just going with what the Wiki said and Lord knows I don't trust the GNU documentation.
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Sun Mar 11, 2018 1:50 pm    Post subject: Reply with quote

DONAHUE wrote:
recommended /etc/fstab:
Code:
#<fs>     <mountpoint> <type> <opts>          <dump/pass>
/dev/sda2 /boot        vfat   defaults,noauto 0 1
/dev/sda3 none         swap   sw              0 0
/dev/sda4 /            ext4   notail,noatime  0 1


Code:
boot the sysresccd/usb in efi mode 
mount /dev/sda4 /mnt/gentoo
ls -lR /mnt/gentoo/boot | wgetpaste -t
mkdir /mnt/gentoo/boot/efi #may exist
mount /dev/sda2 /mnt/gentoo/boot/efi
ls -lR /mnt/gentoo/boot/efi | wgetpaste -t



you are recommending mounting /dev/sda2 at /mnt/gentoo/boot/efi, and writing the corresponding place in fstab /dev/sda2 /boot. could you explain why?
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Sun Mar 11, 2018 1:52 pm    Post subject: Reply with quote

this might be a silly question but when i set up the partitions how is the /boot partition its own partition? i mean it is inside of root, but we set up the partitions like /dev/sda4 / and /dev/sda2 /boot, so partitions can be nested?
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Sun Mar 11, 2018 2:07 pm    Post subject: Reply with quote

one more, better, question:
so when partitioning the drive in the beginning, using parted,
Code:

mkpart primary 1 3
name 1 boot
set 1 bios_grub on
mkpart primary 3 131
name 2 boot
set 2 boot on
.
.
.


since my partition table will, based on recomendations here, look like
Code:

/dev/sda1 /boot
/dev/sda2 swap
/dev/sda3 /


for the boot partition, do i write
Code:
set 1 bios_grub on
or
Code:
 set 1 boot on
?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3202
Location: Illinois, USA

PostPosted: Sun Mar 11, 2018 3:21 pm    Post subject: Reply with quote

alienfetuseater wrote:
this might be a silly question but when i set up the partitions how is the /boot partition its own partition? i mean it is inside of root, but we set up the partitions like /dev/sda4 / and /dev/sda2 /boot, so partitions can be nested?

It's a good question.

Short answer:
A long time ago when hard drives used the cylinder head sector system, the boot code couldn't reach past a certain point on the disk. IIRC past 2G. So, linux systems put /boot on a separate partition at the front of the disk. The kernel, in it's boot process, mounted the rest of the system because it can read gazillions of bytes. The kernel can't read /etc/fstab until it has mounted /, so a command line parameter in grub told it where the real root is. LILO was more primitive and had the disk and partition hard coded into it. LILO used on;y BIOS commands while grub has drivers for several file systems types.
It's perfectly fine to have a single partition filesystem today.

Here's an example of an actual UEFI /etc/fstab (mine):
Code:
/dev/sda1       /boot/efi       vfat            auto,noatime    1 2
/dev/sda2       /               ext4            defaults,noatime  0 1
/dev/sdc2       /video          ext4            nofail,auto,relatime  0 1
/dev/sdb3       swap            swap            defaults        0 0
/dev/cdrom      /mnt/cdrom      auto            noauto,user,ro  0 0
tmpfs           /var/tmp/portage    tmpfs       nofail,noatime,nr_inodes=1M,size=18G    0 0
The reason for /boot/efi being on a separate partition is that UEFI demands that it be vfat. The whole of / could be on one vfat partition, if you don't mind giving up the stability and protection of ext4.
Note use of swap on an entirely different drive. That's because /dev/sda is an SSD.

Here's another example. This time it's a grub legacy system.
Code:
/dev/sda1       /boot            ext2           relatime        1 2
/dev/sda3       /                ext4           relatime        0 1
/dev/sda2       none             swap           sw,auto         0 0
/swapfile       none             swap           sw,auto         0 0
/dev/sr0        /mnt/cdrom       auto           user,auto,nofail        0 0
/dev/sdb1       /video           jfs            noauto,relatime 0 1
tmpfs           /var/tmp/portage tmpfs          nr_inodes=1M,size=12G 0 0
devpts          /dev/pts        devpts          defaults        0 0

//gentoo/video  /mnt/samba-gentoo       cifs    noauto,user=guest,password=none,ro   0 0
This one maintains the separate /boot with ext2, just because the drive is old and has been moved from system to system. Right now it's Bristol Ridge AM4 socket with DDR4 memory, but it sure didn't start that way. (athlon64 IIRC).
Notable also is the net mount the SAME drive from the first system (/video). And the use of a swapfile instead of a partition. I have an 8G RAM stick waiting to be inserted. When I do that, I'll have 16G and may delete the swapfile.

There are lots of ways to partition and mount. The handbook only suggests the most common. And seperate /boot is only common because of inertia.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7556
Location: Goose Creek SC

PostPosted: Sun Mar 11, 2018 4:46 pm    Post subject: Reply with quote

Quote:
you are recommending mounting /dev/sda2 at /mnt/gentoo/boot/efi, and writing the corresponding place in fstab /dev/sda2 /boot. could you explain why?
senility.

I do not use a separate boot partition.
On one mental track I set out to convert you to no separate boot partition.
On another mental track I set out to preserve the handbook inspired structure you have where the EFI Systems Partition (dev/sda2) contains content appropriate to the /boot directory and is being called the boot partition.
Charles pointed out the apparent inconsistency of saying just mount sda2 at /boot but advocating an fstab that would support mounting sda2 at /boot/efi.
My response should have been a correction to advocate always mounting /dev/sda2 at /boot/efi.

SO: correcting myself back to track 1:recommended /etc/fstab:
Code:

#<fs>     <mountpoint> <type> <opts>          <dump/pass>
/dev/sda2 /boot/efi    vfat   defaults,noauto 0 1
/dev/sda3 none         swap   sw              0 0
/dev/sda4 /            ext4   notail,noatime  0 1   

boot the sysresccd/usb in efi mode
Code:
mount /dev/sda4 /mnt/gentoo
ls -lR /mnt/gentoo/boot | wgetpaste -t
mkdir /mnt/gentoo/boot/efi #may exist
mount /dev/sda2 /mnt/gentoo/boot/efi
ls -lR /mnt/gentoo/boot/efi | wgetpaste -t
Post the url's returned here.

if you have a spare usb flash drive that contains nothing of value, suggest download a rEFInd flash drive image from http://sourceforge.net/projects/refind/files/0.11.2/refind-flashdrive-0.11.2.zip/download, unzip it, cd to the unzip directory (contains file refind-flashdrive-0.11.2.img), run fdisk -l noting what disks are listed, presumably /dev/sda and /dev/sdb, install the spare usb flash drive, run fdisk -l again, this second list should list a new disk, presumably /dev/sdc, assuming /dev/sdc is correct, run
Code:
dd if=refind-flashdrive-0.11.2.img of=/dev/sdf bs=4MB

dd can be destructive be sure of= is pointing to the correct "spare" usb. You can then reboot using F2 or delete to enter the UEFI and selecting the spare USB in UEFI mode as first boot choice. This will give you a chance to see the rEFInd interface plus provide trouble shooting information, ie what boot choices does rEFInd show?

In addition to Tony's excellent exposition, I would have to say that root meaning a user or a partition or a directory and boot meaning an action or a partition or a directory is the source of much confusion. Not to mention non coder meanings. :)
_________________
Defund the FCC.


Last edited by DONAHUE on Sun Mar 11, 2018 5:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14183

PostPosted: Sun Mar 11, 2018 5:11 pm    Post subject: Reply with quote

alienfetuseater wrote:
this might be a silly question but when i set up the partitions how is the /boot partition its own partition? i mean it is inside of root, but we set up the partitions like /dev/sda4 / and /dev/sda2 /boot, so partitions can be nested?
It is not inside. You have fallen for a common trap regarding partitions versus mount points. You have two non-overlapping partitions on your drive: sda2 and sda4. Each of those will contain a filesystem. To use a fileystem, it needs to be mounted somewhere. For historical reasons, filesystems must be mounted on an existing directory. You mounted sda4 as /. You later mounted sda2 as /boot. This creates a seemingly unified hierarchy since you can cd across filesystems, read and write to each, and so forth. On disk, they are still separate and non-overlapping. You can unmount /boot to expose a directory of that name with its data on the root filesystem. You should probably not do that, as that is a common source of trouble when users copy their new kernel to the directory /boot on the root filesystem, instead of the directory / on the boot filesystem. Since the bootloader searches the directory / (or sometimes /boot) on the boot filesystem, kernels copied to the root filesystem are not seen. This can be especially frustrating if you intended to overwrite a kernel on boot, since you will not get a failure at next boot, but instead the bootloader will find and use the older non-overwritten kernel (since your new replacement kernel was written to the wrong filesystem).
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Sun Mar 11, 2018 7:22 pm    Post subject: Reply with quote

yes i see, im conflating partitions and mount points, partitions are like contiguous slices of the disk, not nested, only next to one another. but the hierarchal structure of the file system gives the illusion that /boot is nested inside of /, in reality / is on /dev/sda3 and /boot is on /dev/sda1, and theres just sitting right next to each other then
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Sun Mar 11, 2018 7:24 pm    Post subject: Reply with quote

Quote:

SO: correcting myself back to track 1:recommended /etc/fstab:
Code:

#<fs>     <mountpoint> <type> <opts>          <dump/pass>
/dev/sda2 /boot/efi    vfat   defaults,noauto 0 1
/dev/sda3 none         swap   sw              0 0
/dev/sda4 /            ext4   notail,noatime  0 1   

boot the sysresccd/usb in efi mode
Code:
mount /dev/sda4 /mnt/gentoo
ls -lR /mnt/gentoo/boot | wgetpaste -t
mkdir /mnt/gentoo/boot/efi #may exist
mount /dev/sda2 /mnt/gentoo/boot/efi
ls -lR /mnt/gentoo/boot/efi | wgetpaste -t
Post the url's returned here.


ok, thank you for clarifying i will model mine after this structure
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Sun Mar 11, 2018 7:37 pm    Post subject: Reply with quote

Quote:


SO: correcting myself back to track 1:recommended /etc/fstab:
Code:

#<fs>     <mountpoint> <type> <opts>          <dump/pass>
/dev/sda2 /boot/efi    vfat   defaults,noauto 0 1
/dev/sda3 none         swap   sw              0 0
/dev/sda4 /            ext4   notail,noatime  0 1   

boot the sysresccd/usb in efi mode
Code:
mount /dev/sda4 /mnt/gentoo
ls -lR /mnt/gentoo/boot | wgetpaste -t
mkdir /mnt/gentoo/boot/efi #may exist
mount /dev/sda2 /mnt/gentoo/boot/efi
ls -lR /mnt/gentoo/boot/efi | wgetpaste -t
Post the url's returned here.


so if i structure my partitions such as my fstab winds up looking like this (no /dev/sda1), is the bios_grub flag needed to be set, or can i forget about that flag and just set the boot flag on the /dev/sda2 partition?
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Sun Mar 11, 2018 8:46 pm    Post subject: Reply with quote

Quote:


Code:
boot the sysresccd/usb in efi mode 
mount /dev/sda4 /mnt/gentoo
ls -lR /mnt/gentoo/boot | wgetpaste -t
mkdir /mnt/gentoo/boot/efi #may exist
mount /dev/sda2 /mnt/gentoo/boot/efi
ls -lR /mnt/gentoo/boot/efi | wgetpaste -t



Code:

livecd gentoo # ls -lR /mnt/gentoo/boot | wgetpaste -t
/mnt/gentoo/boot:
total 1
drwxr-xr-x 2 root root 512 Jan  1  1970 efi

/mnt/gentoo/boot/efi:
total 0

Your paste can be seen here: http://bpaste.net/show/f60fedd77c5d

Code:

livecd gentoo # ls -lR /mnt/gentoo/boot/efi | wgetpaste -t
/mnt/gentoo/boot/efi:
total 0

Your paste can be seen here: http://bpaste.net/show/876023f6e6e8
livecd gentoo #
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 901
Location: The Village, Portmeirion

PostPosted: Sun Mar 11, 2018 9:03 pm    Post subject: Reply with quote

alienfetuseater wrote:
Quote:


SO: correcting myself back to track 1:recommended /etc/fstab:
Code:

#<fs>     <mountpoint> <type> <opts>          <dump/pass>
/dev/sda2 /boot/efi    vfat   defaults,noauto 0 1
/dev/sda3 none         swap   sw              0 0
/dev/sda4 /            ext4   notail,noatime  0 1   

boot the sysresccd/usb in efi mode
Code:
mount /dev/sda4 /mnt/gentoo
ls -lR /mnt/gentoo/boot | wgetpaste -t
mkdir /mnt/gentoo/boot/efi #may exist
mount /dev/sda2 /mnt/gentoo/boot/efi
ls -lR /mnt/gentoo/boot/efi | wgetpaste -t
Post the url's returned here.


so if i structure my partitions such as my fstab winds up looking like this (no /dev/sda1), is the bios_grub flag needed to be set, or can i forget about that flag and just set the boot flag on the /dev/sda2 partition?

Yes, you got it. bios_grub would only be for sda1 and you want the boot flag for sda2 to signify that it's the ESP partition.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3202
Location: Illinois, USA

PostPosted: Mon Mar 12, 2018 1:11 am    Post subject: Reply with quote

DONAHUE wrote:
In addition to Tony's excellent exposition, I would have to say that root meaning a user or a partition or a directory and boot meaning an action or a partition or a directory is the source of much confusion. Not to mention non coder meanings. :)

Thank You. Another confusing word is "mount". Back in the Dark Ages when I was a grad student, we had a lab computer (actually US Navy property but at the University for ten years) that booted by toggling dip switches to step through the boot sequence until it read the OS from a magnetic tape. The tape was on a reel that one physically mounted onto the spindle. After the OS came up, you could unmount the reel and mount a data reel. The OS was single user but a senior grad student had perverted the print spooler into a multi-user OS. This was probably before most here were born when the Altair and Imsai were shiny and new. I first learned about programming from Byte magazine and later by reading textbooks. I got my first programming job with my MS in Physics. It was building physical models of hydraulic systems in FORTRAN. I moved into embedded programming with the 8080 and 8048 because I was there and knew more than my boss because of my reading. Microcomputers were strange and wondrous and there were no formal degrees. The crew I worked with (and learned with) were 100x better than the program by rote types you find now with certifications up their arm. They were engineers first and programmers second. Today's device programmers seem to be programmers first and engineers not at all.

Sorry to be a garrulous old man. Really just wanted to comment on "mount".
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7556
Location: Goose Creek SC

PostPosted: Mon Mar 12, 2018 2:23 am    Post subject: Reply with quote

Surprised to see /mnt/gentoo/boot/efi empty of files based on yesterday's pastebins. A good thing, fewer random files around.
boot the sysresccd/usb in efi mode, run:
Code:
mount /dev/sda4 /mnt/gentoo
mount /dev/sda2 /mnt/gentoo/boot/efi
mount | wgetpaste -t
check for efivarfs, /dev/sda2 and /dev/sda4 only mounted once and on intended mount points
enter the chroot, then run:
Code:
blkid
#determine the PARTUUID listed for /dev/sda4, save it.
cd /usr/src/linux
make menuconfig
# Edit menuconfig to:
# Processor type and features  --->
# [*] Built-in kernel command line
# (root=PARTUUID=<as found in blkid but no quotes> ro)  Built-in kernel command string
# You may want to add on 'rootfs=ext4' and/or 'net.ifnames=0'
# I enable the following:
[*]   Built-in command line overrides boot loader arguments
# you don't have to, but it ensures only the internal kernel cmdline options are used
# exit menuconfig saving configuration
make && make modules_install && make install
# kernel, config, system map will be created and copied to /boot directory
emerge grub refind efibootmgr wgetpaste
grub-install --target=x86_64-efi --efi-directory=/boot/efi | wgetpaste -t
grub-mkconfig -o /boot/grub/grub.cfg
wgetpaste -t /boot/grub/grub.cfg
refind-install | wgetpaste -t
ls -lR /boot | wgetpaste -t
exit
reboot
In case of trouble post the pastebin url's
BTW refind and grub can live happily in the same uefi
_________________
Defund the FCC.


Last edited by DONAHUE on Mon Mar 12, 2018 2:41 am; edited 1 time in total
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 612
Location: Vancouver, Canada

PostPosted: Mon Mar 12, 2018 2:26 am    Post subject: Reply with quote

I'm late to helping with this post and the fine new Gentoo user however if any of this config stuff below helps all the merrier. I more often than not use Grub with uefi gentoo installs and I find the recommended partition layout in the Gentoo handbook is not so much incorrect but instructs everyone to create a redundant partition that can be potentially confusing for some new users.

I've been doing this Gentoo thing since before I had a receding hairline and I found myself confused by the unnecessary redundant partition when i committed to learning uefi installs.

For uefi bootable partition table to function all that's required is the below partiton config. swap being entirely optional but I prefer to have a little swap space instead of playing OOM killer bingo. some of my uefi installs have only two partitions ESP and rootfs.

Code:
K.I.S.S. uefi compatible partition layout

fenrir ~ # parted -l /dev/sda
Model: ATA WDC WD2003FZEX-0 (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name    Flags
 1      1049kB  538MB   537MB   fat32           ESP     boot, esp
 2      538MB   4832MB  4294MB  linux-swap(v1)  swap
 3      4832MB  2000GB  1996GB  ext4            rootfs

sda1 is fat32 uefi filesystem mounted to /boot/EFI
sda3 is rootfs obviously


Using parted the following commands will replicate the above partition table.

Code:
mklabel gpt 
mkpart ESP fat32 1MiB 513MiB 
mkpart primary linux-swap 513MiB 2561MiB 
mkpart primary ext4 2561MiB 100% 
set 1 boot on
name 2 swap 
name 3 rootfs


Also with regards to using uefi compatible bootable install media and completing kernel config sysrescuecd is the way to go. sysrescuecd also includes a fully functional kernel config file in the booted media root directory anyone can use to configure a fully working kernel config for most common amd64 Gentoo installs.

I recently make a youtube video about completing a gentoo kernel upgrade for a colleague that reviews how to sue a preexisting Linux kernel config file to upgrade a kernel using grub may be of interest or a benefit to /u/alienfetuseater

https://www.youtube.com/watch?v=ApuDHh601zg

Also one subject that's not entirely covered in the handbook but has many benefits is using UUID based disk mounts in fstab if you do have a uefi/gpt install. grub defaults to using UUID's to identify disks and partitions and so should you.

Code:
fenrir ~ # blkid
/dev/sda1: UUID="77A1-1E9F" TYPE="vfat" PARTLABEL="ESP" PARTUUID="cefa4dd4-94c6-47c9-aa77-5d9ba976f8a4"
/dev/sda2: UUID="5b9bbf2a-4842-4439-99e5-10549eee8c3e" TYPE="swap" PARTLABEL="swap" PARTUUID="96e97a1d-d5dd-4e06-bf41-d3bcb4cd8f54"
/dev/sda3: UUID="c73b7d61-2bc4-416c-9238-d6494394d75d" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="c189b859-a40f-4311-b234-2b351e750081"

fenrir ~ # cat /etc/fstab

UUID=77A1-1E9F                                          /boot/EFI               vfat            noauto,defaults 1 2
UUID=c73b7d61-2bc4-416c-9238-d6494394d75d               /                       ext4            defaults        0 1
UUID=5b9bbf2a-4842-4439-99e5-10549eee8c3e               none                    swap            sw              0 0

#/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0

_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!


Last edited by ali3nx on Mon Mar 12, 2018 2:37 am; edited 1 time in total
Back to top
View user's profile Send private message
alienfetuseater
n00b
n00b


Joined: 26 Feb 2018
Posts: 34

PostPosted: Mon Mar 12, 2018 2:33 am    Post subject: Reply with quote

thank you everyone for your interest and sharing your wisdom and advice, configuring kernel right now, hopefully all will be well and look forward to posting some good news probably tomorrow as its getting a little late over here now
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 612
Location: Vancouver, Canada

PostPosted: Mon Mar 12, 2018 2:36 am    Post subject: Reply with quote

alienfetuseater wrote:
thank you everyone for your interest and sharing your wisdom and advice, configuring kernel right now, hopefully all will be well and look forward to posting some good news probably tomorrow as its getting a little late over here now


If your stuck at all on the kernel config part and using sysrescuecd check the root directory of the booted install media outside your install chroot. You'll find a kernel config file that's very useful to aid you. If your not sure what to do with it check the youtube video in my previous post :)
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2660

PostPosted: Mon Mar 12, 2018 6:58 am    Post subject: Reply with quote

P.Kosunen wrote:
charles17 wrote:
Better avoid /boot/efi and mount at /boot directly

EFI partition need only grub*.efi bootloader file, if you use boot directly also grub modules and kernels go there. On basic system grub modules and kernels can be in root fs, EFI system partition can be always unmounted unless you upgare grub.

So you recommend having ESP's mountpoint be /boot/efi instead of /boot for installations using grub?
What if using EFI stub kernel instead of grub?
Back to top
View user's profile Send private message
P.Kosunen
Guru
Guru


Joined: 21 Nov 2005
Posts: 309
Location: Finland

PostPosted: Mon Mar 12, 2018 3:47 pm    Post subject: Reply with quote

charles17 wrote:
So you recommend having ESP's mountpoint be /boot/efi instead of /boot for installations using grub?
What if using EFI stub kernel instead of grub?

Yes, for basic single OS UEFI installs with grub and minimal number of partitions.

In EFI stub kernels case mount point doesn't matter much. Mount is needed every time when upgrading kernel, but it stays clean if you keep only latest kernel.efi there.
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 164

PostPosted: Mon Mar 12, 2018 4:53 pm    Post subject: Reply with quote

Tony0945 wrote:
DONAHUE wrote:
In addition to Tony's excellent exposition, I would have to say that root meaning a user or a partition or a directory and boot meaning an action or a partition or a directory is the source of much confusion. Not to mention non coder meanings. :)

Thank You. Another confusing word is "mount". Back in the Dark Ages when I was a grad student, we had a lab computer (actually US Navy property but at the University for ten years) that booted by toggling dip switches to step through the boot sequence until it read the OS from a magnetic tape. The tape was on a reel that one physically mounted onto the spindle. After the OS came up, you could unmount the reel and mount a data reel. The OS was single user but a senior grad student had perverted the print spooler into a multi-user OS. This was probably before most here were born when the Altair and Imsai were shiny and new. I first learned about programming from Byte magazine and later by reading textbooks. I got my first programming job with my MS in Physics. It was building physical models of hydraulic systems in FORTRAN. I moved into embedded programming with the 8080 and 8048 because I was there and knew more than my boss because of my reading. Microcomputers were strange and wondrous and there were no formal degrees. The crew I worked with (and learned with) were 100x better than the program by rote types you find now with certifications up their arm. They were engineers first and programmers second. Today's device programmers seem to be programmers first and engineers not at all.

Sorry to be a garrulous old man. Really just wanted to comment on "mount".


++

Thanks for that post, I enjoyed reading it. Especially the second-to-last sentence. :D Reminds me of a quote by Ant P.
Ant P. wrote:
Modern distro development is largely done by Macbook-toting pythonistas with @redhat.com addresses.

_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7556
Location: Goose Creek SC

PostPosted: Mon Mar 12, 2018 4:59 pm    Post subject: Reply with quote

Use rEFInd and the efi_stub kernel with a builtin cmdline can be left in the /boot directory in an ext2 or ext4 or reiserfs or btrfs or hpfs root filesystem and be found and booted.
Grub can do almost the same but the finding requires grub-mkconfig or a substitute.
https://github.com/slytomcat/UEFI-Boot/wiki has more info
To boot an efi_stub kernel not on the ESP requires the uefi to load the appropriate file system driver (if not FAT32), map the file system (if not on the ESP), find and load the kernel, boot the kernel.
My maintenance cycle: emerge new kernel
eselect new kernel
build new kernel using make && make modules_install && make install
reboot
refind does the rest
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3202
Location: Illinois, USA

PostPosted: Mon Mar 12, 2018 5:18 pm    Post subject: Reply with quote

DONAHUE wrote:

My maintenance cycle: emerge new kernel
eselect new kernel
build new kernel using make && make modules_install && make install
reboot
refind does the rest

Exactly the same as mine. And if the new kernel is totally botched, I boot the old kernel and "touch /mnt/gentoo/boot/vmlinuzxxxxx" to make it the newest.
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 901
Location: The Village, Portmeirion

PostPosted: Mon Mar 12, 2018 6:20 pm    Post subject: Reply with quote

/sbin/installkernel wrote:
Code:
# If installing in the usual directory, run the same scripts that hook
# into kernel package installation.  Also make sure the PATH includes
# /usr/sbin and /sbin, just as dpkg would.
if [ "$dir" = "/boot" ]; then
  PATH="$PATH:/usr/sbin:/sbin" \
    run-parts --verbose --exit-on-error --arg="$ver" --arg="$dir/$img_dest-$ver" \
    /etc/kernel/postinst.d
fi

More could happen after make install if you need it.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2660

PostPosted: Mon Mar 12, 2018 6:30 pm    Post subject: Reply with quote

P.Kosunen wrote:
In EFI stub kernels case mount point doesn't matter much. Mount is needed every time when upgrading kernel, but it stays clean if you keep only latest kernel.efi there.

I am having all my bootable stuff there, including M$ Windows 10 and refind. No need at all for trailing /efi in the mount point. Just like https://wiki.gentoo.org/wiki/EFI_System_Partition#Mount_point
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum