Install Freebsd on Arch Linux

1, Getting the Image File
$ axel -n 8 ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/10.3/FreeBSD-10.3-STABLE-amd64-20160429-r298781-uefi-memstick.img

2, Write the Image
# dd if=FreeBSD-10.3-STABLE-amd64-20160429-r298781-uefi-memstick.img of=/dev/sdc bs=1M conv=sync

3, Restart your pc, and choose the USB stick to boot

4, It turns out a easy GUI to install it.Just do it step by step. You can see it on http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-pos…

5, Notice that when you allocate your disk space, don’t forget to add a boot to the disk.

Install Gentoo on Arch Linux

You can see it on http://www.unixmen.com/a-beginners-guide-to-install-gentoo/ and http://showerlee.blog.51cto.com/2047005/1314053 .
Make sure you are the user of “root”!
1, Setting up Partitions
/dev/sdXX
mkfs.ext4 /dev/sdXX
mkdir /mnt/gentoo
mount /dev/sdXX /mnt/gentoo

2, Downloading and Extracting the Tarball
axel -n 8 http://distfiles.gentoo.org/releases/amd64/autobuilds/20160505/stage3-amd64-20160505.tar.bz2
cd /home/liv/Downloads
tar xvjpf stage3-*.tar.bz2 -C /mnt/gentoo
cd /mnt/gentoo
3, cp -L /etc/reslov.conf /mnt/gentoo/etc/
4, mount -t proc none /mnt/gentoo/proc
mount –rbind /sys /mnt/gentoo/sys
mount –rbind /dev /mnt/gentoo/dev
5, chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1=”(chroot) $PS1″
5, nano /etc/portage/make.conf

# *** CFLAGS and CXXFLAGS ***
# CFLAGS and CXXFLAGS variables define the optimization flags for gcc C and C++ compiler.
# See https://wiki.gentoo.org/wiki/GCC_optimization for more information.
CFLAGS=”-O2 -pipe -march=native”
CXXFLAGS=”${CFLAGS}”
#
# *** CHOST ***
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
# for 64bit Intel PCs
CHOST=”x86_64-pc-linux-gnu”
# for 32bit Intel PCs
# CHOST=”i686-pc-linux-gnu”
#
# *** USE flags ***
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
# See official Gentoo docs for more information.
USE=”bindist mmx sse sse2 udev branding dbus startup-notification”
#
# *** MAKEOPTS ***
# With MAKEOPTS you define how many parallel compilations should occur
# when you install a package. A good choice is the number of CPUs (or CPU cores)
# in your system plus one, but this guideline isn’t always perfect.
MAKEOPTS=”-j7″
# The nuber “7” means the nuber of CPU+1, so if you have a dual core machine use -j3.
GENTOO_MIRRORS=”http://mirror.bjtu.edu.cn/gentoo/”

6, emerge-webrsync
emerge –sync
if needed
emerge –oneshot portage

7, Choosing the Profile
eselect profile list
Available profile symlink targets:
[1] default/linux/amd64/13.0
[2] default/linux/amd64/13.0/selinux
[3] default/linux/amd64/13.0/desktop
[4] default/linux/amd64/13.0/desktop/gnome
[5] default/linux/amd64/13.0/desktop/kde
[6] default/linux/amd64/13.0/developer
[7] default/linux/amd64/13.0/no-multilib
[8] default/linux/amd64/13.0/x32
[9] hardened/linux/amd64
[10] hardened/linux/amd64/selinux
[11] hardened/linux/amd64/no-multilib
[12] hardened/linux/amd64/no-multilib/selinux
[13] hardened/linux/amd64/x32
[14] hardened/linux/uclibc/amd64
# eselect profile set 3

8, Setting up the Timezone
# ls /usr/share/zoneinfo
# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# echo “Asia/Shanghai” > /etc/timezone

9, Choosing and Compiling Kernel
# emerge gentoo-sources
# cd /usr/src/linux
# make menuconfig

In this step, you should configure your kernel. The important is to make the your net work.
Device Drivers —> Network device support > Ethernet drive support
Choose what driver which you use.

# make -j7 && make modules_install
# make install
# emerge –ask sys-kernel/genkernel
# genkernel –install initramfs

10, # nano /etc/conf.d/hostname
hostname=”your-hostname”

11, # nano /etc/locale.gen
en_US.UTF-8 UTF-8
# locale-gen
# nano /etc/env.d/02locale
LANG=”en_US.UTF-8″
LC_COLLATE=”C”
# env-update && source /etc/profile

12, # vi /etc/conf.d/net
config_eno1=(“192.168.168.0.2 netmask 255.255.255.0 brd 192.168.0.255″)
routes_eno1=(“default via 192.168.0.1″)
# ln /etc/init.d/net.lo /etc/init.d/net.eno1
# rc-update add net.eno1 default

13, # passwd

14, # emerge –ask syslog-ng
# rc-update add syslog-ng default

15, Setting up /etc/fstab
# nano /etc/fstab
/dev/sdXX / ext4 noatime 0 1

16, # exit
pacman -S os-prober
grub-mkconfig -o /boot/grub/grub.cfg

Install Debian 8.4 on Arch Linux

You can see it on “https://www.debian.org/releases/stable/amd64/apds03.html.en”
Make sure your are using user “root”.
1, mke2fs -j /dev/sdaX
mkdir /mnt/debinst
mount /dev/sdaX /mnt/debinst
2, pacman -S debootstrap
3, yaourt -S debian-archive-keyring
4, debootstrap –arch amd64 jessie /mnt/debinst http://mirror.bjtu.edu.cn/debian
or
debootstrap –arch amd64 jessie /mnt/debinst http://mirrors.163.com/debian
or
debootstrap –arch amd64 jessie /mnt/debinst http://ftp.us.debian.org/debian
5, LANG=C.UTF-8 chroot /mnt/debinst /bin/bash
apt-get install makedev
mount none /proc -t proc
cd /dev
MAKEDEV generic
6, vi /etc/fstab
/dev/sdaX / ext3 defaults 0 1
7, dpkg-reconfigure tzdata
8, vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

or

auto eth0
iface eth0 inet static
address 192.168.0.2
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1

9, vi /etc/resolv.conf
nameserver 192.168.0.1
10, vi /etc/hostname
yourhostname
11, vi /etc/apt/sources.list
deb-src http://mirror.bjtu.edu.cn/debian jessie main
deb-src http://ftp.us.debian.org/debian jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
12, apt install locales
dpkg-reconfigure locales
13, apt-cache search linux-image
apt install linux-image-arch-etc
14, exit
pacman -S os-prober
grub-mkconfig -o /boot/grub/grub.cfg

wireless card

Wireless Card

Install wifi utilities: pacman -S iw wpa_supplicant dialog wpa_actiond;

List wireless card status: iwconfig;

Scan and Connect to hot point: sudo wifi-menu

Remember this hot point for auto-connection later (modify the wireless name based on your machine): systemctl enable netctl-auto@wlp5s0.service

oh-my-zh

sudo pacman -S zsh
sudo pacman -S git wget
sh -c “$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh )”

Manual Installation

1. Clone the repository:

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
2. Optionally, backup your existing ~/.zshrc file:

cp ~/.zshrc ~/.zshrc.orig
3. Create a new zsh configuration file

You can create a new zsh config file by copying the template that we included for you.

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
4. Change your default shell

chsh -s /bin/zsh
5. Initialize your new zsh configuration

Once you open up a new terminal window, it should load zsh with Oh My Zsh’s configuration.