链接:https://pan.baidu.com/s/1cf4OefOoFGLOWfU3hegQfw 提取码:8C14 链接:https://pan.baidu.com/s/1q7fNJ0R6EcaFSkLxFFQpKA 提取码:3r92
1、因为我也是一步一步安装的,其中有些指令会报错,不用管它,继续输入下一条指令即可,顺着将上面的指令输入一遍即可 2、解读zz@zz-VirtualBox:~/shiyanlou/oslab/,zz是我的用户名,取不同的名字这里就会不同 3、将我放的两个压缩包放置于home目录下的shiyanlou目录(这个目录没有需新建,也可改为其他名字,不过这样的话上面指令的目录每一个都得改) 4、有些包安装起会很慢(默认下载源在国外),可以在网上搜一搜更改更改下载源的方法 5、如果有错可先看错误提示,一般它都会提示你缺少什么软件包,按照它的提示安装即可,如果解决不了可以在网上搜一搜关键词+它的错误提示(有奇效,亲测) 6、我们现在是通过这个平台学习操作系统,所以不用纠结上面这些个指令到底是什么意思,一步一步学下去自会了解
下面是我在Terminal中输入的所有指令
zz@zz-VirtualBox:~/shiyanlou$ tar -zxvf gcc-3.4.tar.gz
zz@zz-VirtualBox:~/shiyanlou$ cd gcc-3.4
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4$ cd amd64
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ sudo dpkg -i *.deb
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ apt --fix-broken install
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ sudo apt-get install build-essential
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ sudo apt-get install bochs
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ apt-cache search as86 ld86
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ sudo apt install bin86
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ sudo apt install libc6-dev-i386
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ tar -zxvf hit-oslab-linux-20110823.tar.gz
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4/amd64$ cd ../
zz@zz-VirtualBox:~/shiyanlou/gcc-3.4$ cd ../
zz@zz-VirtualBox:~/shiyanlou$ tar -zxvf hit-oslab-linux-20110823.tar.gz
zz@zz-VirtualBox:~/shiyanlou$ ls -l
zz@zz-VirtualBox:~/shiyanlou$ cd oslab
zz@zz-VirtualBox:~/shiyanlou/oslab$ cd linux-0.11
zz@zz-VirtualBox:~/shiyanlou/oslab/linux-0.11$ make all
zz@zz-VirtualBox:~/shiyanlou/oslab/linux-0.11$ cd ../
zz@zz-VirtualBox:~/shiyanlou/oslab$ ./run
zz@zz-VirtualBox:~/shiyanlou/oslab$ sudo apt install libsm6:i386
zz@zz-VirtualBox:~/shiyanlou/oslab$ sudo apt install libx11-6:i386
zz@zz-VirtualBox:~/shiyanlou/oslab$ sudo apt install libxpm4:i386
zz@zz-VirtualBox:~/shiyanlou/oslab$ ./run
zz@zz-VirtualBox:~/shiyanlou/oslab$ ./dbg-asm
<bochs:1> q
zz@zz-VirtualBox:~/shiyanlou/oslab$ cd hdc
zz@zz-VirtualBox:~/shiyanlou/oslab/hdc$ cd ../
zz@zz-VirtualBox:~/shiyanlou/oslab$ sudo ./mount-hdc
zz@zz-VirtualBox:~/shiyanlou/oslab$ sudo umount hdc
zz@zz-VirtualBox:~/shiyanlou/oslab$ sudo ./mount-hdc
zz@zz-VirtualBox:~/shiyanlou/oslab$ cd hdc
zz@zz-VirtualBox:~/shiyanlou/oslab/hdc$ ls -l
zz@zz-VirtualBox:~/shiyanlou/oslab/hdc$ sudo mkdir Main.c
zz@zz-VirtualBox:~/shiyanlou/oslab/hdc$ ls -l
zz@zz-VirtualBox:~/shiyanlou/oslab/hdc$ cd ../
zz@zz-VirtualBox:~/shiyanlou/oslab$ sudo umount hdc
zz@zz-VirtualBox:~/shiyanlou/oslab$ cd hdc
zz@zz-VirtualBox:~/shiyanlou/oslab/hdc$ ls -l
|