逸珑8101B龙芯笔记本安装debian 7.5(Wheezy)
一、启动优盘制作
1、所需资源:
2、将空优盘首格式化为ext2/ext3:
- 可在既有 Linux 系统中用 fdisk/cfdisk 来分区,用 mkfs.ext2/mkfs.ext3 格式化。
- 如果既有 Linux 有装图形桌面环境,并且有装 GParted,则可用 GParted 分区并格式化。
- 也可以用 GParted LiveCD。如果没有光驱,也可以用 VirtualBox 虚拟机,安装USB扩展支持。
3、下载网络安装文件:
mkdir -p /mnt/usb0
mount /dev/sdc1 /mnt/usb0
cd /mnt/usb0
w3m http://ftp.cn.debian.org/
- 控制台界面浏览器除了 w3m 还可以用 links/lynx,镜像还可用 http://debian.bjtu.edu.cn/ 等。
- 然后顺次进入 http://ftp.cn.debian.org/debian/dists/Debian7.5/main/installer-mipsel/current/images/loongson-2f/netboot/ 。
- 如果用 w3m,按 Tab 键切换到三个文件上分别按 a 下载。
- 如果用 links/lynx,在三个文件上分别按 d 下载。
- 按 q 退出。
cd ~
umount /dev/sdc1
二、安装系统
1、在逸珑本上插入刚刚制作好的启动优盘。
2、重启逸珑本(或开机),按住 Del 键进入 PMON。
3、启动网络安装程序:
- 在 PMON 提示符下键入 devls,查看是否识别出优盘,Device name 为 usb0。
- 在 PMON 提示符下键入
bl -d ide (usb0,0)/boot.cfg
- 等待大约 5 分钟左右进入 Debian 网络安装界面。
- 这时按下 Fn-F5 打开无线网络设备,注意不会有任何提示,若不确定可以多按两次 :p。
4、进行网络安装:
- 安装语言选“中文(简体)”。
- 区域选“中国”(默认)。
- 键盘选“汉语”(默认)。
- 然后开始侦测网络设备,若没有连接有线网络会在此处弹出配置网络对话框,选择 wlan0(默认)。
- 选择对应的无线网络 SSID。
- 选择加密类型。
- 输入无线密码。
- 配置主机名。
- 配置域名,若没有留空即可(默认)。
- 镜像所在国家选“中国”(默认)。
- 镜像选择“ftp.cn.debian.org”(默认),也可以选其他更快的镜像。
- 代理设置,如果没有留空即可(默认)。
- 设置并确认 root 密码。
- 设置新账号用户名密码。
- 选用向导或者手动方式分区。若选手动方式,记得要将 /boot 所在分区设置为 ext2 或 ext3。
- 如果启动分区不是第一主分区,会收到一个警告,如果想用双系统,并且确切记得分区位置可忽略之,选“否”。
- 确认分区没有问题,格式化将改动写入磁盘选“是”。
- 之后开始自动安装,会需要一段时间。
- 之后弹出软件包流行度调查,按兴趣选是否。
- 软件选择,默认已经选“SSH Server”和“标准系统工具”,再加选一个“Laptop”,开始下载安装,继续等一段时间。
- 直到结束安装,点继续就好。若保留之前的老系统,grub 会把老系统也识别并添加到最后一项。
- 重启继续进入 PMON。
-
bl -d ide (wd0,X)/boot/boot.cfg
其中X是对应/boot分区编号。
- 进入系统后修改 grub 配置(修改 grub 识别出的老系统名称等),然后复制到第一分区的 /boot 下:
vi /boot/grub/grub.cfg
mount /dev/sda1 /mnt
mv /mnt/boot/boot.cfg /mnt/boot/boot.cfg_bak
cp /boot/boot.cfg /mnt/boot
- 关机,这样重启开机后无线才可正常使用:
halt
三、系统配置
1、重启进入系统:
- Fn-F5 打开无线设备。
- 以 root 账号登录,设置语言为 C,因为控制台不能显示中文:
export LANG=C
2、配置无线网络(如果是 wpa/wpa2 psk 方式加密的):
- 连接无线:
wpa_passphrase XXXX > wpa.conf
wpa_supplicant -B -D wext -i wlan0 -c wpa.conf
dhclient wlan0
其中 XXXX 替换成无线 SSID,并且在 wpa_passphrase 命令执行后键入无线密码。
- 设置启动时自动连接无线(需要在启动后连接无线前按Fn-F5打开无线设备):
cat >> /etc/network/interfaces << EOF
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "XXXX"
wpa-psk "YYYY"
EOF
其中 XXXX 替换称无线 SSID,YYYY 替换成无线密码。
3、其他配置:
- 避免收到类似
[ 0000.000000] sd 2:0:0:0 [sdb] Asking for cache data failed
[ 0000.000000] sd 2:0:0:0 [sdb] Assuming dirve cache write throuth
的干扰: rmmod ums_realtek
echo "options ums_realtek ss_en=0" > /etc/modprobe.d/ums-realtek.conf
modprobe ums_realtek
- 添加 anheng 源,更新系统:
cd /etc/apt/sources.list.d/
wget http://www.anheng.com.cn/loongson2f/wheezy_bjlx.list
cd ~
aptitude update
aptitude upgrade
- 安装配置 sudo:
aptitude install sudo
vi /etc/sudoers
将安装时创建的用户添加到 sudoers。
四、安装配置桌面环境(xfce4)
- 安装 xorg、xfce4:
aptitude install xorg xfce4
安装很多软件包,会花费很长时间。
- 用 https://wiki.debian.org/DebianYeeloong/HowTo/Install#Squeeze_X 给出的内容创建 xorg.conf:
cat > /etc/X11/xorg.conf << EOF
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Device"
Identifier "Card0"
Driver "siliconmotion"
Option "pci_burst" "true"
Option "HWCursor" "true"
Option "VideoKey" "45000"
Option "UseBIOS" "false"
Option "PanelSize" "1024x600"
Option "CSCVideo" "false"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 16
EndSection
EOF
- 注销 root,用安装时创建的用户登录。
- 启动 xfce4:
startxfce4 #或者直接 startx