使用Debootstrap 建立 Linux Mint debian [論壇 - LinuxMint]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



使用Debootstrap 建立 Linux Mint debian
會員四級
註冊日期:
2015/9/29 21:19
所屬群組:
已註冊使用者
等級: 16
HP : 0 / 380
MP : 100 / 4491
EXP: 22
離線
可以使用任何一版有APT套件管理的LiveCD來安裝 Linux Mint debian

範例: SID + XFCE

安裝 debootstrap
$ sudo apt-get install debootstrap

格式化分割區
範例:sda4
$ sudo su
# mkfs.ext4 /dev/sda4 # ext4 格式化工具
# mkfs.ext4 -F /dev/sda4 # 強制格式化
# mkswap /dev/sdax # swap 格式化工具
貼上標籤
# e2label /dev/sda4 DEBS

掛載安裝目標分割區到/mnt
範例:sda4
# mount /dev/sda4 /mnt

建立Debian基本系統
debootstrap --arch [ARCH] [版本] [掛載目錄] [套件庫來源]

安裝64-bit版本
# debootstrap --arch amd64 sid /mnt http://debian.linux.org.tw/debian

安裝32-bit版本
# debootstrap --arch i386 sid /mnt http://debian.linux.org.tw/debian

配置新系統sources
# sed -i 's/main/main contrib non-free/g' /mnt/etc/apt/sources.list
# sed -i '$a deb http://ftp.us.debian.org/debian/ sid main contrib non-free' /mnt/etc/apt/sources.list
# sed -i '$a deb http://www.deb-multimedia.org sid main non-free' /mnt/etc/apt/sources.list

若有獨立的/boot分割區
# mount /dev/sdax /mnt/boot

安裝genfstab
# wget https://projects.archlinux.org/arch-install-scripts.git/snapshot/arch-install-scripts-15.tar.gz
# tar -zxvf arch-install-scripts-15.tar.gz
# cd arch-install-scripts-15
# make
# cp genfstab /usr/bin
# cd ../

建立fstab
# genfstab -U /mnt > /mnt/etc/fstab

複製genfstab到新系統
# cp /usr/bin/genfstab /mnt/usr/bin/

掛載虛擬檔案系統
# mount --bind /dev /mnt/dev
# mount --bind /dev/pts /mnt/dev/pts
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys

切換到新系統
# chroot /mnt

更新 sources.lst
# apt-get update

關閉自動安裝推薦套件
$ sudo leafpad /mnt/etc/apt/apt.conf
----內容-------------------------------------------
# Install-Recommends Configuration
# Enable:true or 1 Disable:false or 0 Default: true
APT::Install-Recommends "0";
# Install-Suggests Configuration
# Enable:true or 1 Disable:false or 0 Default:false
APT::Install-Suggests "0";
---------------------------------------------------


安裝 Linux 核心
通用核心
# apt-get install linux-image-amd64
# apt-get install linux-headers-amd64
RT核心
# apt-get install linux-image-rt-amd64
# apt-get install linux-headers-rt-amd64

# apt-get install firmware-linux
# apt-get install firmware-realtek # realtek 網路卡

安裝 Grub Boot loader
BIOS
# apt-get install grub2 os-prober
# grub-install --recheck /dev/sda # BIOS/MBR
# grub-install --force /dev/sda # BIOS/GPT

UEFI
# apt-get install grub2 efibootmgr os-prober
# mkdir /boot/EFI
# mount /dev/sda1 /boot/EFI
# grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=debian --recheck

建立開機選單
# grub-mkconfig -o /boot/grub/grub.cfg

# update-grub


設定主機名稱
範例: localhosts
# echo localhosts > /etc/hostname

設定系統時間
# dpkg-reconfigure tzdata

# ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime

設定系統顯示時間為localtime(BIOS顯示時間)
# hwclock --systohc --localtime

設定 root 密碼
# passwd

建立使用者帳號與密碼
範例: 帳號名稱: mint
# apt-get install sudo
# useradd -m -g users -s /bin/bash mint
設定密碼
# passwd mint
加入群組
# gpasswd -a mint sudo
# gpasswd -a mint users

sudo免密碼(可選)
# sed -i -e '/%sudo/s/ALL=(ALL:ALL) ALL/ALL=(ALL) NOPASSWD:ALL/' /etc/sudoers

驅動安裝
# apt-get install xorg #顯示/輸入
# apt-get install alsa-utils # 音效卡驅動
# apt-get install ntfs-3g # NTFS File System Support
# apt-get install gvfs # Partition Mount Tools
# apt-get install pcscd pcsc-tools # 晶片讀卡機驅動(可選)

其他工具
# apt-get install pciutils # lspci
# apt-get install xbacklight # 亮度調整工具
# apt-get install squashfs-tools # squashfs
# apt-get install wget git subversion # Net Utility
# apt-get install bash-completion
# apt-get install zenity
# apt-get install deb-multimedia-keyring # deb-multimedia 公鑰
# apt-get install genisoimage xorriso # xorriso -as mkisofs
# ln -s /usr/bin/genisoimage /usr/bin/mkisofs

# apt-get install xz-utils lzma arj lhasa lzip lzop ncompress rpm2cpio rzip sharutils unace unalz unzip zip zoo p7zip-rar

