Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] (u)EFI, rEFInd and Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Thu Jun 07, 2018 8:20 pm    Post subject: [SOLVED] (u)EFI, rEFInd and Gentoo Reply with quote

Hi,

Installing Gentoo on a Dell Inspiron 3521 (Celeron 1007u-based laptop) w/ 4 GB RAM, Intel X25-M gen 2 80 GB SSD. When all is said and done, it will have rEFInd to boot, XFCE for DM and a few other tidbits, perhaps an office suite.

I'm building this for my dad, 75+ years old, so he can go online and do what he does - research prices, view Facebook, and see his India news. Occasionally he needs a M$ Word type application, and he monitors his finances in a set of spreadsheets.

I thought about going the route of an easier distribution, but I've chosen Gentoo because I've used it myself in the past, and I prefer setting everything up exactly as is needed for the machine, from kernel on down. Also, I don't want him looking around and 'accidentally' doing something on he machine that might break a package that is installed / that he uses.

Seeing as it is (u)EFI, I want to use rEFInd, and Gentoo, I've been playing around with using the Handbook the last several days and I've finally got the install part right up to the kernel.

But in reading both https://www.linuxsecrets.com/gentoo-wiki/wiki/Refind.html as well as https://www.rodsbooks.com/linux-uefi/#preparing, I seem to be getting confused.

Reading what Rod writes makes sense - but should I follow his advice explicitly? IOW, instead of making 4 partitions as described in the AMD64 Handbook, should I just make the 3, 1 ESP, 1 swap, and the final for all else (as I see no need to separate other partitions since the SSD is so much faster, and once I have it set up I doubt I will emerge more than a few packages at a time for updates)?

I jsut want to double check myself and ask for an outside opinion - I'm reasonably sure that what I have said is what I need to do, but never hurts to ask.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.


Last edited by johngalt on Thu Jun 07, 2018 11:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


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

PostPosted: Thu Jun 07, 2018 9:03 pm    Post subject: Reply with quote

Code:
 # fdisk -l /dev/sda
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B71B8547-F661-4A0E-A610-5FE0BDF75913

Device       Start       End   Sectors   Size Type
/dev/sda1     2048   2099199   2097152     1G EFI System
/dev/sda2  2099200 488392703 486293504 231.9G Linux filesystem


Works for me. 16G memory, no swap.
IMHO seperate boot is an anachronism. In the past BIOS could only read so far because of the cylinder. head,disk system.
reFind has no such limitations.

By all means add a swap partition if memory is limited. Or a swap file.
Code:
 # df -h /dev/sda1
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1      1022M  2.3M 1020M   1% /boot/efi
I made that first partition way too big. 200Meg is probably enough. As you see there are less than 3 Megs of files, but some BIOS's require more I'm told.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Thu Jun 07, 2018 11:05 pm    Post subject: Reply with quote

Thanks. Yeah, this laptop will need a swap, particularly if my father decides he wants to make it sleep / hibernate.

The author of rEFInd recommends 550 MB so I'll probably make it that.

Thanks again.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
joanandk
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2017
Posts: 80

PostPosted: Fri Jun 08, 2018 7:36 am    Post subject: Reply with quote

johngalt wrote:
Thanks. Yeah, this laptop will need a swap, particularly if my father decides he wants to make it sleep / hibernate.

The author of rEFInd recommends 550 MB so I'll probably make it that.

Thanks again.


You could also create a 250MB EFI-partition and use efi-stub to boot modern Kernel. I do it on daily basis with efi-stub and efi failover setup: If efi boot does not detect any usable configuration, it boots the file "/EFI/BOOT/BOOTX64.EFI" on the EFI-partition.
This method works on Lenovo, HP, IBM and HPE systems, if the implementation is done correctly.

The Kernel will be around 2-6MB, so you have more than enough room in 250MB EFI-partition.

BR
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


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

PostPosted: Fri Jun 08, 2018 11:58 am    Post subject: Reply with quote

Jonandk, that is fine if you rarely rebuild the kernel. With refind as the stub you merely have to rebuild the kernel if you have configutred refind to boot the latest kernel. Going back to a previous kernel is as simple as as a one line 'touch' command. If the kernel itself is the stub you have to copy it and run efibootmgr every time you compile or recompile a kernel. Linus has been re;easing about teo kernels a week. That's a lot of reconfiguring of boot, akin to reinstalling grub every time you change a kernel, like the old LILO days.

Using the kernel as efi stub is fine for embedded devices that will never be updated.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Fri Jun 08, 2018 8:18 pm    Post subject: Reply with quote

@joanandk Thanks for the heads up - but I want him to be able to pick and choose as needed when all is said and done so that the laptop works as flawlessly as possible. And this one is a Dell, so I'll go back and do some reading to see if that method will work particularly for this Dell early uEFI interface (which looks more like an old BIOS interface than anything).

@Tony0945 - Thanks for the explanation - Initially I will be compiling the kernel via genkernel, simply to have everything it needs to boot independently of the SystemRescueCD on USB. Once I have a good grasp of what is needed and what isn't, I will definitely be manually compiling the kernel for the machine - but I'm not sure how often after that that I will attempt reconfigure and recompile kernels, unless there is a desperate need to (such as massive security fixes).

My biggest concern right now is to try to figure out what the hardware needs in terms of kernel and USE flags lol. Which is always fun, particularly when you haven't done thing 1) for this particular hardware, and 2) for a very long time.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
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
Page 1 of 1

 
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