On Tuesday, 25 June 2024 00:47:07 BST Dale wrote:
> Michael wrote:

> > The first option in the man page explains what you did:
> > 
> > https://linux.die.net/man/8/dracut
> > 
> > -f, --force
> > overwrite existing initramfs file.
> > 
> > Did you have an initramfs already in there?
> 
> I had the kernel and the config file on /boot.

Did these files arrived in /boot/ by installing them yourself manually, or by 
having them installed automatically by calling 'make install', which utilised 
'sys-kernel/installkernel' to do it with?

If the latter, did 'sys-kernel/installkernel' have the right USE flags set for 
your system?


> I did not have anything
> else there except grub and the CPU microcode file.  I didn't save the
> init thingy when I was copying files over from previous install.  I just
> saved the config and kernel.

I suspect you may have overlaid manual and automated kernel installation 
procedures, resulting in one trying to over-write the other.  Then you run 
dracut and it complained, until you used --force to overwrite whatever files 
had already been installed in /boot.


> > No don't start over!  Have you read through this:
> > 
> > https://wiki.gentoo.org/wiki/Dracut
[snip ...]

> Yep.  I saw that too.  Thing is, it confuses me.  On the main install
> page, it shows /efi mounted on the / partition.  In other words, the
> same place /boot, /usr and /var are mounted too.  In the page you link
> to it seems to show the efi partition mounted inside /boot.  Like this: 
> /boot/efi.  The main page I think says this is no longer recommended. 
> Which am I to follow?  If it being inside /boot is discouraged, someone
> needs to update the page. 

Err ... you lost me there.  Where in the 'https://wiki.gentoo.org/wiki/Dracut' 
wiki page does it state what you mention above?!  o_O

The ESP partition's mountpoint is /efi.  Some time ago the ESP mountpoint used 
to be /boot/efi, but this is no longer recommended.

The boot partition's mountpoint for your installation is /boot.

The directories for /usr, /var, et al. will be found in the / partition.  If 
you have chosen for your /var directory to be stored on a different partition, 
then its mountpoint would be /var.


> I'm continuing on with the install but still puzzled about the dracut
> error.  Is this what /efi should look like? 
> 
> 
> (chroot) livecd / # tree /efi/
> /efi/
> └── EFI
>     └── gentoo
>         └── grubx64.efi
> 
> 3 directories, 1 file
> (chroot) livecd / #

Yes, this looks good.  The MoBo's UEFI firmware will load grubx64.efi, which 
in turn will fetch your kernel & initrd images from /boot.


> I never looked in the directory on the last install.  Nothing reported a
> error so I just went with it.  ;-)

I'm guessing, in your last install you had not mixed up manual and automated 
kernel installation steps, but in this one you did.  ;-)

You probably want to spend some quality time reading this at your leisure:

https://wiki.gentoo.org/wiki/Installkernel

Regarding the microcode file '/boot/amd-uc.img', this is created by the 'sys-
kernel/linux-firmware' package if it has USE="initramfs" set.  GRUB will find 
pick up this image file and include it along with any other initramfs images 
when you run grub-mkconfig, or when grub-mkconfig is run by 'make install'.  
Then GRUB will load it at boot time.  However, you can built both the AMD CPU 
microcode and any other firmware needed by your machine in the kernel.  Just 
add them in your kernel:

# Firmware loader
CONFIG_EXTRA_FIRMWARE="....."

before you build it.

Regarding Nvidia's module, I don't think you need an initramfs for this.  When 
the kernel loads it will fetch the Nvidia module from /lib/modules/, provided 
it can mount the root partition.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to