NetworkManager 面板程式(GTK)
# apt-get install network-manager network-manager-pptp network-manager-openvpn
Gnome GUI
# apt-get install network-manager-gnome network-manager-pptp-gnome network-manager-openvpn-gnome
# apt-get install network-manager-openconnect-gnome network-manager-vpnc-gnome

如apt-get無法連接下載
# sed -i '$a nameserver 127.0.1.1' /run/NetworkManager/resolv.conf

# sed -i '$a nameserver 192.168.1.1' /mnt/etc/resolv.conf

安裝XFCE4桌面
不安裝Debian推薦佈景主題.
安裝XFCE基本套件
# apt-get install xdg-user-dirs xdg-user-dirs-gtk
# apt-get install xfce4-appfinder xfce4-panel xfce4-session xfce4-settings xfconf xfdesktop4 xfwm4 xfce4-dict xfce4-notifyd xfce4-taskmanager xfce4-terminal xfce4-power-manager xfce4-screenshooter libxfce4ui-utils

# apt-get install xfce4-places-plugin xfce4-datetime-plugin xfce4-weather-plugin xfce4-xkb-plugin xfce4-cpufreq-plugin xfce4-mailwatch-plugin xfce4-quicklauncher-plugin xfce4-screenshooter-plugin xfce4-systemload-plugin xfce4-timer-plugin xfce4-verve-plugin xfce4-whiskermenu-plugin xfce4-indicator-plugin

# apt-get install tumbler tumbler-common tumbler-plugins-extra

# apt-get install thunar thunar-media-tags-plugin

thunar-archive-plugin 包含 xarchiver
使用 xarchiver
# apt-get install thunar-archive-plugin
使用 file-roller
# apt-get install file-roller thunar-archive-plugin

佈景主題GTK2引擎
# apt-get install libgtk2.0-bin
# apt-get install gtk2-engines-murrine gtk2-engines-pixbuf

安裝plymouth主題(開機畫面)
# apt-get install plymouth plymouth-themes
# cd /tmp
# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-logo-aqua_1.0debian_all.deb
# dpkg -i mint-logo-aqua_1.0debian_all.deb

Pulse Audio Mixer
# apt-get install pulseaudio pavucontrol

面板音量控制圖示
# cd /tmp
# wget https://github.com/Mint-Fans/debian-package/raw/debian/pa-applet_17.33-1_amd64.deb
# dpkg -i pa-applet_17.33-1_amd64.deb

音量提示
# wget https://github.com/Mint-Fans/debian-package/raw/debian/xfce4-volumed-pulse_0.2.0-0debian_amd64.deb
# dpkg -i xfce4-volumed-pulse_0.2.0-0debian_amd64.deb
# apt-get -f install

藍芽管理-GTK
# apt-get install blueman

滑鼠游標主題
預設為 adwaita 游標主題
dmz (ubuntu 預設) 可選
# apt-get install dmz-cursor-theme

其他
# apt-get install firefox firefox-l10n-zh-tw
# apt-get install flashplugin-nonfree # Adobe Flash Player
# apt-get install leafpad (簡易文字編輯器)
# apt-get install gparted (磁碟管理工具)
# apt-get install vlc # VLC 播放器
# apt-get install parole # XFCE 播放器 (可選)
# apt-get install simple-scan (簡易掃描)
# apt-get install system-config-printer (列印)
# apt-get install gucharmap (字元對應表)
# apt-get install gnome-calculator (計算機)
# apt-get install pidgin (即時通)
# apt-get install icedove (mail)
# apt-get install transmission-gtk (BT續傳)
# apt-get install evince (文件檢視器)
# apt-get install gnome-font-viewer (字型檢視器)
# apt-get install banshee (音樂播放器)
# apt-get install ristretto (圖片檢視器)
# apt-get install gthumb 或 gimp (簡易圖形瀏覽編輯)
# apt-get install brasero (燒錄工具)
# apt-get install gdebi (套件安裝程式)

Debian catfish 版本較舊, 且無法搜尋, 可安裝ubuntu的版本.
# wget http://mirrors.kernel.org/ubuntu/pool/universe/c/catfish/catfish_1.4.2-0ubuntu1_all.deb
# dpkg -i catfish_*.deb
# apt-get -f install

Intel GPU VLC VDPAU Bug
# apt-get --purge remove libvdpau-va-gl1 #

=============================================
設定語言
=============================================
# apt-get install locales
# sed -i '$a zh_TW.UTF-8 UTF-8' /etc/locale.gen
# sed -i '$a zh_TW BIG5' /etc/locale.gen
# locale-gen zh_TW.UTF-8
# echo LANG=zh_TW.UTF-8 > /etc/default/locale
# sed -i '$a LANGUAGE=zh_TW:zh' /etc/default/locale
# sed -i '$a LC_NUMERIC=zh_TW.UTF-8' /etc/default/locale

=============================================
Debian + Xfce4 界面到此安裝完成.
如不升級Mint界面可以裝其他顯示管理器與主題.
=============================================

#############################################
升級 Linux Mint 桌面
#############################################
解決依賴問題預先安裝
# apt-get install libglib2.0-bin # schemas 工具
# apt-get install lsb-release # mintsources 依賴

添加 Linux Mint sarah sources
# cd /tmp
# wget http://packages.linuxmint.com/pool/main/l/linuxmint-keyring/linuxmint-keyring_2009.04.29_all.deb
# dpkg -i linuxmint-keyring_2009.04.29_all.deb
# rm /var/lib/apt/lists/*
# rm /etc/apt/sources.list.d/official-package-repositories.list
# mv /etc/apt/sources.list /etc/apt/sources.list.d/official-package-repositories.list
# touch /etc/apt/sources.list
# sh -c 'echo "deb http://packages.linuxmint.com/ sarah main upstream import backport romeo" >> /etc/apt/sources.list.d/official-package-repositories.list'
# apt-get update

Betsy版本的套件沒修正也沒更新,版本比較舊.
因考慮相容度問題, 除了mdm使用Betsy版本以外, 大部分的東西使用Sarah版本的套件.

Mint系統套件
LMDE betsy 沒出xfce版, 所以部份套件參考Sarah套件修改打包.
firefox for Linux Mint 首頁與搜尋引擎修復, 預設Google搜尋引擎.
精簡化系統設定, 去除不需要的 Mate & cinnamon & gnome 系統設定, 只留xfce項目.
以下依照順序安裝以解決依賴問題
# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-info-debian-xfce_1.0_amd64.deb
# dpkg -i mint-info-debian-xfce_1.0_amd64.deb

# wget http://packages.linuxmint.com/pool/main/m/mint-user-guide/mint-user-guide-xfce_17.1.0_all.deb
# dpkg -i mint-user-guide-xfce_*.deb
# apt-get -f install

# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-artwork-debian-xfce_1.0_all.deb
# dpkg -i mint-artwork-debian-xfce_1.0_all.deb

# wget https://github.com/Mint-Fans/linux-package/raw/debian/debian-system-adjustments_1.0_all.deb
# dpkg -i debian-system-adjustments_1.0_all.deb

# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-firefox-adjustments.tar.gz
# tar -zxvf mint-firefox-adjustments.tar.gz
# ./mint-firefox-adjustments

# apt-get install mintsystem

# apt-get install grub2-theme-mint

Mint Mate 應用程式(可選)
# apt-get install xviewer # Mint 圖片檢視器
# apt-get install xed # Mint 文字編輯器

安裝 Mint-X 主題
# apt-get install mint-themes

安裝 MDM 顯示管理器
# wget http://packages.linuxmint.com/pool/upstream/m/mdm/mdm_2.0.7+betsy_amd64.deb
# dpkg -i mdm_*.deb
# apt-get -f install
mdm 背景修復
# wget https://github.com/Mint-Fans/linux-package/raw/ubuntu/mdm-fix.tar.gz
# tar -zxvf mdm-fix.tar.gz
# ./mdm-fix

安裝Mint字形
# apt-get install ttf-dejavu ttf-dejavu-extra ttf-wqy-microhei fonts-noto fonts-droid-fallback fonts-liberation

Mint 應用程式依賴安裝
# apt-get install python-apt python-dbus

Mint 應用程式(可選)
# apt-get install mintdesktop # 桌面設定
# apt-get install mintbackup # 備份工具
# apt-get install mintinstall # 軟體管理員
# apt-get install mintlocale # 語言設定/輸入法
# apt-get install mintnanny # 網域封鎖器
# apt-get install mintupdate # 更新管理員
# apt-get install mintsources mint-mirrors # 軟體來源
# apt-get install mintupload # 上傳管理員
# apt-get install mintwelcome # 歡迎畫面
# apt-get install mintstick # USB格式化與映像檔寫入工具

無法滿足依賴應用程式修復版
歡迎畫面
# wget https://github.com/Mint-Fans/linux-package/raw/debian/mintwelcome_2.1.8_all.deb
# dpkg -i mintwelcome_2.1.8_all.deb

/////// 暫時作法 /////////////////////////////
Mint應用程式修復
備份工具修復
需要舊版python-apt的gtk2.py
python-apt
# wget http://ftp.us.debian.org/debian/pool/main/p/python-apt/python-apt_0.9.3.12_amd64.deb
or
# wget http://ftp.us.debian.org/debian/pool/main/p/python-apt/python-apt_0.9.3.12_i386.deb
# dpkg -X python-apt_0.9.3.12_*.deb python-apt
# cp python-apt/usr/lib/python2.7/dist-packages/apt/progress/gtk2.py /usr/lib/python2.7/dist-packages/apt/progress/

軟體來源修復
# sed -i 's/LMDE 2 "Betsy"/Linux Mint Debian Edition/g' /usr/share/mintsources/betsy/mintsources.conf
# sed -i 's/base_codename=jessie/base_codename=sid/g' /usr/share/mintsources/betsy/mintsources.conf
# sed -i 's/codename=betsy/codename=sarah/g' /usr/share/mintsources/betsy/mintsources.conf
# sed -i 's/python-apt\/templates\/LinuxMint.mirrors/mint-mirrors\/linuxmint.list/g' /usr/share/mintsources/betsy/mintsources.conf
sid+sarah暫時作法
# sed -i '8,$d' /usr/share/mintsources/betsy/official-package-repositories.list
# sed -i '4,6d' /usr/share/mintsources/betsy/official-package-repositories.list
# sed -i '8,$d' /usr/share/mintsources/betsy/official-source-repositories.list
# sed -i '4,6d' /usr/share/mintsources/betsy/official-source-repositories.list
# sed -i 's/import /import backport /g' /usr/share/mintsources/betsy/official-package-repositories.list
# sed -i 's/import /import backport /g' /usr/share/mintsources/betsy/official-source-repositories.list

網域封鎖器修復
# sed -i 's/if domain.startswith/# if domain.startswith/g' /usr/lib/linuxmint/mintnanny/mintnanny.py
# sed -i 's/domain = domain/# domain = domain/g' /usr/lib/linuxmint/mintnanny/mintnanny.py
# sed -i 's/if len(domain.split/# if len(domain.split/g' /usr/lib/linuxmint/mintnanny/mintnanny.py
# sed -i 's/prefixes.append/# prefixes.append/g' /usr/lib/linuxmint/mintnanny/mintnanny.py

////////////////////////////////////////////

Mint應用程式鑰匙圈密碼解除
# sed -i 's/Exec=mintnanny/Exec=sudo mintnanny/g' /usr/share/applications/mintNanny.desktop
# sed -i 's/Exec=mintbackup/Exec=sudo mintbackup/g' /usr/share/applications/mintBackup.desktop
# sed -i 's/Exec=software-sources/Exec=sudo software-sources/g' /usr/share/applications/mintsources.desktop
# sed -i 's/Exec=gksu mintinstall/Exec=sudo mintinstall/g' /usr/share/applications/mintinstall.desktop
# sed -i 's/Exec=gksu/Exec=sudo/g' /usr/share/mdm/applications/mdmsetup.desktop

Mint 桌布 (可選)
# apt-get install mint-backgrounds-rosa
# apt-get install mint-backgrounds-retro
# apt-get install mint-backgrounds-rebecca
# apt-get install mint-backgrounds-rafaela
# apt-get install mint-backgrounds-qiana
# apt-get install mint-backgrounds-petra
# apt-get install mint-backgrounds-olivia
# apt-get install mint-backgrounds-nadia
# apt-get install mint-backgrounds-maya

Mint 開發工具 (可選)
# apt-get install mint-dev-tools

解碼器
新版
# apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-libav
舊版
# apt-get install gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg

DVD Utility
# apt-get install libdvdnav4 libdvdread4
# apt-get install libdvdcss2

xplayer 播放器「Totem 3.10 復刻版」 (可選)
# apt-get install xplayer xplayer-mozilla xplayer-plugins

Live CD 工具 (可選)
# apt-get install syslinux syslinux-legacy
# apt-get install syslinux-themes-linuxmint-mate

#############################################

# apt-get autoremove
# apt-get autoclean
# apt-get clean all

退出
# exit

卸載虛擬檔案系統
# umount /mnt/dev/pts
# umount /mnt/dev
# umount /mnt/proc
# umount /mnt/sys

若有掛載獨立的 /boot 分割區
# umount /mnt/boot
卸載最後裝置
# umount -l /mnt
# exit

重新啟動


=============================================
系統設定
=============================================
XFCE Thunar Actions Utility (黃金右鍵腳本)
$ wget https://github.com/Mint-Fans/linux-package/raw/debian/xfce-utility.tar.gz
$ tar -zxvf xfce-utility.tar.gz
$ sudo ./xfce-utility

XFCE 終端機提示字元色彩
$ wget https://github.com/Mint-Fans/linux-package/raw/debian/xfce-terminal-color.tar.gz
$ tar -zxvf xfce-terminal-color.tar.gz
$ sudo ./terminal-color

應用程式鑰匙圈密碼解除
$ sudo sed -i -e '/allow_active/s/auth_admin/yes/' /usr/share/polkit-1/actions/com.ubuntu.pkexec.gparted.policy
$ sudo sed -i -e '/allow_active/s/auth_admin/yes/' /usr/share/polkit-1/actions/org.xfce.thunar.policy
$ sudo sed -i -e '/allow_active/s/auth_admin/yes/' /usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy
$ sudo sed -i -e '/allow_active/s/auth_admin_keep/yes/' /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy
$ sudo sed -i -e '/allow_active/s/auth_admin/yes/' /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

----------------------
移除Mint更新程式開機自動啟動
$ sudo rm /etc/xdg/autostart/mintupdate.desktop

應用程式啟動器隱藏/顯示設定
$ sudo sed -i '$a NoDisplay=true' /usr/share/applications/fcitx.desktop
$ sudo sed -i '$a NoDisplay=true' /usr/share/applications/fcitx-configtool.desktop

Mint deb icon 修復
$ sudo su
# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-x-icons-fix
# chmod 755 ./mint-x-icons-fix
# ./mint-x-icons-fix

更新應用程式關聯設定
# update-mime-database /usr/share/mime/
# update-desktop-database /usr/share/applications/

更新 schemas
# glib-compile-schemas /usr/share/glib-2.0/schemas


設定螢幕亮度與伽瑪
$ sudo leafpad /usr/bin/display-setup
====內容==============
#!/bin/bash

