Today, i followed the excellent Gentoo Handbook to install a Gentoo from scratch on my HP ProBook 6360b. And here i am documenting in this post various problems that I encountered during and after the installation, and the solutions that i found to them.
Gentoo doesn't boot
At first, i chose GPT partitioning and Grub2 as described in hear and hear, but with no luck. Gentoo won't boot after restart. Seems like i can't find grub on the boot partition. This is fixed by after changed to MBR partitioning
Finding the right modules/drivers
One nice thing about Gentoo is that you can customize the kernel according to your needs. But it's also tedious to find the suitable modules and drivers for your specific machine. Of course you can use
genkernel all to build a kernel that support almost all hardware. But that looses all fun we are having now, isn't it :)
And also, as you may have noticed, when booting using the LiveCD, every thing seems to work well. That's because like
genkernel all, the cd has pre-installed allow of modules already.
So we could dump a list of modules that the system is using by using
lspci -k from LiveCD or a system installed by
genkernel all, for future references. So that you would know what your machine actually needs quite easy.
Wired Ethernet interface is not recognized
My ethernet controller is:
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 04)
e1000e is needed.
<*> Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support
make && make modules_install. Don't forget the
make modules_install !
I you build it as a module. then you will also need to add below in
My wireless adapter is
03:00.0 Network controller: Broadcom Corporation BCM43228 802.11a/b/g/n
And the built-in open source drivers don't support it. So i have to use the "Broadcom 802.11 Linux STA driver".
First of all, i downloaded the source from http://www.broadcom.com/support/802.11/linux_sta.php and tried to build it, but with no luck:
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` make: Entering directory `/usr/src/linux-3.12.21-gentoo-r1' CFG80211 API is prefered for this kernel version Using CFG80211 API CC [M] /root/Downloads/wl-module/src/wl/sys/wl_linux.o /root/Downloads/wl-module/src/wl/sys/wl_linux.c: In function 'wl_tkip_printstats': /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3246:7: warning: passing argument 1 of 'wl->tkipmodops->print_stats' from incompatible pointer type [enabled by default] /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3246:7: note: expected 'struct seq_file *' but argument is of type 'char *' /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3249:4: warning: passing argument 1 of 'wl->tkipmodops->print_stats' from incompatible pointer type [enabled by default] /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3249:4: note: expected 'struct seq_file *' but argument is of type 'char *' /root/Downloads/wl-module/src/wl/sys/wl_linux.c: In function 'wl_reg_proc_entry': /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3470:2: error: implicit declaration of function 'create_proc_entry' [-Werror=implicit-function-declaration] /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3470:22: warning: assignment makes pointer from integer without a cast [enabled by default] /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3475:16: error: dereferencing pointer to incomplete type /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3476:16: error: dereferencing pointer to incomplete type /root/Downloads/wl-module/src/wl/sys/wl_linux.c:3477:16: error: dereferencing pointer to incomplete type cc1: some warnings being treated as errors make: *** [/root/Downloads/wl-module/src/wl/sys/wl_linux.o] Error 1 make: *** [_module_/root/Downloads/wl-module] Error 2 make: Leaving directory `/usr/src/linux-3.12.21-gentoo-r1' make: *** [all] Error 2
Then i found out there was actually a
net-wireless/broadcom-sta driver from gentoo. But installing it need some tweaks in the kernel.
* CONFIG_B43: should not be set. But it is. * CONFIG_SSB: should not be set. But it is. * CONFIG_LIB80211: is not set when it should be. * CONFIG_WIRELESS_EXT: is not set when it should be. * CONFIG_MAC80211: should not be set. But it is. * CONFIG_LIB80211_CRYPT_TKIP: is not set when it should be. * Please check to make sure these options are set correctly. * Failure to do so may cause unexpected problems. * Once you have satisfied these options, please try merging * this package again. * ERROR: net-wireless/broadcom-sta-126.96.36.199-r3::x-portage failed (setup phase): * Incorrect kernel configuration options
You will need to disable the incompatible kernel options:
Broadcom 43xx wireless support (mac80211 stack) Sonics Silicon Backplane support
Intel PRO/Wireless 2100 Network Connection
After the driver is installed, add
/etc/conf.d/modules, so that the driver can loaded automatically after reboots.
After reboot, you should see something like:
localhost linux # lsmod Module Size Used by wl 4113102 0 localhost linux # lsmod -v 03:00.0 Network controller: Broadcom Corporation BCM43228 802.11a/b/g/n Subsystem: ASUSTeK Computer Inc. Device 850c Flags: bus master, fast devsel, latency 0, IRQ 18 Memory at f7d00000 (64-bit, non-prefetchable) [size=16K] ... Kernel driver in use: wl
meaning the driver is successfully loaded.
Another problem i had was that "iwconfig" is complaining about "no wireless extensions". Thanks to khayyam who helped me figured out that i was actually missing "wext"(CFG80211_WEXT) compatibility in the kernel. After enabling
cfg80211 wireless extensions compatibility, the wireless finally start to work!
localhost linux # egrep '(WEXT|(MAC|CFG|NL)80211)' /usr/src/linux/.config CONFIG_WEXT_CORE=y CONFIG_WEXT_PROC=y CONFIG_WEXT_SPY=y CONFIG_WEXT_PRIV=y CONFIG_CFG80211=y # CONFIG_NL80211_TESTMODE is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set # CONFIG_CFG80211_REG_DEBUG is not set # CONFIG_CFG80211_DEFAULT_PS is not set # CONFIG_CFG80211_DEBUGFS is not set # CONFIG_CFG80211_INTERNAL_REGDB is not set CONFIG_CFG80211_WEXT=y # CONFIG_MAC80211 is not set
to be continued...