Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 and Custom Kernel Parameters
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
Evilguru
Guru
Guru


Joined: 16 Aug 2005
Posts: 380
Location: England

PostPosted: Sun Sep 16, 2012 6:14 pm    Post subject: Grub2 and Custom Kernel Parameters Reply with quote

Hello,

My Gentoo install has the root partition on an dm-crypt'ed LVM2 volume. The kernel is built using genkernel which takes care of installing the relevant files into /boot and building a suitable initramfs. However, a consequence of this is that my /boot/grub2/grub.cfg file has lines such as:
Code:

menuentry 'Gentoo GNU/Linux, with Linux x86_64-3.4.4-gentoo' --class gentoo --class gnu-linux --class gnu --class os {
        load_video
        insmod part_gpt
        insmod ext2
        set root='(hd0,gpt2)'
        echo    'Loading Linux x86_64-3.4.4-gentoo ...'
        linux   /kernel-genkernel-x86_64-3.4.4-gentoo init=/linuxrc dolvm crypt_root=/dev/sda3 root=/dev/ram0 real_root=/dev/mapper/main-root ro
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-genkernel-x86_64-3.4.4-gentoo
}


Notice the extra parameters to the kernel (init, dolvm, crypt_root and real_root). The funky grub2-autogenerate-config-files-through-inspecting /boot is oblivious to these parameters. Hence, I am force to manually maintain the grub config file myself. How can I inform grub2 that extra parameters are required?

Regards, Freddie.
Back to top
View user's profile Send private message
sobhan
n00b
n00b


Joined: 05 Jul 2012
Posts: 17
Location: Tehran,Iran

PostPosted: Mon Sep 17, 2012 7:46 am    Post subject: Reply with quote

when you run grub2-mkconfig it will run all executable scripts in /etc/grub.d you can add a script for that
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