xbacklight -set 80
xgamma -gamma 0.7
======================
$ sudo chmod 755 /usr/bin/display-setup

$ sudo leafpad /etc/xdg/autostart/display-setup.desktop
[Desktop Entry]
Type=Application
Name=Display Setup
Comment=Launch Display Setup
Icon=preferences-desktop-screensaver
Exec=display-setup

2016/2/25 21:30
應用擴展 工具箱
回覆: 使用Debootstrap 建立 Linux Mint debian
會員四級
註冊日期:
2015/9/29 21:19
所屬群組:
已註冊使用者
等級: 16
HP : 0 / 380
MP : 100 / 4491
EXP: 22
離線
可以使用任何一版有APT套件管理的LiveCD來安裝 Linux Mint debian

範例: SID + Mate

安裝 debootstrap
$ sudo apt-get install debootstrap

格式化分割區
範例:sda4
$ sudo su
# mkfs.ext4 /dev/sda4 # ext4 格式化工具
# mkfs.ext4 -F /dev/sda4 # 強制格式化
# mkswap /dev/sdax # swap 格式化工具
貼上標籤
# e2label /dev/sda4 DEBS

掛載安裝目標分割區到/mnt
範例:sda4
# mount /dev/sda4 /mnt

建立Debian基本系統
debootstrap --arch [ARCH] [版本] [掛載目錄] [套件庫來源]

安裝64-bit版本
# debootstrap --arch amd64 sid /mnt http://debian.linux.org.tw/debian

安裝32-bit版本
# debootstrap --arch i386 sid /mnt http://debian.linux.org.tw/debian

配置新系統sources
# sed -i 's/main/main contrib non-free/g' /mnt/etc/apt/sources.list
# sed -i '$a deb http://ftp.us.debian.org/debian/ sid main contrib non-free' /mnt/etc/apt/sources.list
# sed -i '$a deb http://www.deb-multimedia.org sid main non-free' /mnt/etc/apt/sources.list

若有獨立的/boot分割區
# mount /dev/sdax /mnt/boot

安裝genfstab
# wget https://projects.archlinux.org/arch-install-scripts.git/snapshot/arch-install-scripts-15.tar.gz
# tar -zxvf arch-install-scripts-15.tar.gz
# cd arch-install-scripts-15
# make
# cp genfstab /usr/bin
# cd ../

建立fstab
# genfstab -U /mnt > /mnt/etc/fstab

複製genfstab到新系統
# cp /usr/bin/genfstab /mnt/usr/bin/

掛載虛擬檔案系統
# mount --bind /dev /mnt/dev
# mount --bind /dev/pts /mnt/dev/pts
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys

切換到新系統
# chroot /mnt

更新 sources.lst
# apt-get update

關閉自動安裝推薦套件
$ sudo leafpad /mnt/etc/apt/apt.conf
----內容-------------------------------------------
# Install-Recommends Configuration
# Enable:true or 1 Disable:false or 0 Default: true
APT::Install-Recommends "0";
# Install-Suggests Configuration
# Enable:true or 1 Disable:false or 0 Default:false
APT::Install-Suggests "0";
---------------------------------------------------

安裝 Linux 核心
通用核心
# apt-get install linux-image-amd64
# apt-get install linux-headers-amd64
RT核心
# apt-get install linux-image-rt-amd64
# apt-get install linux-headers-rt-amd64

# apt-get install firmware-linux
# apt-get install firmware-realtek # realtek 網路卡 (可選)

安裝 Grub Boot loader
BIOS
# apt-get install grub2 os-prober
# grub-install --recheck /dev/sda # BIOS/MBR
# grub-install --force /dev/sda # BIOS/GPT

UEFI
# apt-get install grub2 efibootmgr os-prober
# mkdir /boot/EFI
# mount /dev/sda1 /boot/EFI
# grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=debian --recheck

建立開機選單
# grub-mkconfig -o /boot/grub/grub.cfg

# update-grub


設定主機名稱
範例: localhosts
# echo localhosts > /etc/hostname

設定系統時間
# dpkg-reconfigure tzdata

# ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime

設定系統顯示時間為localtime(BIOS顯示時間)
# hwclock --systohc --localtime

設定 root 密碼
# passwd

建立使用者帳號與密碼
範例: 帳號名稱: mint
# apt-get install sudo
# useradd -m -g users -s /bin/bash mint
設定密碼
# passwd mint
加入群組
# gpasswd -a mint sudo
# gpasswd -a mint users

sudo免密碼(可選)
# sed -i -e '/%sudo/s/ALL=(ALL:ALL) ALL/ALL=(ALL) NOPASSWD:ALL/' /etc/sudoers

驅動安裝
# apt-get install xorg #顯示/輸入
# apt-get install alsa-utils # 音效卡驅動
# apt-get install ntfs-3g # NTFS File System Support
# apt-get install gvfs # Partition Mount Tools
# apt-get install pcscd pcsc-tools # 晶片讀卡機驅動(可選)

其他工具
# apt-get install pciutils # lspci
# apt-get install xbacklight # 亮度調整工具
# apt-get install squashfs-tools # squashfs
# apt-get install wget git subversion # Net Utility
# apt-get install bash-completion
# apt-get install zenity
# apt-get install deb-multimedia-keyring # deb-multimedia 公鑰
# apt-get install genisoimage xorriso # xorriso -as mkisofs
# ln -s /usr/bin/genisoimage /usr/bin/mkisofs

# apt-get install arj lhasa lzip lzop ncompress rpm2cpio rzip sharutils unace unalz unzip zip zoo p7zip-rar

NetworkManager 面板程式(GTK)
# apt-get install network-manager network-manager-pptp network-manager-openvpn
Gnome GUI
# apt-get install network-manager-gnome network-manager-pptp-gnome network-manager-openvpn-gnome
# apt-get install network-manager-openconnect-gnome network-manager-vpnc-gnome

如apt-get無法連接下載
# sed -i '$a nameserver 127.0.1.1' /run/NetworkManager/resolv.conf

# sed -i '$a nameserver 192.168.1.1' /mnt/etc/resolv.conf

安裝MATE桌面
# apt-get install xdg-user-dirs xdg-user-dirs-gtk
# apt-get install mate-control-center mate-desktop mate-menus mate-panel mate-polkit mate-session-manager mate-settings-daemon
# apt-get install mate-applets mate-media mate-notification-daemon mate-power-manager mate-screensaver mate-system-monitor mate-utils
# apt-get install mate-netspeed mate-sensors-applet
# apt-get install mate-common mate-indicator-applet python-mate-menu gnome-system-tools gcalctool

Mate 預設應用 (可選)
# apt-get install caja # Mate 預設檔案管理員
# apt-get install pluma # Mate 預設文字編輯器
# apt-get install engrampa # Mate 預設壓縮工具
# apt-get install eom # Mate 預設圖片檢視器
# apt-get install atril # Mate 預設文件檢視器
# apt-get install mate-terminal # Mate 預設終端機
# apt-get install marco # Mate 預設視窗管理員
# apt-get install mozo # Mate 預設選單編輯器

# apt-get install caja-actions # Mate Caja 右鍵動作功能

佈景主題GTK2主題引擎
# apt-get install gtk2-engines-murrine gtk2-engines-pixbuf

安裝plymouth主題(開機畫面)
# apt-get install plymouth plymouth-themes
# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-logo-maya_1.0debian_all.deb
# dpkg -i mint-logo-maya_1.0debian_all.deb

Pulse Audio
# apt-get install pulseaudio

其他
# apt-get install firefox firefox-l10n-zh-tw
# apt-get install flashplugin-nonfree # Adobe Flash Player
# apt-get install leafpad (簡易文字編輯器)
# apt-get install gparted (磁碟管理工具)
# apt-get install vlc # VLC 播放器
# apt-get install simple-scan (簡易掃描)
# apt-get install system-config-printer (列印)
# apt-get install gucharmap (字元對應表)
# apt-get install gnome-calculator (計算機)
# apt-get install pidgin (即時通)
# apt-get install icedove (mail)
# apt-get install transmission-gtk (BT續傳)
# apt-get install gnome-font-viewer (字型檢視器)
# apt-get install banshee (音樂播放器)
# apt-get install gthumb 或 gimp (簡易圖形瀏覽編輯)
# apt-get install brasero (燒錄工具)
# apt-get install gdebi (套件安裝程式)

Debian catfish 版本較舊, 且無法搜尋, 可安裝ubuntu的版本.
# wget http://mirrors.kernel.org/ubuntu/pool/universe/c/catfish/catfish_1.4.2-0ubuntu1_all.deb
# dpkg -i catfish_*.deb
# apt-get -f install

Intel GPU VLC VDPAU Bug
# apt-get --purge remove libvdpau-va-gl1 #

=============================================
設定語言
=============================================
# apt-get install locales
# sed -i '$a zh_TW.UTF-8 UTF-8' /etc/locale.gen
# sed -i '$a zh_TW BIG5' /etc/locale.gen
# locale-gen zh_TW.UTF-8
# echo LANG=zh_TW.UTF-8 > /etc/default/locale
# sed -i '$a LANGUAGE=zh_TW:zh' /etc/default/locale
# sed -i '$a LC_NUMERIC=zh_TW.UTF-8' /etc/default/locale

=============================================
Debian + MATE 桌面到此安裝完成.
如不升級Mint桌面可以裝其他顯示管理器與主題.
=============================================

#############################################
升級 Linux Mint 桌面
#############################################
解決依賴問題預先安裝
# apt-get install libglib2.0-bin # schemas 工具
# apt-get install lsb-release # mintsources 依賴

添加 Linux Mint sarah sources
# cd /tmp
# wget http://packages.linuxmint.com/pool/main/l/linuxmint-keyring/linuxmint-keyring_2009.04.29_all.deb
# dpkg -i linuxmint-keyring_2009.04.29_all.deb
# rm /var/lib/apt/lists/*
# rm /etc/apt/sources.list.d/official-package-repositories.list
# mv /etc/apt/sources.list /etc/apt/sources.list.d/official-package-repositories.list
# touch /etc/apt/sources.list
# sh -c 'echo "deb http://packages.linuxmint.com/ sarah main upstream import backport romeo" >> /etc/apt/sources.list.d/official-package-repositories.list'
# apt-get update

Betsy版本的套件沒修正也沒更新,版本比較舊.
因考慮相容度問題, 除了mdm使用Betsy版本以外, 大部分的東西使用Sarah版本的套件.

Mint系統套件
# apt-get install mint-user-guide-mate

# wget http://packages.linuxmint.com/pool/main/m/mint-info-debian/mint-info-debian-mate_2015.03.19_amd64.deb
# dpkg -i mint-info-debian-mate_*.deb

# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-artwork-debian_2015.12.14_all.deb
# dpkg -i mint-artwork-debian_*.deb

# apt-get install mint-artwork-mate

# wget http://packages.linuxmint.com/pool/main/d/debian-system-adjustments/debian-system-adjustments_2015.11.09_all.deb
# dpkg -i debian-system-adjustments_*.deb

# https://github.com/Mint-Fans/linux-package/raw/debian/mint-firefox-adjustments.tar.gz
# tar -zxvf mint-firefox-adjustments.tar.gz
# ./mint-firefox-adjustments

# apt-get install mintsystem
# apt-get install grub2-theme-mint

# wget http://packages.linuxmint.com/pool/main/m/mint-backgrounds-debian/mint-backgrounds-debian_1.2_all.deb
# dpkg -i mint-backgrounds-debian_*.deb

# apt-get install mintmenu # Linux Mint Mate 應用程式選單
# apt-get install caja-folder-color-switcher gir1.2-mate-menu # Mint資料夾顏色 (可選)

Mint Mate 應用程式(可選)
# apt-get install xviewer # Mint 圖片檢視器
# apt-get install xed # Mint 文字編輯器

安裝 Mint-X 主題
# apt-get install mint-themes

安裝 MDM 顯示管理器
# wget http://packages.linuxmint.com/pool/upstream/m/mdm/mdm_2.0.7+betsy_amd64.deb
# dpkg -i mdm_*.deb
# apt-get -f install
mdm 背景修復
# wget https://github.com/Mint-Fans/linux-package/raw/ubuntu/mdm-fix.tar.gz
# tar -zxvf mdm-fix.tar.gz
# ./mdm-fix

安裝Mint字形
# apt-get install ttf-dejavu ttf-dejavu-extra ttf-wqy-microhei fonts-noto fonts-droid-fallback fonts-liberation

Mint 應用程式依賴安裝
# apt-get install python-apt python-dbus

Mint 應用程式(可選)
# apt-get install mintdesktop # 桌面設定
# apt-get install mintbackup # 備份工具
# apt-get install mintinstall # 軟體管理員
# apt-get install mintlocale # 語言設定/輸入法
# apt-get install mintnanny # 網域封鎖器
# apt-get install mintupdate # 更新管理員
# apt-get install mintsources mint-mirrors # 軟體來源
# apt-get install mintupload # 上傳管理員
# apt-get install mintwelcome # 歡迎畫面
# apt-get install mintstick # USB格式化與映像檔寫入工具

無法滿足依賴應用程式修復版
歡迎畫面
# wget https://github.com/Mint-Fans/linux-package/raw/debian/mintwelcome_2.1.8_all.deb
# dpkg -i mintwelcome_2.1.8_all.deb

/////// 暫時作法 /////////////////////////////
Mint應用程式修復
備份工具修復
需要舊版python-apt的gtk2.py
python-apt
# wget http://ftp.us.debian.org/debian/pool/main/p/python-apt/python-apt_0.9.3.12_amd64.deb
or
# wget http://ftp.us.debian.org/debian/pool/main/p/python-apt/python-apt_0.9.3.12_i386.deb
# dpkg -X python-apt_0.9.3.12_*.deb python-apt
# cp python-apt/usr/lib/python2.7/dist-packages/apt/progress/gtk2.py /usr/lib/python2.7/dist-packages/apt/progress/

軟體來源修復
# sed -i 's/LMDE 2 "Betsy"/Linux Mint Debian Edition/g' /usr/share/mintsources/betsy/mintsources.conf
# sed -i 's/base_codename=jessie/base_codename=sid/g' /usr/share/mintsources/betsy/mintsources.conf
# sed -i 's/codename=betsy/codename=sarah/g' /usr/share/mintsources/betsy/mintsources.conf
# sed -i 's/python-apt\/templates\/LinuxMint.mirrors/mint-mirrors\/linuxmint.list/g' /usr/share/mintsources/betsy/mintsources.conf
sid+sarah暫時作法
# sed -i '8,$d' /usr/share/mintsources/betsy/official-package-repositories.list
# sed -i '4,6d' /usr/share/mintsources/betsy/official-package-repositories.list
# sed -i '8,$d' /usr/share/mintsources/betsy/official-source-repositories.list
# sed -i '4,6d' /usr/share/mintsources/betsy/official-source-repositories.list
# sed -i 's/import /import backport /g' /usr/share/mintsources/betsy/official-package-repositories.list
# sed -i 's/import /import backport /g' /usr/share/mintsources/betsy/official-source-repositories.list

