我成为 Debian 的新信徒是因为这是我的第一次 Debian 安装。Debian 爱好者与操作系统领域的 Macintosh 爱好者或 Linux 爱好者是同一种人。其他一切都不重要。既然我已经是一个 Mac 和 Linux 爱好者(而且还是法国人 :-)),那么是时候爱上它了。
Debian 拥有完善、清晰且国际化的文档。感谢所有培育了这个真正开放的发行版的人们。
在安装过程中,我可以让您自行完成。但是由于我们必须在其中与 shell 交互,因此将详细描述整个过程。
我知道这个描述是 Debian 特有的。我宁愿给您一个完整的示例,也不愿只给您一些“在正确的时刻运行 shell 并输入 blabla...”之类的东西。我喜欢具体的例子。
Simon Forget <sforget@camelot.ca> 告诉我,他的 Toshiba Libretto 50CT 无法使用本指南,因为内核在安装过程中无法识别 pcmcia 软盘驱动器。我不知道为什么,但是如果您已经在目标计算机上有一个 dos 分区,那么可以使用 plip 解决这个问题。
这个解决方案更简单快捷,因为在安装过程中不需要软盘驱动器或 plip 网络。如果您对这个解决方案感兴趣,请直接转到 从 DOS 分区安装 章节。我保留了旧的安装程序,因为新的安装程序需要一个 DOS 分区,当您最终想离开黑暗面时,这个分区就变得多余了。
在源端,挂载光盘驱动器并转到 install 目录
$ mount -t iso9660 /dev/hdd /cdrom
您的 CDROM 设备可能是 /dev/hdb 或 /dev/hdc 或其他设备 (SCSI),具体取决于您的 CDROM 插入的位置。
$ cd /cdrom/debian/dists/stable/main/disks-i386/current/
使用浏览器读取 install.html 文件,或使用 more、less、cat(或 dog?)读取 install.txt 文件。
现在,刻录安装(别名救援)软盘。在上面写上“resc1440.bin
”标签
$ dd if=resc1440.bin of=/dev/fd0H1440
刻录驱动程序软盘。在上面写上“drv1440.bin
”标签
$ dd if=drv1440.bin of=/dev/fd0H1440
然后确保软盘是写保护的。
现在您已准备好开始真正的安装过程。
将 resc1440.bin 软盘插入目标驱动器。重启您的目标机器。
Welcome to Debian GNU/Linux 2.x! ...
阅读文本。提示符是
boot:
按 <ENTER>
键
Loading root.bin........... loading linux... ....
新屏幕
Next: Select Color or Monochrome display
使用向上/向下箭头键选择您的选项,然后按 <ENTER>
键
Next: Continue with the installation
按 <ENTER>
键
Software in the Public Interest presents *** Debian GNU/Linux 2.1 *** ...
阅读文本 按 <ENTER>
键(您在屏幕上看到 <Continue>
)
Next: Configure the Keyboard
按 <ENTER>
键 选择您的国家/地区,然后按 <ENTER>
键
Next : Partition a Hard Disk
按 <ENTER>
键
Select Disk Drive usually /dev/hda
如果您有多个磁盘,请选择正确的磁盘(您想要安装 Linux 的磁盘),然后按 <ENTER>
键
您现在正在使用程序 cfdisk
。在使用 cfdisk
时,在您决定 [Write]
分区到磁盘之前,都是安全的。使用 [Quit]
离开 cfdisk
是安全的。
我们将只创建两个新的主分区,一个 Swap 分区和一个大的 Linux 分区。如果您想创建更多分区,保留一些可用空间或扩展分区,您可以这样做。但是请阅读 Installation-HOWTO 中的“分区”文档,特别是当您有超过 1024 个柱面和旧版本的 LILO 时。
如果您之前运行过 FIPS
程序,您会看到 hda1
分区 (DOSFAT16
)。使用向上/向下箭头键切换到下一个可用分区。
使用向右/向左箭头键选择 [New]
并按 <ENTER>
键
选择 [Primary]
并按 <ENTER>
键
输入您的交换分区的大小。如果您有少于 128MB 的内存,通常是 RAM 的两倍。如果您有 2GB 的 RAM,那是因为您不想交换。在这种情况下,不需要交换分区。
选择 [Beginning]
并按 <ENTER>
键
选择 [Type]
并按 <ENTER>
键。输入 82
(Linux Swap) 并按 <ENTER>
键。
使用向上/向下箭头键切换到下一个可用分区。选择 [New]
并按 <ENTER>
键
选择 [Primary]
并按 <ENTER>
键
输入大小(MB),您可以保留默认值,然后按 <ENTER>
键。它的类型应已为 Linux。如果不是,请使用 [Type]
更改为 Linux (83)
分区表现在已定义。验证一切看起来都很好。如果您不确定,请使用 [Help]
阅读文档。如果仍然有疑问,请选择 [Quit]
并离开安装过程。去散步,然后从本节开头重新开始。
我假设您现在有信心了。
选择 [Write]
Are you sure you want to write the partition table to disk?
输入“yes
”并按 <ENTER>
键
选择 [Quit]
并按 <ENTER>
键
Next: Initialize and Activate a Swap Partition
按 <ENTER>
键
Please select the partition to initialize as a swap device
选择 /dev/hda2
(通常已选中)。按 <ENTER>
键
Scan for Bad Blocks?
选择 <YES>
并按 <ENTER>
键
Are you Sure?
选择 <YES>
并按 <ENTER>
键
Initializing swap partition ...
Next: Initialize a Linux Partition
按 <ENTER>
键
Select Partition. Please select the partition to initialize as a Linux "ext2" file-system.
选择 /dev/hda3
(通常已选中)并按 <ENTER>
键。
Scan for Bad Blocks?
选择 <YES>
并按 <ENTER>
键
Are you Sure?
选择 <YES>
并按 <ENTER>
键
一个充满数字的新页面。您可以休息一下,因为这需要一些时间(尤其是对于大硬盘)。
Next: Mount a Previously-Initialized Partition
按 <ENTER>
键
Please select the partition to mount
选择 /dev/hda3
并按 <ENTER>
键
Mount the /dev/hda3 device as the Root FileSystem?
选择 <Yes<
并按 <ENTER>
键
Next: Install Operating System Kernel and Modules
按 <ENTER>
键
Please select the medium you will use to install the system
选择 /dev/fd0
并按 <ENTER>
键
Please place the Rescue Floppy in the first floppy drive
软盘已在那里。
选择 <Continue>
并按 <ENTER>
键
Installing the Rescue Floppy ... Please place the Drivers Floppy in the first floppy drive
弹出救援软盘,插入驱动程序软盘,即您标记为 drv1440.bin
的那张软盘(您做了,不是吗?)。
选择 <Continue>
并按 <ENTER>
键
Installing the Drivers Floppy ...
新屏幕
Next: Configure Device Driver Modules
按 <ENTER>
键
Select Category
阅读文本。
Please select the category of modules
选择 net
并按 <ENTER>
键
选择 plip
。
Module plip
选择“将模块安装到内核中”,然后按 <ENTER>
键
不需要参数。
选择 <Ok>
并按 <ENTER>
键
Installation succeeded Please press ENTER when you are ready to continue.
按 <ENTER>
键
选择 Exit
(“完成这些模块”),然后按 <ENTER>
键
然后您会再次看到相同的屏幕。
选择 Exit
(“完成这些模块”),然后按 <ENTER>
键
Next: Configure the Network
选择一个名称,您可以使用与 debian
或 target
不同的名称。
按 <ENTER>
键
Is your system connect to a network?
选择 <No>
并按 <ENTER>
键
停止 停止 停止。您现在看到
Next: Install the base system
现在我们需要一个 shell。
按 Alt F2
和 <ENTER>
键 您将进入 root shell。
您在 root shell 中。
验证 plip 模块是否已加载
$ lsmod Module Pages Used by plip 3 0
查找 plip 接口的确切名称
$ dmesg ... NET3 PLIP version 2.2 gniibe@mri.co.jp plip1: Parallel port at 0x378, using assigned IRQ 7
您可以使用以下命令找到相同的信息
$ cat /proc/kmsg ... <4>NET3 PLIP version 2.2 gniibe@mri.co.jp <4>plip1: Parallel port at 0x378, using assigned IRQ 7 ... Ctrl-c (or ^C if you prefer)
配置 plip 接口
$ ifconfig plip1 192.168.0.1 pointopoint 192.168.0.2 netmask 255.255.255.255 up
验证一切正常
$ ifconfig plip1 plip0 Link encap:Ethernet HWaddr FC:FC:C0:A8:00:01 inet addr:192.168.0.1 P-t-P:192.168.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 Collisions:0 Interrupt:7 Base address:0x378
验证到源的路由是否存在
$ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
如果不存在,就像前面的示例一样,添加路由到 192.168.0.2,即源
$ route add -host 192.168.0.2 dev plip1
现在路由已安装
$ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 plip1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
现在您可以从源服务器执行成功的 ping
操作(ping
在 Debian 安装过程中不可用)
$ ping target PING target (192.168.0.1): 56 data bytes 64 bytes from 192.168.0.1: icmp_seq=0 ttl=64 time=14.0 ms 64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=4.3 ms --- target ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 4.3/9.1/14.0 ms
如果它不起作用,请检查 Null-Modem 电缆连接,重新运行 dmesg
、ifconfig
、route
。验证一切。休息一下。重新启动。
当 ping 正常时,返回到正常的安装过程
在目标端:按 Alt F1
您已返回到正常的安装过程。您应该仍然看到
Next: Install the base system
按 <ENTER>
键
Please select the medium you will use to install the system
选择 nfs
并按 <ENTER>
键
Please choose the NFS server and the mount path ...
输入:192.168.0.2:/cdrom
按 <ENTER>
键
Please choose the path inside the mounted NFS filesystem
输入 /debian(通常已在那里)并按 <ENTER>
键
如果没有错误消息抱怨 nfs 挂载,那么恭喜您。您可以通过再次进入 shell 来验证此挂载
按 Alt F2
$ mount ... 192.168.0.2:/cdrom on /instmnt type nfs (rw, addr=192.168.0.2) $ ls /instmnt/debian README README.non-US doc/ README.CD-manufacture README.pgp@ hamm/ README.mirrors.html TRANS.TBL tools/ README.mirrors.txt dists/
按 Alt F1
您再次返回到正常的安装过程。
现在 plip nfs cdrom 连接已完成。让我们继续完成我们的工作。
Please select the directory containing a file base2_0.tgz
选择 list
并按 <ENTER>
键
Please Wait The installation program is building a list of ...
新屏幕
Select Archive Path Please select the directory that you will use to install the Base System from.
只有一个长项目,已选中。按 <ENTER>
键
The Base System is being extracted from /instmnt/debian/dists/.....
再次休息一下,您值得的
Next: Configure the Base System
按 <ENTER>
键
Select Timezone
选择您的时区和目录,然后按 <ENTER>
键
Timezone Configuration
阅读并按 <ENTER>
键
Timezone Configuration.
另一页。阅读,选择 <YES>
并按 <ENTER>
键
Next: Make Linux Bootable Directly From Hard Disk
按 <ENTER>
键
Create Master Boot Record?
阅读
选择 <Yes>
并按 <ENTER>
键
Make Linux the Default Boot Partition?
阅读。
选择 <No>
并按 <ENTER>
键
Next: Make a boot Floppy
按 <ENTER>
键
Change Disk Please place a blank floppy disk in the first floppy drive.
执行它,然后按 <ENTER>
键
软盘正在格式化
Creating a filesystem on the floppy... Copying the operating system kernel...
新屏幕
Next: Reboot the System
按 <ENTER>
键
Reboot the system ?
取出软盘并按 <ENTER>
键
系统重启。您还在黑暗面吗?我猜是的,所以插入您刚刚制作的启动软盘,然后使用 Ctrl-Alt-Del
再次重启
查看启动消息。
阅读文本。
New password:
输入 root 密码。
Re-enter new password
执行它。并记住它。
Shall I create a normal user account now? [Y/n]
输入 n
并按 <ENTER>
键。除非您想这样做(实际上它是安全且良好的)。
Shall I install shadow passwords? [Y/n]
输入 y
并按 <ENTER>
键
Do you want to use a PPP connection to install
输入 n
并按 <ENTER>
键
Now you may choose one of several selections ... Do you want to perform this step?
输入 n
并按 <ENTER>
键
I'm going to start the 'dselect' program...
按 <ENTER>
键
选择 [Q]uit
并按 <ENTER>
键
You may now login as 'root' at the login: prompt... ... debian login:
输入 root
。
Password:
输入 root 密码。
... debian:~#
系统已安装并正在运行。恭喜!
我的工作到此结束。阅读您的发行版的安装文档,然后继续进行 Unix 系统管理工作。
当您重启系统时,plip 连接将无法正常工作。但是现在您知道该怎么做了。
我建议您做一些工作
/etc/init.d/network
中)。/etc/fstat
以简单地通过 nfs 挂载远程源 cdrom。source:/cdrom /cdrom nfs noauto,intr 1 2