Configuring Gentoo Kernel for VMware Player – Minimal Manual Configuration

Written: 11/03/13

Last Updated: 09/18/16

This techtorial is the first option of the fifth article in my installing Gentoo in VMware Player series. This article covers the bare minimum kernel settings that are required to get Gentoo working inside of VMware Player and follows chapter seven of the Gentoo handbook. If you would like a more optimized tutorial, you may check out my optimized kernel configuration techtorial. I also have a tutorial covering how to automatically build the kernel via genkernel. If you are just now coming to this series, start with my first article.

These recommendations were loosely based off the ones from this Gentoo Wiki article and from this Gentoo forum post. The majority of the configuration was done based off the output of lspci. If you are using VMware Player, then many of these options you may be able to blindly follow. That being said, if your lspci dump was different from mine, you will need to change the corresponding settings to whatever fits your system.

CPU Configuration

Go to the “Processor type and features” submenu.

Gentoo - Kernel Basic Configuration - 1

Go to the “Processor family” submenu.

Gentoo - Kernel Basic Configuration - 2

Select the processor family that describes your CPU. You can use the info we gathered earlier, from reading “/proc/cpuinfo”, to help you choose the correct option.

Gentoo - Kernel Basic Configuration - 3

If your system supports hyperthreading, enable SMT support. If you have at least a dual core processor, enable multi-core scheduler support. Lastly, change the number of CPUs to the number of logical processors you have plus one; for example, a quad-core with hyperthreading should use a setting of eight plus one, not four plus one. We originally configured our VM to use one logical core, so we should set this value to two.

Gentoo - Kernel Basic Configuration - 4

It is a good idea to enable support to check your CPU temperature. This should ensure that you do not fry your chip. Just make support for “Machine Check / overheating reporting” as built-in and then select either Intel or AMD, depending on your CPU manufacturer. Note that this option should not really matter, as your host system is probably already monitoring the temperature, and modern CPUs have built-in support to auto throttle and turn off, if they become too hot.

Gentoo - Kernel Basic Configuration - 5

PCI Configuration

Go back to the main menu and go to the “Bus options” submenu.

Gentoo - Kernel Basic Configuration - 6

Ensure that you have PCI support built-in.

Gentoo - Kernel Basic Configuration - 7

Hard Drive / SCSI Configuration

VMware uses a SCSI storage controller. To be able to access our virtual drive (the file(s) containing our partition scheme, file systems, and OS), we will need to enable support for it. Go to the “Device Drivers” submenu.

Gentoo - Kernel Basic Configuration - 8

Go to the “SCSI device support” submenu.

Gentoo - Kernel Basic Configuration - 9

Ensure that you have support for “SCSI device support” and “SCSI disk support”.

Gentoo - Kernel Basic Configuration - 10

Enable “SCSI low-level drivers” and go into that submenu.

Gentoo - Kernel Basic Configuration - 11

Make the “SYM53C8XX Version 2 SCSI support” option built-in. Unless you have any other cards, all of the other options should be disabled.

Gentoo - Kernel Basic Configuration - 12

Go back up to the “Device Drivers” submenu, add built-in support for “Fusion MPT device support”, and go into that submenu.

Gentoo - Kernel Basic Configuration - 13

Add support for “Fusion MPT ScsiHost drivers for SPI” as built-in.

Gentoo - Kernel Basic Configuration - 14

VMware Virtual Machine Communication Interface (VMCI) Support

Get back to the main “Device Drivers” submenu (entered from the main menu) and then go to the “Misc devices” submenu.

Gentoo - Kernel Basic Configuration - 15

Enable built-in support for “VMware VMCI Driver”.

Gentoo - Kernel Basic Configuration - 16

Network Configuration

Get back to the main “Device Drivers” submenu (entered from the main menu), ensure that “Network device support” is built-in, and then go into that submenu.

Gentoo - Kernel Basic Configuration - 20

Unless you have any other network adapters or need any other network features other than basic Ethernet support, disable everything but “Ethernet driver support”, make that option built-in, and then enter that submenu.

Gentoo - Kernel Basic Configuration - 21

Disable support for everything, but “Intel(R) PRO/1000 Gigabit Ethernet support” under “Intel devices”, and make that option and its parent built-in.

Gentoo - Kernel Basic Configuration - 22

Go back to the main menu and go to “Networking support”.

