You should be able to boot the minimal livecd, mount your Gentoo installation in its current state, and chroot in. From this livecd-based networking-enabled chroot, you should be able to
emerge and configure any packages necessary for your install to access the network. To achieve this, you basically follow the procedures listed in the Gentoo Handbook , selectively skipping steps that would overwrite/format/delete your existing installation. So, to get started,
- Boot the livecd.
- If necessary, configure it to be able to access the
- Mount the partitions you configured (“Mounting”), starting with mounting your root on
# mount /dev/sda1 /mnt/gentoo in most common setups if your root partition is your first partition (some setups might have the first partition to be
/boot, you want the
/ partition, not the
/boot one in this step).
chroot into it (“Chrooting”). At the simplest, this might look like
# cd /mnt/gentoo; cp /etc/resolv.conf etc/; mount none -t proc proc; mount --rbind /sys sys; mount --rbind /dev dev; chroot .. The results in a shell which is just like you had booted up your computer without the livecd but with networking magically working (because we made it inherit the network configuration from the livecd). Don’t forget that you need to chroot manually from each individual VT shell that you want to use while configuring your Gentoo on hard disk.
- Install the necessary tools, make the necessary kernel configuration changes (if necessary), etc. through the chroot onto your computer so that it is capable of networking by itself.
This last step is the hard part. If you used
genkernel to configure your kernel, everything should, for the most part, “just work”. Your kernel is probably configured correctly if you can see something that looks like a wireless device in the output of either
ip link, or
iwconfig. If you are not using
genkernel, you probably missed the driver in
make menuconfig and should configure and recompile your kernel. I again recommend to follow the Handbook here, but the following is my best memory as to how this might go:
- As root, visit your kernel’s source directory. Most probably,
# cd /usr/src/linux.
# make menuconfig.
- Ensure that the necessary drivers and correct general wireless subsystem support is enabled.
Networking support →
Device drivers →
Network device support →
Wireless LAN is the most likely place you’ll find your specific device. If you don’t know which driver to choose, check the output of
# lspci or, on the livecd, see if any of the loaded kernel modules (output of
# lsmod) appear to be wifi-related.
- Exit from menuconfig, being sure to save the configuration when prompted.
# make && make modules_install.
- Ensure that
/boot is mounted (if you have a separate
/boot partition configured). If booted from disk,
# mount /boot should work.
arch/x86/boot/bzImage (yes, use
x86 even if you’re on
amd64. For other arches, the procedure at this point is probably different) over your existing image in
/boot. If necessary, run any magic commands related to your bootloader (if using GRUB, just popping the kernel into place and possibly editing
grub.conf (unsure about grub-2*) should be enough).
- Reboot cleanly.
If you think your wireless interface shows up in
ifconfig -a or
ip link, you probably are just missing the necessary userspace utilities and configuration to get networking to start up by itself. “Installing Necessary Tools: Networking Tools” gets you started. But it sounds like you need wireless userspace tools which are not directly mentioned in that section but discussed under “Wireless Networking”. But you might instead want to install something like
kde-misc/networkmanagement which is a NetworkManager integrated into KDE. This might (I don’t use KDE/haven’t tested) automatically ensure that networkmanager is running once you log into your KDE session and should automatically pull in any necessary wifi-supportive packages. If you go this route, you will end up with a NetworkManager instance which will automatically manage launching the necessary wifi tools/supplicant—I think you shouldn’t need to touch
wpa_supplicant.conf yourself in this situation. Or if you want to have
iwconfig available on your system, install
net-wireless/wireless-tools. If you want to manually configure access to wifi networks secured with modern (WPA/WPA2) technology through the CLI (without NetworkManager), you will need to directly install
net-wireless/wpa_supplicant, add your networks to
/etc/wpa_supplicant/wpa_supplicant.conf, create the appropriate symlink to
net.<wifi iface> where
<wifi iface> is the wireless interface’s name as seen in
# ifconfig -a, and configure the interface to initialize at boot time with
# rc-update add net.<wifi iface> default (this might not work if you are using systemd and assumes you are using openrc).
One note on installing KDE: selecting a KDE portage profile through
# eselect profile set default/linux/amd64/13.0/desktop/kde (you may be running an arch other than
amd64) is not enough to actually get KDE installed. It just sets
USEflags and other values so that, when you install packages, you get the KDE/Qt variants and avoid Gnome/GTK+ somewhat. To install KDE, you should install either
kde-meta (more packages) or
kdebase-meta (fewer packages, should install much faster), and you might do this while still running on the livecd chroot if you want KDE to be there when you reboot from your hard disk. You could also install the KDE frontend to networkmanager,
kde-misc/networkmanagement, at the same time. But, be warned: depending on your hardware and other factors, it will take a while. The following will install the more minimal starting KDE install and the KDE-integrated NetworkManager:
# emerge -va kdebase-meta kde-misc/networkmanagement
But, to sum up, you need to configure critical things like network access while still running from the livecd. Installing the necessary network support packages works much better when there is a working internet connection over which their sources can be downloaded. And once your Gentoo install has what it needs to internet, you can try booting from disk and see if that was enough. You may find yourself booting the livecd and chrooting in again (and, regardless, being familiar with how to do this can be very handy!). Sorry for the condensed answer, but this is quite broad and, really, exactly how to configure wireless and use KDE is up to you to a point.