這篇文章主要是參考
用宅紀錄生活加上版主Chester他用愛心和耐心教導小弟..XD
其實這邊文章很多人都認為安裝 Ubuntu 10.04有什麼難的?用Live CD安裝就行了
重點來了.....如果10.04正常安裝大概需要3G的容量,今天我只有2G又不曉得哪一個套件是必須的,這時侯就從基本需要安裝開始, Ubuntu8.10和10.04安裝上的差別在於一個使用 grub, 而10.04是使用 grub2, Grub2詳細介紹請看
GRUB 2 中文指南
1. 首先準備一張 CF 2G 記憶卡, 用10.04 Live CD開機
2. 格式化CF卡, 分成 /boot(64MB or 128MB) 及 /
# fdisk /dev/sda
# mkfs.ext3 -m 0 /dev/sda1
# mkfs.ext3 -m 0 /dev/sda2
3. 使用 debootstrap 下載 Ubuntu 10.04 的 filesystem
# apt-get install debootstrap
# mount /dev/sda2 /mnt
# debootstrap --arch i386 lucid /mnt (這個部份會比較久)
** lucid是10.04的版本代號, 可以查詢 /etc/apt/sources.list
4. 安裝Grub2 on /boot
# mount /dev/sda1 /mnt/boot
# grub-install --root-directory=/mnt/ /dev/sda
** 參數--root-directory代表 root 位置以及安裝grub的位置(/dev/sda 的 MBR)
這時我們需用另一台Ubuntu10.04 PC 準備下面四個檔案copy到CF卡相同路徑
/boot/vmlinuz-2.6.32-24-generic(Kernel image)
/boot/initrd.img-2.6.32-24-generic
/lib/modules/2.6.32-24-generic
/etc/apt/sources.list
# mount --bind /dev /mnt/dev
# mount --bind /usr /mnt/usr
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys
# chroot /mnt
# apt-get install grub-pc
OK
OK
-------------------------------------------
GRUB install devices:
[*] /dev/sda (??? MB, ???)
[ ] - /dev/sda1 (??? MB)
[ ] - /dev/sda2 (??? MB)
-------------------------------------------
# vi /etc/default/grub
-------------------------------------------
GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT=0
-------------------------------------------
# update-grub
# reboot
5. 先進入(recovery mode)模式,建立 root密碼及user帳號及密碼,並給user有 sudo的權限
# passwd root
# adduser username
# vi /etc/sudoers
-------------------------------------------
root ALL=(ALL) ALL
username ALL=(ALL) ALL <== add
-------------------------------------------
# reboot (進入一般模式登入)
6. 安裝網路(Network)
# vi /etc/network/passwork
-------------------------------------------
auto lo
iface lo inet loopback
auto eth0 <== add
iface eth0 inet dhcp
-------------------------------------------
# /etc/init.d/networking restart
# apt-get update
7. 編輯fstab
# vi /etc/fstab
-------------------------------------------
/dev/sda2 / ext3 relatime,errors=remount-ro 0 1 <== add
/dev/sda1 /boot ext3 relatime 0 2
-------------------------------------------
8. 安裝 X-Window
# apt-get install xserver-xorg-core xterm gnome-core gdm (648M)
# apt-get install xbase-clients (3408K)
# X -configure
# cp ~/xorg.conf.new /etc/X11/xorg.conf
# startx
9. 開機可能會出現 The panel encountered a problem while loading "OAFIID:GNOME_FastUserSwitchApplet". 問題
解決方式:
# apt-get install indicator-applet-session (149MB)
10. 一些好用工具
# apt-get install pciutils (lspci)
# apt-get install hdparm (hdparm)
# apt-get install ssh (可以直接在host端控制)
# apt-get install ubuntu-desktop (ubuntu 桌面, 超級肥)