Michael wrote:
> On Saturday, 15 June 2024 07:53:06 BST Dale wrote:
>> Peter Humphrey wrote:
>>> On Sunday, 2 June 2024 16:11:38 BST Dale wrote:
>>>> My plan, given it is a 1TB, use maybe 300GBs of it.  Leave the rest
>>>> blank.  Have the /boot, EFI directory, root and maybe put /var on a
>>>> separate partition.  I figure for the boot stuff, 3GBs would be plenty
>>>> for all combined.  Make them large so they can grow.  Make root, which
>>>> would include /usr, say 150GBs.  /var can be around 10GBs.  My current
>>>> OS is on a 160GB drive.  I wish I could get the nerve up to use LVM on
>>>> everything except the boot stuff, /boot and the EFI stuff.  If I make
>>>> them like above, I should be good for a long time.  Could go much larger
>>>> tho.  Could use maybe 700GBs of it.  I assume it would use the unused
>>>> part if needed.  I still don't know a lot about those things.  Mostly
>>>> what I see posted on this list really.
>>> Doesn't everyone mount /tmp and /var/tmp/portage on tmpfs these days? I
>>> use
>>> hard disk for a few large packages, but I'm not convinced it's needed -
>>> except when running an emerge -e, that is, when they can get in the way
>>> of lots of others. That's why, some months ago, I suggested introducing
>>> an ability to mark some packages for compilation solitarily. (Is that a
>>> word?)
>>>
>>> Here's the output of parted -l on my main NVMe disk in case it helps:
>>>
>>> Model: Samsung SSD 970 EVO Plus 250GB (nvme)
>>> Disk /dev/nvme1n1: 250GB
>>> Sector size (logical/physical): 512B/512B
>>> Partition Table: gpt
>>> Disk Flags:
>>>
>>> Number  Start   End     Size    File system     Name      Flags
>>>
>>>  1      1049kB  135MB   134MB
>>>  2      135MB   4296MB  4161MB  fat32           boot      boot, esp
>>>  3      4296MB  12.9GB  8590MB  linux-swap(v1)  swap1     swap
>>>  4      12.9GB  34.4GB  21.5GB  ext4            rescue
>>>  5      34.4GB  60.1GB  25.8GB  ext4            root
>>>  6      60.1GB  112GB   51.5GB  ext4            var
>>>  7      112GB   114GB   2147MB  ext4            local
>>>  8      114GB   140GB   25.8GB  ext4            home
>>>  9      140GB   183GB   42.9GB  ext4            common
>>>
>>> The common partition is mounted under my home directory, to keep
>>> everything
>>> I'd want to preserve if I made myself a new user account. It's v. useful,
>>> too.
>> I'm starting the process here.  I'm trying to follow the install guide
>> but this is still not clear to me and the guide is not helping.  In your
>> list above, is #2 where /boot is mounted?  Is that where I put kernels,
>> init thingys, memtest and other images to boot from? 
> I'm simplifying this to keep it short, but you can understand the UEFI MoBo 
> firmware to be no different than the legacy CMOS code on your old MoBo, 
> except 
> upgraded, much larger and more powerful in its capabilities.  In particular, 
> it can access, load and execute directly specially structured executables, 
> stored as *.efi files on a GPT formatted disk, in the EFI System Partition 
> (ESP).  The ESP should be formatted as FAT32 and contain a directory named 
> EFI 
> in its top level, where any .EFI executables should be stored.  The ESP does 
> not have to be the first partition on the disk, the UEFI firmware will scan 
> and find .efi files in whichever FAT32 partition they are stored.
>
> NOTES: 
>
> 1. Some MoBo's UEFI firmware offer a 'Compatibility Support Module' (CSM) 
> setting, which if enabled will allow disks with a DOS partition table and a 
> boot loader in the MBR to be booted by the UEFI MoBo.  Since you are starting 
> from scratch and you're not installing Windows 98 there is no reason to have 
> this feature enabled.  I suggest you follow the handbook and use a GPT 
> partitioned disk with an ESP installed boot loader.

Left CSM cut off, didn't know what it was anyway.  LOL  Using GPT,
prefer to use GPT on everything just to be consistent.

> 2. The UEFI firmware is capable of loading Linux kernels directly without a 
> 3rd party boot loader, as long as the kernels have been created to include 
> the 
> 'EFI stub'.  This makes the kernel image executable by the UEFI firmware, 
> without the intervention of a boot loader/manager like GRUB:
>
> https://wiki.gentoo.org/wiki/EFI_stub
>
> Multibooting of different OSs or kernels can be managed thereafter by using 
> the CLI tool efibootmgr, or the UEFI boot menu (by pressing F2, DEL, or some 
> such key during POST).
>
> https://wiki.gentoo.org/wiki/Efibootmgr
>
> Given the above you broadly have the following choices:
>
> a) Simplest, direct, without a 3rd party bootloader:
>
> Mount your ESP under the /boot mountpoint and drop your kernel .efi images in 
> there, under the /boot/EFI/ directory, then boot them directly using the UEFI 
> firmware or efibootmgr to switch between them.
>
> b) Using a bootloader:
>
> Mount your ESP under the /efi mountpoint.  GRUB et al, will install their 
> .efi 
> image in the /efi/EFI/ directory.  You can have your /boot as a directory on 
> your / partition, or on its own separate partition with a more robust fs type 
> than ESP's FAT and your kernel images will be installed in there.

