Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
make && make modules_install Vs. genkernel all
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
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Sat Sep 22, 2012 12:51 pm    Post subject: make && make modules_install Vs. genkernel all Reply with quote

i can see a difference when i run those commands, difference being that

make && make modules_install shows me everything its doing as soon as i run the command
genkernel says "i'm doing this stuff"

but... apart from that... visual matter, what it looks like... is there any real difference?

is there any good reason i should rather use "make && make modules_install" instead of "genkernel" apart from the fact that i need to emerge genkernel before i can use it? or vice versa, any good reason to rather use genkernel than make && make modules_install?

actually, after reading how to do this stuff manually... i kindof thought "genkernel seems so pointless now"its not even easier to use genkernel... the way i'm seeing things right now.

-while on this particular subject-

I keep having this problem on the install where it doesn't seem to be properly saving my .config file. and this is not the first time thats happening, any ideas?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Sat Sep 22, 2012 1:35 pm    Post subject: Reply with quote

There are really two fundamental reasons for the existence of genkernel:
  • For people who are uncomfortable with the kernel configuration process. After all, "make && make modules_install" isn't the hard part. The default genkernel-supplied kernel .config file builds a kernel with lots of modules. Built-in processes within the kernel will auto-detect enough hardware to get a system running in almost all cases, so you don't have to learn to do kernel configuration right out of the gate.
  • It also builds an initramfs, partly a place to contain critical drivers that need to be loaded early in the boot process. It can also be used for other things, like setting up a bootsplash image. There are other more uncommon reasons for needing an initramfs, like booting from exotic filesystems.
If you want the kernel build to be as loquacious as the manual kernel build, see the LOGLEVEL option in /etc/genkernel.conf.

Lots of people graduate from genkernel to a lean & mean manual kernel configuration. I continue to use genkernel, although I supply it with my own lean & mean .config file.

To make genkernel preserve your config changes, set the
Code:
SAVE_CONFIG=yes
option in /etc/genkernel.conf. To keep if from erasing all work products before each compile, which makes it more like the default kernel "make" command, add these
Code:
CLEAN=no
MRPROPER=no
OLDCONFIG=yes
:wink:

- John
_________________
This space intentionally left blank.


Last edited by John R. Graham on Sat Sep 22, 2012 1:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Sat Sep 22, 2012 1:42 pm    Post subject: Reply with quote

thanks, that was enlightening, and yes... i noticed just now that theres no initramfs... i thought that was needed to boot the system? can i just.... not have one if i used the manual method?
_________________
This picture was my biggest reason for ever trying Gentoo <3
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2693
Location: Hamburg/Germany

PostPosted: Sat Sep 22, 2012 1:52 pm    Post subject: Reply with quote

rabcor wrote:
thanks, that was enlightening, and yes... i noticed just now that theres no initramfs... i thought that was needed to boot the system? can i just.... not have one if i used the manual method?
Of course - I lived fine w/o initramfs/genkernel for years. But now with a Gentoo Linux at an external USB drive a kernel having initramfs is mandatory for me b/c otherwise suspend2disk does not work (probably a bug in the kernel, but nobody of the kernel devs seems to care about that currently).
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Sat Sep 22, 2012 1:55 pm    Post subject: Reply with quote

There are only a few reason that you really need an initramfs and none of them really occur when you're setting up your first system.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Sat Sep 22, 2012 2:03 pm    Post subject: Reply with quote

lets say i want to use that initramfs for whatever reason, can i get one without using genkernel?

is it safe to make genkernel make one and use it with the kernel i made without genkernel?

if so then is there a way to make genkernel just make the initramfs file and not everything else?
_________________
This picture was my biggest reason for ever trying Gentoo <3
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


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

PostPosted: Sat Sep 22, 2012 2:07 pm    Post subject: Reply with quote

Take a look at the man page:
man genkernel wrote:
SYNOPSIS
genkernel [options] {[all] | [bzImage] | [kernel] | [initramfs]}

Actions
An action tells genkernel what you want it to do – the following actions are supported:

all
Build all steps – the kernel, modules, and the ramdisk.

bzImage
Build only the kernel.

kernel
Build only the kernel and the modules.

initramfs
Build only the ramdisk.
The man pages are a great resource. You should get into the habit of checking out the man pages on tools that you use. :wink:

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
rabcor
Apprentice
Apprentice


Joined: 05 Apr 2012
Posts: 200

PostPosted: Sat Sep 22, 2012 2:17 pm    Post subject: Reply with quote

true that, just like i'm somehow managing to get used to using tab...

But i encountered an error when i tried to do this,

Code:
ERROR: Could not create empty cpio at /var/tmp/genkernel/initramfs-3.4.9-gentoo

_________________
This picture was my biggest reason for ever trying Gentoo <3
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Sep 22, 2012 3:54 pm    Post subject: Reply with quote

rabcor,

The genkernel initrd is kernel specificas it contains lots of kernel modules.
You will get a lot of warnings if your kernel has code built in and the initrd tries to load the same code as modules.

Its not hard to roll your own initrd if you need one - and you can make it kernel agnostic as long as your kernel (and system) is made to boot without needing any kernel modules loaded or user space tools.

e.g. My root is a logical volume on a raid5 set, so I have to assemble the raid set, which needs the userspace tool mdadm, then start logical volume manager, which needs lvm2 all before root can be mounted.
The kernel can't do those things so I have to use an initrd. Its not something you need worry about for a first install.
_________________
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
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