Resources
Resources
666threesixes666
tables
root #
#absurd webapp config commandwebapp-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
Expand
webcams require kernel driver support. uvc is most common in new webcams.
Kernel Configuration
CollapseKernel configurationEnable v4l2 & gspca & uvc modules
'"`UNIQ--pre-00000001-QINU`"'
This is a deprecated template. Help us update this template!
laptop users might also need to enable
CollapseKernel configuration
'"`UNIQ--pre-00000004-QINU`"'
This is a deprecated template. Help us update this template!
Alternate install
Expand
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
Expand
Open a terminal (top left mouse icon > accessories > terminal emulator) & run. (root command, as in sudo su your terminal)
- 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
Expand
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:
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
Expand
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
Expand
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
Expand
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
Expand
or to make a more secure install of gentoo, install sudo later on, and never set a password for root....
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
Note
When you enter your password, the block will not move, this is normal.
to get to root when finished installing
passworded root install
Expand
Password, set a root password don't be locked out when you restart
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.
CollapseCode
'"`UNIQ--pre-00000010-QINU`"'
This is a deprecated template. Help us update this template!
step9
Note
it takes a long time to sync, 5-10 minutes.
Sync to Merge.
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.
step10
Expand
Open another terminal tab. (ctrl + shift + t with terminal in the foreground & highlighted)
again chroot to set some settings while sync is loading up.
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 #
eselect locale set en_US.utf8
step11
Expand
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
Expand
Re-compile the linux kernel.
open a new terminal tab & chroot again. (ctrl + shift + t with terminal in the foreground & highlighted)
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.
CollapseKernel configuration
'"`UNIQ--pre-00000015-QINU`"'
This is a deprecated template. Help us update this template!
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
- 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
Expand
Reboot into your shiny new gentoo.
You will most likely want to make a non privileged user account.
You will most likely want to add it to groups also.
root #
gpasswd -a larry wheel
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
Expand
If your system fails to boot don't delete just yet.
open a terminal and become root
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
Expand
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
Expand
Live media generally use kernel modules.
To see what modules are loaded...
Dmesg is also your friend, you can find ethernet and wireless modules like this.
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