找回密码
 注册
搜索
热搜: 回贴
微赢网络技术论坛 门户 服务器 Linux/BSD 查看内容

安装DSL(Damn Small Linux)到硬盘上

2009-12-20 13:28| 发布者: admin| 查看: 41| 评论: 0|原作者: 潇潇雨



在Linux中混了一段时间,还没开始学习Shell命令,就只会那几个常用的命令。虽然自己的系统已是Linux了,还是不敢在自己的系统中学习Shell命令(特别是一些危险操作的命令),还是用虚拟机吧。
前面笔记中已经
安装VirtualBox虚拟机
了,现在安装DSL这个迷你LiveCD的Linux发行版,因为这是LiveCD版的Linux系统,可以直接从光盘启动系统,却没法保存设置。其实,最初原因是它默认的分辨率太大了以及默认是图形界面,每次启动的时候都要输入“dsl vga=769, dsl 3”设置启动参数,麻烦。
为什么选它?因为我的机器太差了,没办法呀,只有1.13Ghz的CPU和384M的内存运行CentOS5系统。在虚拟机中运行DSL这样的迷你Linux系统还是能承受的。这个DSL启动很快的,就10多秒钟就启动了,占的硬盘空间也非常小。在说,是学Shell命令,一般都用字符界面,图形界面是英文还是中文或者桌面好不好看,都不管了。所以,用文本模式下的DSL系统应该不会占多少硬件资源的。下面就是我的笔记了,算图解吧(^_^):
是在VirtualBox虚拟机安装的,肯定是先启动虚拟机(虚拟机设置就略了)。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920162739.png');}" onmousewheel="return imgzoom(this);" alt="" />
我把VirtualBox设置成了把硬盘作为第1启动置备了,所以在虚拟机刚启动的时候,按“F12”就是上图了,选择3以光盘启动。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920163131.png');}" onmousewheel="return imgzoom(this);" alt="" />
其实,这里直接回车就能启动了。
我设置了启动模式:
dsl vga=769 这是把分辨率设为640*480的分辨率。
dsl 3 这是设置进入文本模式(默认启动是图形界面)。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920163553.png');}" onmousewheel="return imgzoom(this);" alt="" />
切换成root超级用户,然后用cfdisk分一个区出来。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920163829.png');}" onmousewheel="return imgzoom(this);" alt="" />
关于分区,我就不贴图了,简单说下步骤吧:
[New] 创建新分区。
[Primary] 新分区为主分区。
Size (in MB): 新分区大小,以M为单位(直接输入)。
[Beginning]: 新分区创建在空白分区的前面。
[Write]: 写入信息(就是保存的意思啦)。
[Quit]: 退出。
下面步骤就创建了一个256M的主分区(hda1是ext3的文件系统):
[New] -> [Primary] -> Size (in MB):256 -> [Beginning] -> [Write] -> [Quit]
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920165720.png');}" onmousewheel="return imgzoom(this);" alt="" />
回到Shell中,按上图操作就行了。
dsl-hdinstall
把DSL安装到磁盘的命令。
Enter the target partition.(EXAMPLE:hda2):hda1
这里就是指定安装到那个分区中(这里安装到刚才创建的hda1分区中)。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920170959.png');}" onmousewheel="return imgzoom(this);" alt="" />
提示是否安装引导加载器。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920170314.png');}" onmousewheel="return imgzoom(this);" alt="" />
确定安装引导后,提示安装Grub还是Lilo引导(我安装Grub引导)。
最后,输入“y”重新启动(这次要以硬盘启动了)。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920171637.png');}" onmousewheel="return imgzoom(this);" alt="" />
启动后,要重新设置root和dsl这两个用户的密码(直接输入2次新密码)。
box longin: 就是登陆提示了,输入用户名和密码进入系统。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920172036.png');}" onmousewheel="return imgzoom(this);" alt="" />
不管是root用户还是dsl用户,首次登陆,都会出现上图,先设置系统。
我直接Cancel掉了,按默认就行了。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://blog.chinaunix.net/photo/76337_080920172412.png');}" onmousewheel="return imgzoom(this);" alt="" />
按默认的分辨率就是大,我的屏幕都放不下了,设置下分辨率(DSL->System->Xvesa),如上图。
到这里,就算把DSL系统安装到硬盘上了。
注:
如果安装后不能启动,可能是系统引导没安装成功(我就遇到这种情况)。其实,在安装引导的时候,注意看也知道是否安装成功了。我的解决方法就是,用dsl-hdinstall命令进行安装前,把hda1分区挂到/mnt/hd目录中:
# mount /dev/hda1 /mnt/hd
安装Grub引导失败的时候(没切到图,应该有下面信息):
root (hd0,0)
setup --stage2=/mnt/hd/boot/grub/stage2 --prefix=/boot/grub (hd0)
引导安装失败,用“df -h”查看挂载情况,发现/mnt/hd目录根本没有挂载什么东西,而上面的/mnt/hd/boot/grub/stage2这句又怎么解释,呵呵!所以就把hda1分区挂载到/mnt/hd目录,我是这样做的,安装成功。















最新评论

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-30 09:23 , Processed in 0.216988 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

返回顶部