DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Gentoo Notes


Install

Follow Gentoo Linux x86 Handbook.

  1. Download gentoo install CD install-x86-minimal-20140415.iso from its website x86 minimal site;

  2. Create USB installer: dd bs=4M if=warez/archlinux-2014.04.01-dual.iso of=/dev/sdb && sync;

  3. Use this usb key start the laptop;

  4. Create a wpa_supplicant conf file:

    $ cat /etc/wpa_supplicant/wpa_supplicant.conf network={ ssid="TP-LINK..." psk="py..." scan_ssid=1 proto=WPA2 }

  5. Connect WiFi: /etc/init.d/wpa_supplicant start, verify: ping another host in your wifi network;

  6. Test network with ping www.baidu.com, if you can't connect to it, config network:

    ifconfig wlp5s0 down

    ifconfig wlp5s0 192.168.1.103 broadcast 192.168.1.255 netmask 255.255.255.0 up

    route add default gw 192.168.1.253 // get gateway IP with route -n on another host

If you still can't ping a internet website, run dhcpcd wlp5s0 to generate nameservers(stored in /etc/resolv.conf);

  1. Partition disk;

  2. The command "emerge-webrsync" in step "Configuring Portage" which download Portage snapshot from 163.com is very slow(about 15 minutes);

  3. Config kernel manually: make menuconfig: Processor type and features -> Processor family: Core 2/newer Xeon, but there are many errors due to hardware info mismatch. So I give up and use "genkernel" utility to compile the kernel. It takes about 25 minutes;

  4. ls /boot/kernel*: /boot/kernel-genkernel-x86-3.12.13-gentoo; ls /boot/initr*: /boot/initramfs-genkernel-x86-3.12.13-gentoo

  5. Install vim with emerge vim;

  6. emerge sys-boot/grub is slow;

  7. After reboot, only loopback nic is detected wiht ifconfig command.

    modprobe wlp5s0

    modprobe: FATAL: Module wlp5s0 not found

    ifconfig wlp5s0 up

    wlp5s0: ERROR while getting interface flags: No such device

    dmesg | grep iwlwifi

    ... request for firmware file 'iwlwifi-1000-5.ucode' failed. ...

    genkernel --menuconfig all

    mark "Intel Wireless WiFi MVM Firmware support" Device Drivers -> Network device support (NETDEVICES) -> Wireless LAN (WLAN) -> IEEE 802.11 for Host AP -> Support downloading firmw -> ISDN Support -> Siemens Gigaset support -> Ethernet driver support: all intel ethernet drivers

    emerge -v iwlwifi-1000-5.ucode

Start with usb key, Create a wpa_supplicant conf file;

# /etc/init.d/wpa_supplicant start  // connect to wifi.
# mount /dev/sda4 /mnt/gentoo  // 4.f: Mounting
# mkdir /mnt/gentoo/boot
# mount /dev/sda2 /mnt/gentoo/boot
# mount -t proc proc /mnt/gentoo/proc // 6.a. Chrooting: Mounting the necessary Filesystems;
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash 
# source /etc/profile
# export PS1="(chroot) $PS1"
# emerge sys-apps/pciutils   // install lspci
# emerge ...      // install iwconfig
# ifconfig -a
wlp5s0 ...
# emerge net-wireless/wpa_supplicant
#ls /lib/firmware/
// there is no "iwlwifi-1000-5.ucode microcode.dat"
# emerge sys-kernel/linux-firmware
# ls /lib/firmware/iwlwifi*
/lib/firmware/iwlwifi-1000.5.ucode
# create the wpa_supplicant.conf file
# /etc/init.d/net.wlp5s0 start


Published

May 2, 2014

Last Updated

May 2, 2014

Category

Tech

Tags

  • gentoo 1
  • linux 158

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor