云网牛站
所在位置:首页 > Linux教程 > 分享安装Debian 8 Jessie的经验(文字记录)

分享安装Debian 8 Jessie的经验(文字记录)

2017-12-17 10:39:07作者:linuxdashen稿源:Linux大神

本文将分享安装Debian 8 Jessie系统的一些经验。具体的说本文介绍无网络连接情况下安装Debian 8,多启动环境下安装Debian 8,以及如何解决Debian 8的无线网连接问题。目前Debian 8序列最新版本是Debian 8.10,请参考Debian 8更新:8.10发布。如果是Debian 9系列则最新版本是Debian 9.3,参考Debian 9更新:9.3发布

 

无网络环境下安装Debian 8 Jessie

我们可以在没有网络连接的环境下安装Debian 8,在安装过程中,如果你没有配置以太网连接或无线网连接,那么Debian会将你的安装介质当作它的软件源,安装完Debian后,我们需要重启电脑,编辑软件源文件,以root权限打开/etc/apt/sources.list文件,你会看到文件的内容如下:

# deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150908-22:02]/ jessie main

deb cdrom:[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150908-22:02]/ jessie main

# Line commented out by installer because it failed to verify:

#deb http://security.debian.org/ jessie/updates main

# Line commented out by installer because it failed to verify:

#deb-src http://security.debian.org/ jessie/updates main

首先,我们需要禁用cdrom软件源,这个cdrom就是你的安装介质,在第二行前面添加#符号以禁用cdrom软件源,然后去掉第4行和第6行前面的#符号以启用security安全更新。

最后,我们需要添加jessie和jessie update源,将下面4行文字添加到文件中。

deb http://httpredir.debian.org/debian jessie main contrib

deb-src http://httpredir.debian.org/debian jessie main contrib

deb http://httpredir.debian.org/debian jessie-updates main contrib

deb-src http://httpredir.debian.org/debian jessie-updates main contrib

保存文件后刷新软件源。

apt-get update

当你的电脑有网络连接时,你便可以从Debian镜像站安装软件了。

httpredir.debian.org是一个Debian镜像站重定向工具,它可以帮助你自动选择离你最近,速度最快的Debian镜像站,如果一个镜像站不在线,那么它会自动选择下一个最适合你的Debian镜像站。

 

多启动环境下安装Debian 8

我的电脑上安装了很多个LInux发行版(ubuntu、archlinux、Fedora、Elementary OS等等),当我在安装Debian 8的时候,我没有安装Grub启动引导器。如果你的电脑也是多启动环境,那么你也不需要安装Grub启动引导器,当你安装好Debian后,你需要启动电脑进入另外一个Linux发行版,然后在终端里输入下面的命令:

sudo update-grub

这条命令会寻找新安装的系统,并更新Grub启动菜单,这样,你的Debian 8会出现在Grub启动菜单里了,下次开机时你就能选择Debian 8。

 

Debian 8 无线网无法连接

很多人安装Debian 8后会发现无线网无法连接,这是因为Debian不会将non-free的驱动程序包含在系统里.按下面的步骤解决无线网的连接问题。

首先,找出你的无线网卡设备名。

lspci

这条命令会列出所有的PCI设备,无线网卡通常在倒数第二行,最后一行通常是以太网卡,你可以看到我的无线网卡设备名是RTL8188CE。

03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)

0c:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)

找出无线网卡的设备名后,前往https://wiki.debian.org/WiFi,这个页面会指导你如何在Debian系统上安装无线网卡驱动,下拉页面到PCI Devices部分,在这里你可以找到你的无线网卡,按Ctrl+F,然后输入你的无线网卡设备名。

找到你的无线网卡后,点击右边的链接,它链接到无线网卡的具体帮助页面。

分享安装Debian 8 Jessie的经验(文字记录)

这个帮助页面会告诉你在软件源文件中添加non-free,更新软件源,然后安装non-free的无线网卡驱动程序,最后重启电脑。

比如,我的无线网卡设备名是RTL8188CE,按照下面的步骤安装non-free无线网卡驱动。

将用户切换为root,编辑/etc/apt/sources.list文件。

su

vi /etc/apt/sources.list

在你的软件源后添加non-free,如下。

deb http://httpredir.debian.org/debian/ jessie main contrib non-free

保存文件.更新软件源并安装无线网卡驱动。

apt-get update && apt-get install firmware-rtl

重启电脑。

reboot

过程基本上是一样的,只是安装的驱动程序不同。

有时候,你不能在https://wiki.debian.org/WiFi 这个页面中通过设备名找到你的无线网卡,但你可以通过驱动程序名称找到,在终端里输入下面的命令找出你需要安装的无线网卡驱动程序。

apt-get install lshw

lshw -class network

在第二条命令的输出结果中,driver=的后面就是驱动程序名称,回到 https://wiki.debian.org/WiFi 这个页面,在这个页面中查找你的驱动程序名称。

 

其他的问题

另外我遇到的一个问题是启动Debian 8时无法进入桌面,屏幕显示如下错误。

Gave up waiting for root device. Common problems:

- Boot args (cat /proc/cmdline)

- Check rootdelay= (did the system wait long enough?)

- Check root= (did the system wait for the right device?)

- Missing modules (cat /proc/modules; ls /dev)

ALERT! /dev/sda6 does not exist. Dropping to a shell!

BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)

Enter 'help' for a lost of built-in commands.

(initramfs)

我按下电源键关闭电脑,然后再次启动电脑,问题就解决了。

 

相关主题

Windows 7 64位操作系统安装Ubuntu 17.10

Ubuntu 16.04和Windows 10双系统安装教程

精选文章
热门文章