Hmmmm.  If I have a separate /boot, then efi gets mounted under /boot? 
Like this:

/boot/efi/<some files>

I'd like to use Grub, it's what I'm used to mostly.  That way I can
update grub with its command and I guess update the efi thingy too when
I add kernels.  I'm not sure on that tho.  I could be wrong.


> c) For systemd you can mount your ESP under the /efi mountpoint for the 
> bootloader's .efi image and then add a new 'Extended Bootloader' partition 
> type XBOOTLDR to contain all your different OSs and kernels.

I'm openrc still. No systemd. 


> You play tunes on the above basic schemes, but first it is worth spending 
> sometime reading at leisure the above mentioned URLs, plus the following 
> webpages before you pull the trigger:
>
> https://wiki.gentoo.org/wiki/EFI_System_Partition
>
> https://wiki.gentoo.org/wiki/AutoFS
>
> https://wiki.gentoo.org/wiki/Unified_kernel_image
>
>
>> My current layout for a 1TB m.2 stick, typing by hand:
>>
>> 1    8GB        EFI System   
> I think 8GB is around 8 times the size recommended by the Handbook.  I would 
> think it is rather excessive.  How many bootloaders (and potentially kernels) 
> do you intend to store in there?!  o_O

It seems in the past, I never make /boot big enough.  I plan to have a
few kernels, memtest, a Gentoo rescue image which may be the live thing
with KDE and may even throw Knoppix in too.  I want to make them plenty
large enough.  After all, that m.2 stick is way large.  I got plenty of
room for a lot of boot options and for the rest of the OS as well. 


>
>> 2    400GB    Linux file system for root or /.
> This is the / partition on the OS I'm typing this message on:
>
> Filesystem          Type      Size  Used Avail Use% Mounted on
> /dev/root           f2fs      100G   30G   71G  30% /
>
> The 30G contains a Plasma desktop, plus the usual desktop apps, like LOffice, 
> media players, etc.  It is by no means a minimalist installation.  Even if I 
> were to add six times as many files as I currently have, I would still not 
> reach your 400G allocation.
>

I have KiCAD and some other packages that are quite large installed.  On
my current setup, I have to run eclean quite often to make some room. 
KiCAD has grown a lot in the past year or so it seems.  I figure this
will make me future proof for a good long while.  Until I need a 2TB m.2
stick for the OS.  ;-) 



>> 3    180GB    Linux file system for /var.
> Err ... 
>
> ~ # du -s -h /var
> 17G   /var
>
>  

Well, it is large but it should last me a long time.  Who knows what
portage will do next.  When the distfiles and such moved to /var, it's a
good thing I was on LVM.  This time, I'm not using LVM so gotta plan
further ahead. 


>> I'll have /home and such on other drives, spinning rust. I'm just
>> wanting to be sure if my #1 and your #2 is where boot files go, Grub,
>> kernels, init thingys etc.  I've always had kernels and such on ext2 but
>> understand efi requires fat32. 
> A 1TB NVMe disk (may be) large enough to contain your home too, especially if 
> you are more frugal with space allocation on the other partitions.  The speed 
> difference between a Gen 4 NVMe and a 7200RPM SATA is very significant, 
> although this would be more noticeable if you open or store regularly many 
> large files.
>
> You can use any fs type you prefer for your /boot, but your ESP should be 
> FAT32.
>
> Over the years so many more options and permutations are on offer, it takes 
> some time to decide what would be best for your use case(s).  Ask as you come 
> across potential choices with your installation, because others may well have 
> walked this path before and would be able to share their experience.


My /home is fair sized as well.  I still have videos about things there
such as repairing things, car, washing machine and who knows what else. 
I also keep a lot of info about electronics in there as well.  Then
there is all the pictures. 

This part makes me pretty sure that /efi is under /boot as shown above. 
This is the part I wasn't clear about.  I already started the install
but I can easily backup what is done and then restore.  It wouldn't be
the first time.  Then I can rework the partitions and not lose
anything.  I guess I could leave it as is and have /boot on the root
partition. 

This new efi thing is a bit confusing.  The wiki seems to expect a
person to kinda know what they doing already.  I'm way behind on this. 

By the way, new rig is quite fast.  I'm sure the other rig would have
been faster but this is a improvement.  Compiling gcc took about 25% of
the time it takes on my current rig.  It will be better next time since
when I copied over some default emerge options, I didn't change the jobs
part.  I also forgot to put portage on tmpfs as well. 

My brain needs a break.  May rest a bit. 

Dale

:-)  :-) 

Reply via email to