顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2016年6月27日 星期一

[Linux Kernel] How to compile ASUS_WMI & ASUS_NB_WMI


I want Fn+F9 can work. So the follow step is procedure for my testing. It work.

make menuconfig

Device Drivers → X86 Platform Specific Device Drivers

Tick up
<M>   WMI  (will open - < >   ASUS WMI Driver)
Tick up
    <M>   ASUS WMI Driver (when tick up this time will tick up another item was called Asus Notebook WMI Driver)
        <M>     Asus Notebook WMI Driver

Check .config

[happy@localhost linux-4.6.2]$ grep -inr "asus_wmi"  .config
3177:CONFIG_ASUS_WMI=m
[happy@localhost linux-4.6.2]$ grep -inr "asus_nb_wmi"  .config
3178:CONFIG_ASUS_NB_WMI=m


How to find the method. I check my .config in my archlinux. The command like below.
zcat /proc/config.gz > .config

And I find my settings in my archlinux have two option have been opened.
CONFIG_ASUS_WMI=m
CONFIG_ASUS_NB_WMI=m

So I decide to download the linux kernel to find how to make those two option appear on my .config.

Why I want try this option, because my touchpad(Fn+F9) no work. I search other information that told me maybe I need this kernel module. So I want to compile it, and try if this module can let my touchpad work or not.

After set up the .config, then we need to start compile our kernel.
There have two method can do this job.

Method 1:
Use genkernel to compile kernel.

A: No specific .config
    genkernel all (Builds all stages — the initrd, kernel image and modules.)

B: Specific .config
    genkernel --config=/path/to/genkernel.conf all

Method 2:
Copy the bzImage to /boot
/usr/src/linux/arch/x86/boot/bzImage –> /boot

I need to find which one is initramfs

Edit /boot/loader/entries/gentoo.conf
title Gentoo Linux
initrd /initramfs-genkernel-x86_64-4.4.6-gentoo
linux /bzImage
options root=/dev/sda2 rw

Reference:

2015年2月9日 星期一

[ArchLinux] How to install archlinux

Prepare :
1. Download image
archlinux-2015.02.01-dual.iso

2. dd into usb flash
dd bs=4M if=/path/to/archlinux-2015.02.01-dual.iso of=/dev/sdx && sync



1. Design the partition of disk
Type: gdisk /dev/sda
Type: o //This will create a new empty GUID partition table and destroy all your data and overwrite existing partitions

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          104447   50.0 MiB    EF00  EFI System
   2          104448       125933567   60.0 GiB    8300  Linux filesystem
   3       125933568       142710783   8.0 GiB     8200  Linux swap
   4       142710784      1953525134   863.5 GiB   8300  Linux filesystem

Explain:
sda2 (/mnt/)
mkfs -t ext4 /dev/sda2

sda1 (/mnt/boot)
mkfs -t fat /dev/sda1

sda4 (/mnt/data)
mkfs -t ext4 /dev/sda4

mkswap /dev/sda3
swapon /dev/sda3

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
mount /dev/sda4 /mnt/data

2. Install base package into /mnt
pacstrap -i /mnt base net-tools

3. Create fstab into /mnt/
genfstab -U -p /mnt >> /mnt/etc/fstab

4. Install and configure a bootloader
pacman -S gummiboot
gummiboot install
nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sdaX rw

5. reboot


1. Update the database
pacman -Syu

2. Install X Window System
sudo pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils mesa

3. Install video driver for intel
a. pacman -Ss | grep intel
extra/intel-tbb 4.3_20141204-1
extra/intel-ucode 20140913-1
extra/libva-intel-driver 1.5.0-1
extra/xf86-video-intel 2.99.917-1 (xorg-drivers xorg) [installed]

b. pacman  -S  xf86-video-intel

4. Test x window
startx





1. Install desktop environment of cinnamon
sudo pacman -S cinnamon

2. Display manager (a graphical login program)
sudo pacman –S gdm
sudo systemctl start gdm

Reference:
1. How to Install Arch Linux with UEFI
2. Installing GUI (Cinnamon Desktop) and Basic Softwares in Arch Linux
3. Arch Linux Downloads
4. USB flash installation media

2014年11月24日 星期一

[VirtualBox][Vagrant] How to install and use vagrant



Install :

1. Go to Vagrant and download suitable package and execute it.
2. Go to VirtualBox and download following package.
VirtualBox platform packages
VirtualBox Extension Pack


Usage:


1. Create a folder
$ mkdir happy-1
$ cd happy-1
2.
Choose box Windows box or Mac OS box or following box
hashicorp/precise64: Ubuntu 12.04 LTS (Precise Pangolin) 64-bit
ubuntu/trusty64: Ubuntu 14.04 LTS (Trusty Tahr) 64-bit
chef/centos-6.5: CentOS 6.5 x64
chef/debian-7.4: Debian 7.4 x64
yungsang/coreos: CoreOS,support Docker。
williamyeh/ubuntu-trusty64-docker: Ubuntu 14.04 LTS,support Docker。
williamyeh/debian-jessie64-docker: Debian Jessie,support Docker。
Choose to practice docker.
$ vagrant init yungsang/coreos
$ vagrant up
After system startup, then ssh into machine and have fun.
vagrant ssh

Reference :
1. Vagrant Tutorial(2)跟著流浪漢把玩虛擬機
2. Windows Boxes for Vagrant Courtesy of Modern.ie
3. Issue tracker for OS X Mavericks Vagrant box