debootstrap安裝
參考文章:
- http://goo.gl/j7cirQ
- http://www.linuxquestions.org/questions/debian-26/how-to-install-debian-using-debootstrap-4175465295/
Live CD下載:
liveCD映像檔載入並進入desktop
先安裝debootstrap
先安裝debootstrap
aptitude update
aptitude install debootstrap
磁碟分割與格式化
磁碟格式化完成之後將其掛載至新建之目錄(本範例為/jdisney)
開始使用debootstrap來安裝核心
複製系統檔案到安裝的目錄下
從host端綁定虛擬文件至client端
進入client端
安裝與配置grub所需檔案。
設定開機時要掛載的磁碟、檔案系統
※重要
必須為client端root設定密碼,否則無法登入。
cfdisk
mkfs.ext4 -L Debian /dev/sda1
mkswap /dev/sda2
mkdir /jdisney
mount -t ext4 /dev/sda1 /jdisney
開始使用debootstrap來安裝核心
debootstrap --include=linux-image-amd64,grub-pc --arch amd64 jessie /jdisney http://ftp.tw.debian.org/debian
複製系統檔案到安裝的目錄下
cp /etc/mtab /jdisney/etc/mtab
cp /etc/network/interfaces /jdisney/etc/network/interfaces
從host端綁定虛擬文件至client端
mount -o bind /dev /jdisney/dev
mount -o bind /dev/pts /jdisney/dev/pts
mount -o bind /proc /jdisney/proc
mount -o bind /sys /jdisney/sys
進入client端
chroot /jdisney
安裝與配置grub所需檔案。
cp /usr/lib/grub/i386-pc/* /boot/grub
grub-install /dev/sda
update-grub
設定開機時要掛載的磁碟、檔案系統
vim /etc/fstab
content:
/dev/sda1 / ext4 defaults 0 1
/dev/sda2 none swap sw 0 0
proc /proc proc defaults 0 0
※重要
必須為client端root設定密碼,否則無法登入。
passwd
adduser disney
------------------------------------------------------------------------------------------------------------------------------------
Q&A
磁碟分割
cfdisk
not found command : add-apt-repository 解決辦法
apt-get install software-properties-common
auto-completion - Terminal使用TAB自動完成指令
apt-get install bash-completion
修改檔案 /etc/bash.bashrc ,移除#註解
重新執行 source ~/.bashrc
VMtools install (VM 驅動安裝)
https://communities.vmware.com/thread/464033l
LANGUAGE 設定
export LANGUAGE=zh_TW.UTF-8
locales-gen zh_TW.UTF-8
dpkg-reconfigure locales
source.list 自動生成
http://debgen.simplylinux.ch/
設定時區
sudo dpkg-reconfigure
aptitude install ntpdate
sudo ntpdate ntp.stu.edu.tw
cfdisk
not found command : add-apt-repository 解決辦法
apt-get install software-properties-common
auto-completion - Terminal使用TAB自動完成指令
apt-get install bash-completion
修改檔案 /etc/bash.bashrc ,移除#註解
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
重新執行 source ~/.bashrc
VMtools install (VM 驅動安裝)
https://communities.vmware.com/thread/464033l
LANGUAGE 設定
export LANGUAGE=zh_TW.UTF-8
locales-gen zh_TW.UTF-8
dpkg-reconfigure locales
source.list 自動生成
http://debgen.simplylinux.ch/
設定時區
sudo dpkg-reconfigure
aptitude install ntpdate
sudo ntpdate ntp.stu.edu.tw
沒有留言 :
張貼留言