當ELMD_12.04裝上LXDE遇到DRBL

開學了,而ELMD已經隨著ubuntu 12.04的發行,改到了12.04。

但是感覺上,ubuntu越改越累贅,unity和gnome3,在學校的老機器上,速度越來越慢。

所以這次DRBL,我就打算使用 LXDE 桌面系統。

LXDE桌面

 

1.首先,安裝ELMD_12.04,先從

http://www.linux400.tk/lifetype/index.php?op=ViewArticle&articleId=70&blogId=1

下載ELMD_12.04,然後製作成LiveUSB。

2.規劃DRBL伺服器的partitions

例如:本校的DRBL伺服器,是一台Acer 有Raid的機器,但是我不需要用Raid,所以開機時就要加上 nodmraid 的參數,而此伺服器有四個硬碟,所以我規劃成

sda1 / ext4 根目錄
sda2 swap    
sdb1 /home ext4 家目錄
sdc1 /tftpboot ext4 DRBL使用
sdd1 /clonezillaimg reiserfs clonezilla使用

3.規劃DRBL的網卡

比較簡單的方法,是一片網卡偵測結束後,關機,插上第二片網卡,等開機偵測結束,關機,插入第三片網卡,這樣子eth0 eth1 eth2就可以很清楚的知道是哪張卡。

不然,就必須知道網卡的MAC,去修改 /etc/udev/rules.d/70-persistent-net.rules ,把mac編號和eth0 1 2 配對。

4.固定IP

root權限 sudo -s

移除網卡管理員 apt-get purge network-manager-gnome network-manager-pptp-gnome

修改成固定IP /etc/network/interfaces (此為本校設定)

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address 163.16.84.111
        netmask 255.255.255.128
        gateway 163.16.84.126

auto eth1
iface eth1 inet static
        address 192.168.100.254
        netmask 255.255.255.0

auto eth2
iface eth2 inet static
        address 192.168.101.254
        netmask 255.255.255.0

5.移除/usr/local/share/applications

我製作ELMD的時候,為了避免更新過程,把特別修過的選單亂改,所以將/usr/share/applications複製了一份到/usr/local/share/applications,不過因為接下來要移除一些程式,所以還是把/usr/local/share/applications刪除好了。

rm -rf /usr/local/share/applications

6.移除更新管理員

apt-get purge update-manager

7.移除上課不需要的程式

apt-get purge cinnamon software-center gnome-terminal-data xbmc wine-gecko1.5 wine1.5 wine1.5-i386 winetricks virtualbox-4.1 jupiter dolphin calendar-indicator gir1.2-ubuntuoneui-3.0 libubuntuoneui-3.0-1 python-ubuntuone-client python-ubuntuone-control-panel python-ubuntuone-storageprotocol rhythmbox-ubuntuone ubuntuone-client ubuntuone-client-gnome ubuntuone-control-panel ubuntuone-couch ubuntuone-installer

apt-get –purge autoremove

8.安裝LXDE

apt-get update

apt-get install lxde-core lxterminal lxappearance pavucontrol

apt-get purge xterm

9.lightdm.conf相關

apt-get install numlockx

修改/etc/lightdm/lightdm.conf

[SeatDefaults]
user-session=LXDE
greeter-session=unity-greeter
allow-guest=false
greeter-hide-users=true
greeter-setup-script=/usr/bin/numlockx on

10.修改LXDE工作列按鈕,移除鎖定螢幕、關機,加入音量控制。

修改 /usr/share/lxpanel/profile/LXDE/panels/panel (profile內有3個目錄,可以把你想要的樣式目錄名稱改成LXDE)

將最後一段

Plugin {
    type = launchbar
    Config {
        Button {
            id=lxde-screenlock.desktop
        }
        Button {
            id=lxde-logout.desktop
        }
    }
}

改成

Plugin {
    type = launchbar
    Config {
        Button {
            id=pavucontrol.desktop
        }
    }
}

11.系統升級

先將選單備份

cp -a /usr/share/applications /root

系統升級

apt-get dist-upgrade

還原選單

rm -rf /usr/share/applications/*

cp -a /root/applications/* /usr/share/applications/

12.安裝DRBL

參考http://drbl.nchc.org.tw/one4all/desktop/

安裝DRBL。

 

PS1:以前使用ctrl+alt+backspace來強制關閉 X桌面環境 ,現在改用 Alt+SysRq+K 來強制關閉 X桌面。

PS2:為了學校安裝DRBL方便,我把ELMD更新到9/13,並安裝了LXDE,

下載位置: ftp://www.linux400.tk/pub/ELMD_12.04_0913.iso

md5: ftp://www.linux400.tk/pub/ELMD_12.04_0913.md5

分類: server。這篇內容的永久連結