User:666threesixes666

From Gentoo Wiki
Jump to: navigation, search
Resources
Resources
666threesixes666

tables

test tube baby
stuff and moar
root ##absurd webapp config command
webapp-config -I -h localhost -d /moodle/ moodle 2.5.1

ircserver

root #emerge --ask oidentd
root #emerge --ask shadowircd

freenode uses ircd-seven-1.1.3

webcam

webcams require kernel driver support. uvc is most common in new webcams.

Kernel Configuration

KERNEL Enable v4l2 & gspca & uvc modules
Device Drivers --->
  [m] Multimedia support --->
     [*]   Cameras/video grabbers support 
     [*]   Media USB Adapters --->
         <M> USB Video Class (UVC)
         [*]     UVC input events device support
         <M>   GSPCA based webcams (NEW)  --->
             <M>   ALi USB m5602 Camera Driver
             <M>   STV06XX USB Camera Driver 
             <M>   GL860 USB Camera Driver
             <M>   Benq USB Camera Driver 
             <M>   Conexant Camera Driver
             <M>   cpia CPiA (version 1) Camera Driver                         
             <M>   Etoms USB Camera Driver                                     
             <M>   Fujifilm FinePix USB V4L2 driver                           
             <M>   Jeilin JPEG USB V4L2 driver 
             <M>   JL2005B/C/D USB V4L2 driver                                 
             <M>   Kinect sensor device USB Camera Driver                      
             <M>   Konica USB Camera V4L2 driver                               
             <M>   Mars USB Camera Driver                                      
             <M>   Mars-Semi MR97310A USB Camera Driver                       
             <M>   Divio based (NW80x) USB Camera Driver                       
             <M>   OV51x / OVFX2 / W996xCF USB Camera Driver                   
             <M>   OV534 OV772x USB Camera Driver                              
             <M>   OV534 OV965x USB Camera Driver                              
             <M>   Pixart PAC207 USB Camera Driver 
             <M>   Pixart PAC7302 USB Camera Driver                           
             <M>   Pixart PAC7311 USB Camera Driver                            
             <M>   SE401 USB Camera Driver                                     
             <M>   SONIX Dual-Mode USB Camera Driver                          
             <M>   SN9C20X USB Camera Driver                                  
             <M>   SONIX Bayer USB Camera Driver                               
             <M>   SONIX JPEG USB Camera Driver                               
             <M>   SPCA500 USB Camera Driver                                  
             <M>   SPCA501 USB Camera Driver 
             <M>   SPCA505 USB Camera Driver                                   
             <M>   SPCA506 USB Camera Driver                                  
             <M>   SPCA508 USB Camera Driver                                   
             <M>   SPCA561 USB Camera Driver                                   
             <M>   SPCA1528 USB Camera Driver                                 
             <M>   SQ Technologies SQ905 based USB Camera Driver              
             <M>   SQ Technologies SQ905C based USB Camera Driver              
             <M>   SQ Technologies SQ930X based USB Camera Driver              
             <M>   Syntek DV4000 (STK014) USB Camera Driver
             <M>   STV0680 USB Camera Driver                                   
             <M>   SUNPLUS USB Camera Driver                                
             <M>   T613 (JPEG Compliance) USB Camera Driver             
             <M>   TOPRO USB Camera Driver                               
             <M>   TV8532 USB Camera Driver                       
             <M>   VC032X USB Camera Driver               
             <M>   ViCam USB Camera Driver        
             <M>   Xirlink C-It USB Camera Driver                
             <M>   ZC3XX USB Camera Driver
         <M>   USB Philips Cameras
         [*]     USB Philips Cameras input events device support
         <M>   CPiA2 Video For Linux
         <M>   USB ZR364XX Camera support
         <M>   USB Syntek DC1125 Camera support
         <M>   USB Sensoray 2255 video capture device
         <M>   Empia EM28xx USB video capture support
  <*> Sound card support  --->
     <*>   Advanced Linux Sound Architecture  --->
         [*]   USB sound devices  --->
             <M>   USB Audio/MIDI driver


laptop users might also need to enable

