View previous topic :: View next topic |
Author |
Message |
rurouni_hou_ou n00b
Joined: 15 Aug 2014 Posts: 24 Location: England, Lancashire
|
Posted: Tue Aug 26, 2014 7:49 pm Post subject: [SOLVED]Can we use our own kernels to produce an initramfs |
|
|
I have compiled vanilla kernels on another distro before and in the config I tell it to build an initramfs. It makes it and installs it to the system fine with the initramfs.
Although, when reading the section on installing the kernel in the installation guide, it tells me to use genkernel to generate one. Now I'll be frank, I don't want to use genkernel, I'd prefer to use one generated in my gentoo-sources config. Is it sane to use to produce an initramfs? Has the feature been removed with the gentoo patches?
Last edited by rurouni_hou_ou on Tue Aug 26, 2014 9:40 pm; edited 1 time in total |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Tue Aug 26, 2014 8:02 pm Post subject: |
|
|
You can use genkernel to build against your own kernel config. See the --oldconfig command line option and the corresponding OLDCONFIG option in /etc/genkernel.conf. Simple as that.
Furthermore, genkernel does use the installed kernel sources at the /usr/src/linux symlink location as the kernel to build, so, if you have gentoo-sources installed, that's what it uses. It's only the .config file that's by default ignored in favor of a genkernel-provided "kitchen sink" .config file.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
rurouni_hou_ou n00b
Joined: 15 Aug 2014 Posts: 24 Location: England, Lancashire
|
Posted: Tue Aug 26, 2014 8:21 pm Post subject: |
|
|
So genkernel is used as a front-end for building a 'kitchen-sink' kernel, and it can be directed to use my config. So that means it would use the same initramfs settings as my config. So it is safe to ignore genkernel if I want to. Thanks, I've learnt about genkernel in more depth |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Tue Aug 26, 2014 8:32 pm Post subject: |
|
|
I think a good question here would be why you want one. A custom kernel should be able to boot just fine without one.
And of course, there is no reason why you could roll one yourself to do exactly what you need and would not depend on the kernel version at all. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
rurouni_hou_ou n00b
Joined: 15 Aug 2014 Posts: 24 Location: England, Lancashire
|
Posted: Tue Aug 26, 2014 9:27 pm Post subject: |
|
|
The Doctor wrote: | I think a good question here would be why you want one. A custom kernel should be able to boot just fine without one.
And of course, there is no reason why you could roll one yourself to do exactly what you need and would not depend on the kernel version at all. |
Don't I need an initramfs if I have parts of my system mounted onto different partitions? I have both my /boot and /home directories on different partitions. |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Tue Aug 26, 2014 9:31 pm Post subject: |
|
|
No, that is fine. The only partition that might cause you problems is if /usr is a separate partition. Otherwise, your fine. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Tue Aug 26, 2014 9:33 pm Post subject: |
|
|
rurouni_hou_ou,
Neither /boot nor /home are needed to boot.
That sounds odd because your boot loader reads /boot, not the kernel.
Provided everything needed to mount the root filesystem is built into the kernel you do not need an initrd.
Currently you only need an initrd if /usr is not on the root partition. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
rurouni_hou_ou n00b
Joined: 15 Aug 2014 Posts: 24 Location: England, Lancashire
|
Posted: Tue Aug 26, 2014 9:39 pm Post subject: |
|
|
I read somewhere that you needed an initramfs if you had stuff mounted on other partitions. What I did not realize and not do is that it is only for /usr. Thank you for the pointer. I clearly wasn't thinking about the requirements properly. Problem eliminated. Thanks |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 646
|
Posted: Wed Aug 27, 2014 3:53 am Post subject: |
|
|
NeddySeagoon wrote: | rurouni_hou_ou,
Neither /boot nor /home are needed to boot.
That sounds odd because your boot loader reads /boot, not the kernel.
Provided everything needed to mount the root filesystem is built into the kernel you do not need an initrd.
Currently you only need an initrd if /usr is not on the root partition. |
and that's not even necessary if you do some simple patching. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Wed Aug 27, 2014 4:03 pm Post subject: |
|
|
saellaven,
I'm aware of that post by steveL.
I have everything except /boot in LVM on top of raid5, so I need an initrd to assemble the raid and start LVM before my root is even visible.
Going on to mount /usr is only a small addition to the initrd. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 646
|
Posted: Wed Aug 27, 2014 5:11 pm Post subject: |
|
|
NeddySeagoon wrote: | saellaven,
I'm aware of that post by steveL.
I have everything except /boot in LVM on top of raid5, so I need an initrd to assemble the raid and start LVM before my root is even visible.
Going on to mount /usr is only a small addition to the initrd. |
Yep... more complicated setups are going to need an initrd/initramfs, but simply having a separate /usr doesn't require an the same, just some patching (it's more than ridiculous that it hasn't been accepted upstream after ~2 years) |
|
Back to top |
|
|
|