View previous topic :: View next topic |
Author |
Message |
Evilguru Guru
Joined: 16 Aug 2005 Posts: 390 Location: England
|
Posted: Sun Sep 16, 2012 6:14 pm Post subject: Grub2 and Custom Kernel Parameters |
|
|
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 |
|
|
sobhan n00b
Joined: 05 Jul 2012 Posts: 17 Location: Tehran,Iran
|
Posted: Mon Sep 17, 2012 7:46 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|