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

2014年12月8日 星期一

How to change linux kernel on Ubuntu

-----Ubuntu 10.04 linux kernel upgrade form 2.6.32-21-generic to 3.18.0 --------

P.S. Commands marks as purple.


1.
Download linux kernel from https://www.kernel.org/
Choose file: linux-3.18.tar.xz

2.
sudo apt-get install xz-utils
tar Jxvf linux-3.18.tar.xz

3.
sudo apt-get install libncurses5-dev
sudo apt-get install kernel-package
cd linux-3.18
sudo cp /boot/config-2.6.32-21-generic .config
make menuconfig
fakeroot make-kpkg --initrd --revision huang.001 --append-to-version -20141208 kernel_image

4.
double click and install "linux-image-3.18.0-20141208_huang.001_i386.deb"

5.
check new linux kernel module name:
ls /lib/modules/
2.6.32-21-generic    3.18.0-20141208

6. create initrd:
cd /boot
sudo makinitramfs -k -o initrd.img-3.18.0-20141208 3.18.0-20141208
sudo update-grub2
sudo reboot

P.S. if you doesn't do step6 will occur "kernel panic - not syncing : VFS : unable to mount root fs on unknown block (0,0)".

7.
When Ubuntu reboot, long press SHIFT will into GRUB menu,
Select new kernel "3.18.0-20141208", done.

2012年8月1日 星期三

Virtual Box Error: This kernel requires the following features not present on the CPU

If there is an error

This kernel requires the following features not present on the CPU :
ape


Please check the settings.


2011年10月28日 星期五

Linux 建立捷徑

ln -s /var/lib/tftpboot/ tftp_link

2011年10月20日 星期四

Linux 設置 永久 PATH

1.
#gedit /etc/profile

(如果開啟profile發現是唯獨的話要改變權限)
#sudo chmod 777 /etc/profile

2.
在profile最後一行加入
export PATH="$PATH:/opt/toolchains/xxx/usr/bin"

3.
重新登入PATH就會被加進去了。

2011年9月27日 星期二

VirtualBox 共用資料夾 share dir Linux Ubuntu 掛載

自己搜尋網路上的方法,只要幾個步驟就ok。

1. 滑鼠選擇要創建共用資料夾的virtual box OS,這邊以ubuntu11為例,按右鍵->設定值,如下圖。




2. 選擇左側的共用資料夾,右上角按新增,資料夾路徑選其他,指定一個在windows要分享到virtual box的資料夾,屬性勾自動掛載跟永久。





3. 安裝virtual box的guest additions,在主畫面上方選裝置,安裝guest additions,如下圖。



4. 選擇ok->run->輸入登入密碼,會自動安裝,裝完後記得要重新啟動ubuntu



4. 重開機後,在/media目錄下可看到virtual box已自動幫你掛載好資料夾(ex. 在windows下我取名為windowssharedir,在virtual box內會自動幫你命名為sf_windowssharedir),,但是打不開,通常有問題都是卡在這裡,解決辦法在第5步



5. 選System->Adminstration->Users and Groups,如下圖。



6. 點Mange Groups->找到群組vboxsf->點Properties。



7. 將自己的使用者打勾,如下圖。




8. 接著先登出,再登入

9. 去看/media,發現可以進入資料夾了,完成!

=========================================

或是直接下命令

sudo adduser <username> sudo
ex. #sudo adduser wayne sudo