KERNEL
Device Drivers --->
  [m] Multimedia support --->
     [*]   Media Controller API
     [*]   V4L2 sub-device userspace API
     [*]   V4L platform devices  --->
         <M>   Marvell 88ALP01 (Cafe) CMOS Camera Controller support
         <M>   Support for timberdale Video In/LogiWIN
         <M>   SoC camera support
         <M>     platform camera support

Alternate install

This wiki is intended to make deployment of gentoo on alternate live media quick and easy. This is not a substitute of reading the handbook, but a skimmed version of it adapted to xubuntu's live desktop media, with high performance JFS file system, xfce4, network-manager, firefox, irc chat, grub2, porthole package management and pidgin. Just like your live media, preferably dropped in via unetbootin. (note. 'emerge -av -j5 package' will merge 5 jobs at once for a quad core, if you have a dual core, emerge -av -j3, 6core emerge -av -j7) (note. try xubuntu with out installing.) (get your xubuntu desktop iso from here. http://mirror.anl.gov/pub/ubuntu-iso/CDs-Xubuntu/12.04/release/ x86 if working on old hardware amd64 if newer than 2006)

Install

flash plugin

to watch media / etc online while installing gentoo as it takes quite long.

user $sudo apt-get update
user $sudo apt-get install flashplugin-installer

step1

Boot xubuntu live rescue cd or live usb thumb drive.

step2

Attach to any network desired, with internet access to gentoo mirrors, through nm-applet and networkmanager provided by the xubuntu live media.

step3

Open a terminal (top left mouse icon > accessories > terminal emulator) & run. (root command, as in sudo su your terminal)

root #cfdisk /dev/sda
  • make new > primary > 150mb > beginning > bootable flag > /dev/sda1
Note
if you intend on using a swap file skip swap partition creation & just make rest of the drive root
  • highlight free space > new > primary > 1000mb > beginning > /dev/sda2 > highlight type and press enter 3 times to enter it as a swap mode partition.
  • highlight free space > primary > rest of drive space, just press enter.
  • write > yes > press enter > quit

step4

With partitions squared away format them for instillation. storage

Note
if using a swap file mkfs.jfs /dev/sda1 && mkfs.jfs /dev/sda2
root #mkfs.jfs /dev/sda1 && mkfs.jfs /dev/sda3

Y > enter > Y > enter

swap partition:

root #mkswap /dev/sda2

If mkswap fails, go back to step 3 and cfdisk the drive again. If you recieve messages to reboot do so. If using swap file continue on.

step5

Mount storage and activate swap partition.

swap partition:

root #
mkdir /mnt/gentoo
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
swapon /dev/sda2

swap file:

root #
mkdir /mnt/gentoo
mount /dev/sda2 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot

to make an 4 gig swap file

root #
dd if=/dev/zero of=/mnt/gentoo/swap bs=1024 count=4194304
root #mkswap /mnt/gentoo/swap
root #chown root:root /mnt/gentoo/swap
root #chmod 0600 /mnt/gentoo/swap
root #swapon /mnt/gentoo/swap

step6

Get stage3 ready for chrooting.

Launch firefox, and go to http://www.gentoo.org/main/en/mirrors2.xml and select a local mirror.

Go to releases/YOUR COMPUTERS ARCH!/current-stage3, grab stage3-yourarch-datemade.tar.bz2 & stage3-yourarch-datemade.tar.bz2.DIGESTS.