網域封鎖器修復
# sed -i 's/if domain.startswith/# if domain.startswith/g' /usr/lib/linuxmint/mintnanny/mintnanny.py
# sed -i 's/domain = domain/# domain = domain/g' /usr/lib/linuxmint/mintnanny/mintnanny.py
# sed -i 's/if len(domain.split/# if len(domain.split/g' /usr/lib/linuxmint/mintnanny/mintnanny.py
# sed -i 's/prefixes.append/# prefixes.append/g' /usr/lib/linuxmint/mintnanny/mintnanny.py

////////////////////////////////////////////

Mint應用程式鑰匙圈密碼解除
# sed -i 's/Exec=mintnanny/Exec=sudo mintnanny/g' /usr/share/applications/mintNanny.desktop
# sed -i 's/Exec=mintbackup/Exec=sudo mintbackup/g' /usr/share/applications/mintBackup.desktop
# sed -i 's/Exec=software-sources/Exec=sudo software-sources/g' /usr/share/applications/mintsources.desktop
# sed -i 's/Exec=gksu mintinstall/Exec=sudo mintinstall/g' /usr/share/applications/mintinstall.desktop
# sed -i 's/Exec=gksu/Exec=sudo/g' /usr/share/mdm/applications/mdmsetup.desktop

Mint 桌布 (可選)
# apt-get install mint-backgrounds-rosa
# apt-get install mint-backgrounds-retro
# apt-get install mint-backgrounds-rebecca
# apt-get install mint-backgrounds-rafaela
# apt-get install mint-backgrounds-qiana
# apt-get install mint-backgrounds-petra
# apt-get install mint-backgrounds-olivia
# apt-get install mint-backgrounds-nadia
# apt-get install mint-backgrounds-maya

Mint 開發工具 (可選)
# apt-get install mint-dev-tools

解碼器
新版
# apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly streamer1.0-libav
舊版
# apt-get install gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg

DVD Utility
# apt-get install libdvdnav4 libdvdread4
# apt-get install libdvdcss2

xplayer 播放器「Totem 3.10 復刻版」 (可選)
# apt-get install xplayer xplayer-mozilla xplayer-plugins

Live CD 工具 (可選)
# apt-get install syslinux syslinux-legacy
# apt-get install syslinux-themes-linuxmint-mate

#############################################

# apt-get autoremove
# apt-get autoclean
# apt-get clean all

退出
# exit

卸載虛擬檔案系統
# umount /mnt/dev/pts
# umount /mnt/dev
# umount /mnt/proc
# umount /mnt/sys

若有掛載獨立的 /boot 分割區
# umount /mnt/boot
卸載最後裝置
# umount -l /mnt
# exit

重新啟動


=============================================
系統設定
=============================================
終端機提示字元色彩
$ wget https://github.com/Mint-Fans/linux-package/raw/ubuntu/mate-terminal-color.tar.gz
$ tar -zxvf mate-terminal-color.tar.gz
$ sudo ./terminal-color

Linux Mint Mate 自訂系統桌面調整
$ wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-mate-system-adjustments.tar.gz
$ tar -zxvf mint-mate-system-adjustments.tar.gz
$ sudo ./mint-mate

Linux Mint Mate utility (Caja黃金右鍵腳本)
$ wget https://github.com/Mint-Fans/linux-package/raw/debian/mate-utility.tar.gz
$ tar -zxvf mate-utility.tar.gz
$ sudo ./mate-utility

應用程式鑰匙圈密碼解除
$ sudo sed -i -e '/allow_active/s/auth_admin/yes/' /usr/share/polkit-1/actions/com.ubuntu.pkexec.gparted.policy
$ sudo sed -i -e '/allow_active/s/auth_admin/yes/' /usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy
$ sudo sed -i -e '/allow_active/s/auth_admin_keep/yes/' /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

----------------------
移除Mint更新程式開機自動啟動
$ sudo rm /etc/xdg/autostart/mintupdate.desktop

應用程式啟動器隱藏/顯示設定
$ sudo sed -i '/NoDisplay=true/d' /usr/share/applications/gksu.desktop
$ sudo sed -i '$a NoDisplay=true' /usr/share/applications/fcitx.desktop
$ sudo sed -i '$a NoDisplay=true' /usr/share/applications/fcitx-configtool.desktop
$ sudo sed -i '$a NoDisplay=true' /usr/share/mate/applications/software-properties-gtk.desktop
$ sudo sed -i '$a NoDisplay=true' /usr/share/mate/applications/language-selector.desktop

Mint deb icon 修復
$ sudo su
# wget https://github.com/Mint-Fans/linux-package/raw/debian/mint-x-icons-fix
# chmod 755 ./mint-x-icons-fix
# ./mint-x-icons-fix

更新應用程式關聯設定
# update-mime-database /usr/share/mime/
# update-desktop-database /usr/share/applications/

更新 schemas
# glib-compile-schemas /usr/share/glib-2.0/schemas


設定螢幕亮度與伽瑪
$ sudo leafpad /usr/bin/display-setup
====內容==============
#!/bin/bash

xbacklight -set 80
xgamma -gamma 0.7
======================
$ sudo chmod 755 /usr/bin/display-setup

$ sudo leafpad /etc/xdg/autostart/display-setup.desktop
[Desktop Entry]
Type=Application
Name=Display Setup
Comment=Launch Display Setup
Icon=preferences-desktop-screensaver
Exec=display-setup

2016/3/24 12:08
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.