Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Eliminating initrd/initramfs
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
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Sep 15, 2022 1:40 pm    Post subject: Eliminating initrd/initramfs Reply with quote

I've never used initrd or initramfs but I think switching from gentoo-sources to gentoo-kernel for a new install changed that as I can see "Loading initial ram disk" at startup now. Can I eliminate that by applying USE="-initramfs" to gentoo-kernel?
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1652

PostPosted: Thu Sep 15, 2022 2:01 pm    Post subject: Reply with quote

While it is possible, many scenarios will require the initramfs to access the rootfs with the default kernel config.

Reading through the config, one common exception is if using the AHCI SATA driver. But most other disk drivers need the initramfs by default.

The gentoo-kernel package is designed to use the initramfs by default.

Edit: Advanced configuration can be done in /etc/kernel/config.d/*.config files, but these files may still fail if dependencies are not accounted for.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Sep 15, 2022 2:50 pm    Post subject: Reply with quote

Sounds like I'm an initramfs guy now. Is there anything I should do differently now or should have done differently during setup due to this?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Thu Sep 15, 2022 4:24 pm    Post subject: Reply with quote

grant123,


A little understating of the Boot Process may help.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mega_flow
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2016
Posts: 84
Location: Belgium

PostPosted: Thu Sep 15, 2022 11:05 pm    Post subject: Reply with quote

I use gentoo-kernel without initramfs . I setup /etc/kernel/config.d to use a minimal change on the default config for gentoo-kernel. It stil build the full kernel and take 20 min on my laptop. But i use a stabel kernel . So it wont get update weekly

    # CONFIG_DRM_NOUVEAU is not set
    # CONFIG_I2C_NVIDIA_GPU is not set
    # CONFIG_FB_SIMPLE is not set
    # CONFIG_SYSFB_SIMPLEFB is not set
    # CONFIG_INTEL_MEI is not set
    # CONFIG_INTEL_MEI_ME is not set
    # CONFIG_INTEL_MEI_TXE is not set
    # CONFIG_INTEL_MEI_HDCP is not set
    # CONFIG_IWLWIFI_DEBUG is not set
    # CONFIG_WATCHDOG is not set
    # CONFIG_BTRFS_FS is not set
    # CONFIG_KERNEL_GZIP is not set
    # CONFIG_X86_SGX is not set
    # CONFIG_ATA_SFF is not set
    # CONFIG_DM_RAID is not set
    # CONFIG_BLK_DEV_MD is not set
    # CONFIG_SECURITY_SELINUX is not set
    # CONFIG_GENTOO_LINUX_INIT_SCRIPT is not set
    # CONFIG_KEXEC is not set
    # CONFIG_KEXEC_FILE is not set
    # CONFIG_SECURITY_APPARMOR is not set
    # CONFIG_STAGING is not set

    CONFIG_GENTOO_LINUX_INIT_SYSTEMD=y
    CONFIG_DEFAULT_INIT="/lib/systemd/systemd"
    CONFIG_CMDLINE_BOOL=y
    CONFIG_CMDLINE="root=/dev/nvme0n1p2 net.ifnames=0 nvidia_drm.modeset=1"
    CONFIG_PM_STD_PARTITION="/dev/nvme1n1p1"
    CONFIG_BLK_DEV_NVME=y
    CONFIG_BINFMT_MISC=y
    CONFIG_KERNEL_LZO=y
    CONFIG_ACPI_IPMI=y
    CONFIG_DRM_SIMPLEDRM=y


only CONFIG_CMDLINE and CONFIG_BLK_DEV_NVME ar required on my laptop for a success boot ( my root partion is ext4 . if u use advanced btrfs options or Others fs it may not work )
I also setup portage env to use KCFLAGS for building and copying efistub to /boot/efi/vmlinuz

with kernel modules needed for apps like firewalld or iwd I don't like it anymore to configure my own kernel. And to see that gentoo-kernel is faster than my own config ....
_________________
Intel(R) Core(TM) i7-10875H - GeForce GTX 1660 Ti Mobile
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3267
Location: Canada

PostPosted: Sun Sep 18, 2022 12:01 am    Post subject: Reply with quote

I use direct-boot efi kernel without initramfs. My disks are nvme.
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