Gentoo - Kernel Basic Configuration - 17

If you do not need any fancy networking features like WiFi and Bluetooth, disable everything; otherwise, add support as needed. When you are done, go to the “Networking options” submenu.

Gentoo - Kernel Basic Configuration - 18

Make sure you have support for the following options as built-in: “Packet socket”, “Unix domain sockets”, and “TCP/IP networking”.

Gentoo - Kernel Basic Configuration - 19

Audio Configuration

Get back to the main “Device Drivers” submenu (entered from the main menu), ensure that the “Sound card support” submenu (you may have to scroll down a bit to find it) is built-in, and then go into that submenu.

Gentoo - Kernel Basic Configuration - 23

Make sure that the “Advanced Linux Sound Architecture” submenu is built-in (you will probably also want “Preclaim OSS device numbers” as built-in) and then go into that submenu.

Gentoo - Kernel Basic Configuration - 24

Make sure you have built-in support for all of the entries that refer to “OSS”. Make sure that “PCI sound devices” has built-in support and then enter into that submenu.

Gentoo - Kernel Basic Configuration - 25

Scroll down until you find “(Creative) Ensoniq AudioPCI 1371/1373” and make it built-in. Remove support for all other sound cards, including “Intel HD Audio”.

Gentoo - Kernel Basic Configuration - 26

Graphics Support

Get back to the main “Device Drivers” submenu (entered from the main menu) and go into the “Graphics support” submenu.

Gentoo - Kernel Basic Configuration - 27

Disable support for all graphics cards and add built-in support for the following options: “Support for framebuffer devices”, “DRM driver for VMware Virtual GPU”, and “Enable framebuffer console under vmwgfx by default”. You can also disable support for AGP. Once you are done, your menu should look very similar to the below image. After making those settings, go into the “Console display driver support” submenu.

Gentoo - Kernel Basic Configuration - 28

Enable built-in support for “Framebuffer Console support”.

Gentoo - Kernel Basic Configuration - 29

USB Support

Get back to the main “Device Drivers” submenu (entered from the main menu) and go into the “HID support” submenu.

Gentoo - Kernel Basic Configuration - 30

Ensure that you have support for “Generic HID driver” as built-in.

Gentoo - Kernel Basic Configuration - 31

Go back to the main “Device Drivers” submenu, ensure that you have built-in support for “USB support”, and then go into that submenu.

Gentoo - Kernel Basic Configuration - 32

Remove support for “OHCI HCD support”, unless you configured your VM to support USB 1.1 devices. Enable built-in support for the following options: “EHCI HCD (USB 2.0) support”, “xHCI HCD (USB 3.0) support”, and “UHCI HCD (most Intel and VIA) support”. If you did not include specific support for one of those USB protocols in your initial configuration and do not plan to change that, then you do not need to add support for that protocol here. In other words, if your physical hardware does not have USB 3.0, for example, then there is no reason to include it in your kernel build.

Gentoo - Kernel Basic Configuration - 33

CDROM Support

Get back to the main “Device Drivers” submenu (entered from the main menu), add built-in support for “ATA/ATAPI/MFM/RLL support”, and go into that submenu.

Gentoo - Kernel Basic Configuration - 34

Add built-in support for the following options: “generic ATA/ATAPI disk support”, “Include IDE/ATAPI CDROM support”, “IDE ACPI support”, “legacy /proc/ide/ support”, “Generic PCI IDE chipset support”, and “Intel PIIX/ICH chipsets support”. Disable everything else. Note that if you chose to configure you VM with support for floppy disks, then you should also add built-in support for “ATAPI floppy support”.

Gentoo - Kernel Basic Configuration - 35

Go back to the main menu and then go to the “File systems” submenu.

Gentoo - Kernel Basic Configuration - 36

Go to the “CD-ROM/DVD Filesystems” submenu.

Gentoo - Kernel Basic Configuration - 37

Ensure that “ISO 9660 CDROM file system support” and “Microsoft Joliet CDROM extensions” are set to be built-in.

Gentoo - Kernel Basic Configuration - 38

I2C Bus Support

If you remember from the lspci dump, there was a PIIX4 ISA device. To the best of my knowledge, direct ISA support no longer exists in the newer Linux kernels (someone please correct me if I am wrong). That being said, we should still be able to get the support we need through the I2C hardware bus.

