Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Can we use our own kernels to produce an 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
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, Lancashire

PostPosted: Tue Aug 26, 2014 7:49 pm    Post subject: [SOLVED]Can we use our own kernels to produce an initramfs Reply with quote

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
Code:
gentoo-sources
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
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10587
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Aug 26, 2014 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, Lancashire

PostPosted: Tue Aug 26, 2014 8:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Tue Aug 26, 2014 8:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, Lancashire

PostPosted: Tue Aug 26, 2014 9:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Tue Aug 26, 2014 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Aug 26, 2014 9:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
rurouni_hou_ou
n00b
n00b


Joined: 15 Aug 2014
Posts: 24
Location: England, Lancashire

PostPosted: Tue Aug 26, 2014 9:39 pm    Post subject: Reply with quote

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 :wink:
Back to top
View user's profile Send private message
saellaven
l33t
l33t


Joined: 23 Jul 2006
Posts: 646

PostPosted: Wed Aug 27, 2014 3:53 am    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Aug 27, 2014 4:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
saellaven
l33t
l33t


Joined: 23 Jul 2006
Posts: 646

PostPosted: Wed Aug 27, 2014 5:11 pm    Post subject: Reply with quote

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
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