sepnine 发表于 2018-10-19 00:09:28

【转载】灵珑一体机9S2A安装刘工debian6手记

本帖最后由 sepnine 于 2018-10-19 17:38 编辑

经过一番折腾,终于把近乎白捡的9S2A(不到一张毛爷爷)成功安装为debian6系统。记个简要笔记如下
1. 准备工作:
从 http://www.bjlx.org.cn/loongson/install/lynloong_2f_9003/
下载恢复包 lynloong_debian6_install.tar.gz
解压后获得三个文件: boot.cfg , install_lyn , lynoong_debian6_20111226.tar.lzma
找个u盘把3个文件拷进去。
9S2A开机进入共创系统。把刚才拷好文件的u盘插入一体机。 将文件复制到一体机中。
(由于之前用fat32或者fat的时候换了几个u盘都失败,此处决定用ext2)
重新给u盘分区,创建ext2文件系统。


<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">#mkfs.ext3 /dev/sdb1 </span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">#mount /dev/sdb1 /mnt/</span>
之后将前面保存到一体机中的boot.cfg , install_lyn , lynoong_debian6_20111226.tar.lzma 复制到u盘里
接下来比较重要。由于直接安装会导致usb键鼠无法使用,此处需要复制共创的内核和modules .
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">#mkdir -p /mnt/ccbak/</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">#cp /boot/bootcfg /mnt/ccbak/bootcfg</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">#cp /boot/vmlinux /mnt/ccbak/vmlinux.cc</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">#cp /lib/modules/2.6.27.1 -r /mnt/ccbak/</span>
至此备份好内核和模块。接下来开始安装。


2. 安装过程。
重启开机,插着前面制作好的安装u盘的情况下,操作系统选择界面会有install。选择回车进入。
等待一阵之后,你可以输入2次yes回车,按照默认的分区方案自动安装,也可以按shell回车,使用自己的分区方案安装。我选择后者。
输入shell 回车。 获得一个busybox的shell环境 install>
开始安装,先用fdisk将旧硬盘重新分区。
install> fdisk /dev/sda
指令参考上图,不赘述。我的分区方案,boot200m /15g swap 4g 毕竟内存太小。swap设置大点以防不测
剩余空间留给将来装gentoo。
接下来创建文件系统
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install>mkfs.ext2 /dev/sda1</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install>mkfs.ext3 /dev/sda2</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install>mkswap /dev/sda5</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install>swapon /dev/sda5</span>
接下来将分区挂载
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> mount /dev/sda1 /1</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> mount /dev/sda2 /2 </span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> mount /dev/sdb1 /3</span>
解压打包好的系统。
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> /3/lynoong_debian6_20111226.tar.lzma /2</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> lzmadec -c /2/lynoong_debian6_20111226.tar.lzma | tar xvp</span>
等待解压完毕
解压完毕后,对fstab和内核模块进行配置
install> vi /2/etc/fstab
将挂载点配置为对应你实际情况的
接下来拷贝共创内核和模块
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> cp /3/ccbak/* /1/</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> mv /1/vmlinux.cc vmlinux</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">install> cp -r /3/ccbak/2.6.27.1 /2/lib/modules/</span>
至此大功告成。重启即可


<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">lynoong:~# uname -a</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">Linux lynoong 2.6.27.1 #6 Wed Nov 10 16:17:35 CST 2010 mips64 GNU/Linux</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">lynoong:~# lsb_release -a</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">No LSB modules are available.</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">Distributor ID: Debian</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">Description: Debian GNU/Linux 6.0.3 (squeeze)</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">Release: 6.0.3</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">Codename: squeeze</span>
<span style="color: rgb(51, 51, 51); font-family: " helvetica="" neue",="" helvetica,="" arial,="" sans-serif;"="">lynoong:~# </span>


开机后键鼠完全正常使用。
转载于http://tieba.baidu.com/p/4865939693

VG2018 发表于 2018-10-19 10:10:51

谢谢。转载后的格式比原贴好看。

sn2015ol 发表于 2019-5-11 01:05:35

VG2018 发表于 2018-10-19 10:10
谢谢。转载后的格式比原贴好看。

真不容易啊!

windows1089 发表于 2020-2-28 16:25:59

还是感谢层主转载了一下,原帖已经没了:L
页: [1]
查看完整版本: 【转载】灵珑一体机9S2A安装刘工debian6手记