Get back to the main “Device Drivers” submenu (entered from the main menu), ensure that “I2C support” is built-in, and enter into that submenu.

Gentoo - Kernel Basic Configuration - 39

Go to the “I2C Hardware Bus support” submenu.

Gentoo - Kernel Basic Configuration - 40

Add built-in support for “Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)”. You should additionally add support for any other features, as needed by your chipset. For example, my chipset uses ICH10, so I am adding built-in support for “Intel 82801 (ICH/PCH)”. For more information, do some online searches about your CPU and motherboard.

Gentoo - Kernel Basic Configuration - 41

Filesystem Support

Get back to the main “Device Drivers” submenu (entered from the main menu) and then go to the “Generic Driver Options” submenu.

Gentoo - Kernel Basic Configuration - 42

Ensure that “Maintain a devtmpfs filesystem to mount at /dev” is set to be built-in.

Gentoo - Kernel Basic Configuration - 43

Get back to the “File systems” submenu (entered from the main menu). If you followed my filesystem configuration, then you should only have ext4 filesystems. Remove support for everything but ext4 and ensure that you have built-in support for ext4. When you are done, it should look similar to the below image.

Gentoo - Kernel Basic Configuration - 44

Get into the “Pseudo filesystems” submenu.

Gentoo - Kernel Basic Configuration - 45

Enable built-in support for the following items: “/proc file system support”, “Tmpfs virtual memory file system support”, “Tmpfs POSIX Access Control Lists”, and “Tmpfs extended attributes”. As for everything else, it is completely up to you. I personally chose to disable them.

Gentoo - Kernel Basic Configuration - 46

32-bit Support

If you wish to run 32-bit programs on your 64-bit OS, you will need to make sure you have support for them. Go back to the main menu and go to the “Executable file formats / Emulations” submenu.

Gentoo - Kernel Basic Configuration - 47

Make sure that “IA32 Emulation” has built-in support

Gentoo - Kernel Basic Configuration - 48

Save Changes

Go ahead and save your changes by using the right arrow key to select the save button.

Gentoo - Kernel Basic Configuration - 49

In the following window just press enter to save the changes.

Gentoo - Kernel Basic Configuration - 50

If it was successful, you will see the below dialog. Press enter to continue.

Gentoo - Kernel Basic Configuration - 51

At this point, you have successfully (hopefully) configured the kernel. Go ahead and exit the kernel configuration by pressing “Esc” twice.

Compile Kernel

We can now compile the kernel by using the below command. This may take some time, so please be patient. If all went well you should have no errors.

make && make modules_install

Gentoo - Kernel Basic Configuration - 52

Now we just need to copy over the kernel image. Make sure to replace the version number with whatever your kernel version number is. In this example, I am using “3.10.7”.

cp arch/x86_64/boot/bzImage /boot/kernel-3.10.7-gentoo

Gentoo - Kernel Basic Configuration - 53

Assuming you have been closely following this series, you should not need an initramfs or have to specify any modules to be automatically loaded at boot. If this is not the case, then please refer to the this and this section in the Gentoo Handbook, respectively.

My next article, once finished will cover how to configure your system (chapter 8 and 9 of the Gentoo Handbook).

Discussion (7)

There are 7 responses to “Configuring Gentoo Kernel for VMware Player – Minimal Manual Configuration”.

  1. Chris responded:

    · Reply

    I’ve configured Gentoo kernels in the past but I would’ve never known about these VMware specific options. Thanks so much for the guide!

  2. Thanks for the tutorials. Have you by any chance completed this?
    “My next article, once finished will cover how to configure your system (chapter 8 and 9 of the Gentoo Handbook).”

  3. Random Dude responded:

    · Reply

    Thanks for doing this. I got my system to boot but for some reason had no network support so am dead in the water. Not sure where to go really.

    • It looks like the Gentoo Handbook recently changed its structure (I’ll have to update my links). This series would need to continue with this article. I’m assuming, since you were able to get the system to boot that you went through and followed that document as well as the remaining ones. I’ll also assume that you selected the correct options in the kernel, since you were following this article.

      Did you follow the steps outlined here and here? A common mistake is forgetting to automatically enable the network adapter at boot time.

  4. Raffaele responded:

    · Reply

    And the make install ?????????

    • The command to make everything is:

      make && make modules_install
      

      This was stated at the end of that post. You can also refer to the Gentoo Handbook for more details.

Leave a Reply