root #
cp /home/xubuntu/Downloads/* /mnt/gentoo
cd /mnt/gentoo

Check stage3 checksum.

root #
head -n 2 stage3*.DIGESTS | sha512sum -c

If it checks OK procede.

root #
tar xvpf stage3*.bz2

step7

Wrap up chrooting, mounting, and chroot.

root #
mount -t proc none /mnt/gentoo/proc/
mount --rbind /dev /mnt/gentoo/dev/
ntpdate pool.ntp.org

(HERE COMES GENTOO!)

root #

chroot /mnt/gentoo/ /bin/bash

(Your terminal prompt should now be blood red saying xubuntu / #) (Chroot makes your /mnt/gentoo act as system root / step 8 - step 14 require you to be in chroot. You are in and building your gentoo system up at this point.)

step8

Set environment up.

root #
env-update
source /etc/profile

passwordless root install

or to make a more secure install of gentoo, install sudo later on, and never set a password for root....

  • make a user
root #useradd -m -G users user
  • add the user to the wheel group (change user to the actual user you added)
root #gpasswd -a user wheel
  • set a password for the user
root #passwd user


Note
When you enter your password, the block will not move, this is normal.

to get to root when finished installing

root #sudo su

passworded root install

Password, set a root password don't be locked out when you restart

root #passwd
Note
When you enter your password, the block will not move, this is normal

DNS client setup

root #echo "nameserver 8.8.8.8" >> /etc/resolv.conf
root #mv /etc/fstab /etc/fstab.example
root #wget -O /etc/fstab https://gist.github.com/666threesixes666/5705917/raw/a04366330da80b9f5ccc9ae15994a696a3072ea7/fstab

if using a swap file edit in /dev/sda2 && out swap. replace swap line with this one.

CODE
/swap swap swap defaults 0 0

step9

Note
it takes a long time to sync, 5-10 minutes.

Sync to Merge.

root #emerge-webrsync
Important
rm /usr/portage/metadata/timestamp.x will make it so you can sync again if first sync failed

emerge --sync is the old deprecated insecure way to sync.

root #emerge --sync

step10

Open another terminal tab. (ctrl + shift + t with terminal in the foreground & highlighted)

again chroot to set some settings while sync is loading up.

user $sudo su
root #chroot /mnt/gentoo/ /bin/bash

set time zone (example is USA DETROIT)

root #cp /usr/share/zoneinfo/America/Detroit /etc/localtime
root #ln -s /proc/self/mounts /etc/mtab
root #rc-update del mtab boot
root #echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
root #locale-gen
root #eselect locale set en_US.utf8

step11

Arange grub2 and merge system up.

root #wget -O /usr/sbin/update-grub2 https://gist.github.com/666threesixes666/5114489/raw/3785fbff24c7a537d3ce8c6afee1c13fc5dba786/update-grub2
root #chmod +x /usr/sbin/update-grub2
root #echo "sys-boot/grub" >> /etc/portage/package.accept_keywords
root #echo "sys-kernel/linux-firmware" >> /etc/portage/package.accept_keywords
root #echo "sys-kernel/vanilla-sources" >> /etc/portage/package.accept_keywords
  • If your going to be using nvidia propietary drivers mask latest kernels
root #echo ">sys-kernel/vanilla-sources-3.10.0" >> /etc/portage/package.mask
root #echo "media-libs/mesa xa" >> /etc/portage/package.use
root #echo "x11-libs/libdrm libkms" >> /etc/portage/package.use
root #echo "gnome-extra/nm-applet -bluetooth" >> /etc/portage/package.use
root #eselect profile set 3
root #emerge -av linux-firmware
root #emerge -av bc grub vanilla-sources

step12

Re-compile the linux kernel. open a new terminal tab & chroot again. (ctrl + shift + t with terminal in the foreground & highlighted)

user $sudo su
root #chroot /mnt/gentoo/ /bin/bash
root #
cd /usr/src/
ln -s linux* linux
cd linux
make clean && make distclean && make mrproper

If you have a predefined .config for your system load it to /usr/src/linux/.config now.

root #make menuconfig
KERNEL
General setup  --->
    [*] Kernel .config support
    [*]   Enable access to .config through /proc/config.gz
Device Drivers --->
    Generic Driver Options --->
	[*] Maintain a devtmpfs filesystem to mount at /dev
	[*] Automount devtmpfs at /dev, after the kernel mounted the rootfs
    <*> Serial ATA and Parallel ATA drivers --->
	<*> NVIDIA SATA support (or your boards equivelent do not M)
    [*] Network device support --->
	[*] Wireless LAN --->
		(module all of them if unsure, you can always blacklist module incompatibilities later)
File systems --->
    <*> JFS filesystem support (do not M)
    <*> FUSE (Filesystem in Userspace) support
    <*> Character device in Userspace support
	DOS/FAT/NT Filesystems --->
	    <M> NTFS file system support
	    [*] NTFS write support

Exit out completely of the blue kernel menuconfig once all settings are set.

root #cp /usr/src/linux/.config /boot/config-original
root #make && make modules_install && make install

(make sure step 11 is completely finished merging)

root #sed -i -e 's@#GRUB_CMDLINE_LINUX_DEFAULT=""@GRUB_CMDLINE_LINUX_DEFAULT="ro quiet nosplash"@' /etc/default/grub
root #update-grub2
  • finish merging the system.

bare minimum:

root #emerge -av jfsutils pciutils usbutils

everything else:

root #emerge -av syslog-ng mlocate vixie-cron xorg-server xorg-x11 xfce4-meta networkmanager nm-applet firefox-bin pidgin hexchat porthole parcellite xdm lightdm-gtk-greeter mirrorselect xfce4-terminal gnome-media sudo

step13

Finish configuring and turn on services.

root #
mv /etc/conf.d/xdm /etc/conf.d/xdm.backup
wget -O /etc/conf.d/xdm https://gist.github.com/666threesixes666/5754513/raw/888138c82a9f42b06ba09ef48b34439c5162323f/xdm
rc-update add NetworkManager default
rc-update add syslog-ng boot
rc-update add vixie-cron default
rc-update add xdm default

Post install

Reboot into your shiny new gentoo.

You will most likely want to make a non privileged user account.

root #useradd -m larry

You will most likely want to add it to groups also.

root #gpasswd -a larry wheel
root #passwd larry

Enter the users new password two times, the block will not move, this is normal behavior.

Mirror selection will help speed up package fetching.

root #mirrorselect -s3 -D -o >> /etc/portage/make.conf

Error Recovery

If your system fails to boot don't delete just yet. open a terminal and become root

user $sudo su
root #
mkdir /mnt/gentoo
fsck.jfs /dev/sda1
fsck.jfs /dev/sda3
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash

emerge & recompile your kernel to more stable settings.

Rebuild kernel take 2

If kernel failed to compile the first time follow these steps. (in chroot environment/error recovery)

root #make clean && make distclean && make mrproper
root #cp /boot/config-original /usr/src/linux/.config
root #cd /usr/src/linux && make menuconfig

reconfigure to a solvent state

root #make && make modules_install && make install && update-grub2

remove boot media and reboot.

Kernel Protips

Live media generally use kernel modules.

To see what modules are loaded...

root #lsmod

Dmesg is also your friend, you can find ethernet and wireless modules like this.

root #dmesg | grep eth
root #dmesg | grep wlan

lspci is your friend also

root #lspci -k | grep mod

when in menuconfig / will search for modules and print information about them, including where to navigate to in the menu to activate them, and any other options required to activate them.

Note
do not over customize your kernels. you can build a kernel with blank generic configs, and do not need to import previous configs. previous configs can be tainted, and introduce failure. start from scratch, get a known working config, then start to import / tweak / perfect your .configs.

cgi example

root #
cat >> /var/www/localhost/cgi-bin/test.pl << EOF
#!/usr/bin/env perl
print "Content-Type: text/plain\n\n";
print "Hello world\n";
EOF
root #chmod a+x /var/www/localhost/cgi-bin/test.pl

http://127.0.0.1/cgi-bin/test.pl

and now you're a cgi pro

web stuff

netcraft.com better yet http://toolbar.netcraft.com/site_report hostname --fqdn domainname

whats going on with all the blasted redundancy here?

mkultra@mkultra [ ~ ]$ hostname --fqdn localhost mkultra@mkultra [ ~ ]$ domainname (none) mkultra@mkultra [ ~ ]$ hostname mkultra

why does /etc/conf.d/hostname not include fields for domain names & fqdns?

xscreensaver

Sonar

Sonar must be setuid to ping clients on the subnet.

root #chmod +s /usr/lib64/misc/xscreensaver/sonar

Photo Screensavers

  • antspotlight
  • blitspin
  • carousel
  • decayscreen
  • distort
  • flipscreen 3d
  • glslideshow
  • jigsaw
  • mirrorblob
  • photopile
  • ripples
  • rotzoomer
  • slidescreen
  • spotlight
  • twang
  • vidwhacker
  • xanalogtv
  • zoom

fsv garbage

in order to get sexy jurassic park visual file system....

root #emerge --ask =x11-libs/gtk+-1.2.10-r12
root #emerge --ask =x11-libs/gtkglarea-1.2.3-r1

get sources from.... http://sourceforge.net/projects/fsv/files/

untar, cd ./configure --prefix=/usr && make....

./src/fsv