Configuring Gentoo Kernel for VMware Player – Minimal Manual Configuration
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.
Go to the “Processor type and features” submenu.
Go to the “Processor family” submenu.
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.
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.
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.
Go back to the main menu and go to the “Bus options” submenu.
Ensure that you have PCI support built-in.
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.
Go to the “SCSI device support” submenu.
Ensure that you have support for “SCSI device support” and “SCSI disk support”.
Enable “SCSI low-level drivers” and go into that submenu.
Make the “SYM53C8XX Version 2 SCSI support” option built-in. Unless you have any other cards, all of the other options should be disabled.
Go back up to the “Device Drivers” submenu, add built-in support for “Fusion MPT device support”, and go into that submenu.
Add support for “Fusion MPT ScsiHost drivers for SPI” as built-in.
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.
Enable built-in support for “VMware VMCI Driver”.
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.
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.
Disable support for everything, but “Intel(R) PRO/1000 Gigabit Ethernet support” under “Intel devices”, and make that option and its parent built-in.
Go back to the main menu and go to “Networking support”.
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.
Make sure you have support for the following options as built-in: “Packet socket”, “Unix domain sockets”, and “TCP/IP networking”.
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.
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.
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.
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”.
Get back to the main “Device Drivers” submenu (entered from the main menu) and go into the “Graphics support” submenu.
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.
Enable built-in support for “Framebuffer Console support”.
Get back to the main “Device Drivers” submenu (entered from the main menu) and go into the “HID support” submenu.
Ensure that you have support for “Generic HID driver” as built-in.
Go back to the main “Device Drivers” submenu, ensure that you have built-in support for “USB support”, and then go into that submenu.
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.
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.
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”.
Go back to the main menu and then go to the “File systems” submenu.
Go to the “CD-ROM/DVD Filesystems” submenu.
Ensure that “ISO 9660 CDROM file system support” and “Microsoft Joliet CDROM extensions” are set to be built-in.
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.
Go to the “I2C Hardware Bus support” submenu.
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.
Get back to the main “Device Drivers” submenu (entered from the main menu) and then go to the “Generic Driver Options” submenu.
Ensure that “Maintain a devtmpfs filesystem to mount at /dev” is set to be built-in.
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.
Get into the “Pseudo filesystems” submenu.
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.
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.
Make sure that “IA32 Emulation” has built-in support
Go ahead and save your changes by using the right arrow key to select the save button.
In the following window just press enter to save the changes.
If it was successful, you will see the below dialog. Press enter to continue.
At this point, you have successfully (hopefully) configured the kernel. Go ahead and exit the kernel configuration by pressing “Esc” twice.
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
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
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).