Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Would like help getting systemd working
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
Fred Krogh

Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sun Oct 28, 2018 6:09 pm    Post subject: Would like help getting systemd working Reply with quote

It seems the world wants us to use systemd, and I'm tired of fighting the world. I've been using as my guide for switching to systemd. It has me using genkernel which I have not used in the past. I have the script
mount /dev/sda1 /boot
if [[ $# == 0 ]]; then
   echo "Argument is appended to end of \"/boot/kernel-4.\""
   echo "Current kernels are"
   ls -l /boot/kern*
  make prepare
  make modules_install
  emerge @module-rebuild
  \cp -fv arch/x86_64/boot/bzImage /boot/kernel-4.$1
  \cp -fv .config /boot/config-4.$1
  \cp -fv /boot/
  \cp -fv /
  grub-mkconfig -o /boot/grub/grub.cfg
which I have been using for years aside from the need to change a 2 to a 3 and later a 3 to 4 in the script. It has served me well. When running gnekernel I get
* Kernel compiled successfully!
* Required Kernel Parameters:
* root=/dev/$ROOT
* Where $ROOT is the device node for your root partition as the
* one specified in /etc/fstab
* If you require Genkernel's hardware detection features; you MUST
* tell your bootloader to use the provided INITRAMFS file.

* Additional kernel cmdline arguments that *may* be required to boot properly...
* With support for several ext* filesystems available, it may be needed to
* add "rootfstype=ext3" or "rootfstype=ext4" to the list of boot parameters.
I'm not clear where I'm supposed to put the roor=/dev/ext4 (in my case). Right now my /boot/grub/grup.conf has "root (hd0,0)" in several places. So do need I make the change there, I think the hd0,0 must be referring to /boot which is an ext3 system, while the root file system "/" is an ext4 file system.

Since all then made me uneasy I decided to run my usual script, and it failed toe emerge nvidia-drivers, which remains true if I try to emerge nvidia-drivers all alone. Genkernel had no complaints, but I suspect it didn't even try to re-emerge nvidia-drivers. Note that nvidia-drivers-410.73 is now running, and thus at one time emerged just fine. The error seems to be
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'mutex_destroy'
So that is probably due to a kernel change that was in the wiki. (I suggest wiki's should be more clear about things that are likely to break existing configurations.)

Question: Is there any reason to use genkernel in preference to my existing script? I expect to have more questions as I struggle through this change to systemd. Many thanks for any help.
Back to top
View user's profile Send private message

Joined: 01 Jul 2004
Posts: 7530
Location: almost Mile High in the USA

PostPosted: Sun Oct 28, 2018 9:24 pm    Post subject: Reply with quote

When it asks you to add "kernel cmdline arguments" or "parameters" - these go into the bootloader.

Since you appear to be using grub2, the arguments are in the "linux" commandline in your boot/grub/grub.cfg:
linux /boot/linux.img root=/dev/$ROOT rootfstype=ext3
initrd /boot/initrd.img

However most people like yourself use grub-mkconfig and this would be overwritten. Instead you should add the extra config to /etc/default/grub: look for the option GRUB_CMDLINE_LINUX and put it there, that way the config you want gets stuck onto every entry that grub-mkconfig generates.

grub-mkconfig should automatically add your root=xxx config for you so you don't need to add it manually, so it's the rootfstype=xxx that can potentially need to be added. HOWEVER, make sure you do add init=/usr/lib/systemd/systemd to your GRUB_CMDLINE_LINUX for systemd machines:
GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd rootfstype=ext4"

All you really need to do is inspect your resulting grub.cfg and make sure it has the linux... statements with the arguments you need.

Also, genkernel is completely optional. It builds an optional initramfs for you - and this is only needed if you have some root filesystem configuration that requires user-mode intervention to determine, such as many RAID configurations, LVM2, and encrypted root for starters. If you have none of these special features, you don't need initramfs, and thus not need genkernel either.
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
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