ubuntu 10.4 安装(装完ubuntu进不去win10)
这篇文章给大家聊聊关于ubuntu 10.4 安装,以及装完ubuntu进不去win10对应的知识点,希望对各位有所帮助,不要忘了收藏本站哦。
如何使用Ubuntu U盘启动盘修复更新后无法启动系统的问题
首先,当然是准备一个1G以上容量的U盘,用来制作可启动U盘;
其次,到官网上下载Ubuntu desktop镜像文件。Ubuntu Desktop镜像一般700多兆,从而可以把它写到1G大的U盘上,可以从Ubuntu官网下载10.4的镜像文件。
用UltraISO将其写入U盘,制作成可启动的U盘。自作完成后重启电脑,选择从U盘启动。
由于你写入U盘的实际上是个像光盘一样的Ubuntu安装盘,所以进入U盘Ubuntu后,你可以选择不安装而直接试用体验Ubuntu,这也是本方法的关键所在,利用LiveCD,我们可以暂时进入系统,借以修复原有系统!
进入Ubuntu系统后,启动命令终端,输入如下指令,在线安装lilo和mbr:
ubuntu@ubuntu:~$ sudo apt-get install lilo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mbr
Suggested packages:
lilo-doc
The following NEW packages will be installed:
lilo mbr
0 upgraded, 2 newly installed, 0 to remove and 408 not upgraded.
Need to get 413kB of archives.
After this operation, 1,315kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Fetched 413kB in 3s(124kB/s)
Preconfiguring packages...
Selecting previously deselected package mbr.
(Reading database... 129801 files and directories currently installed.)
Unpacking mbr(from.../archives/mbr_1.1.10-2_i386.deb)...
Selecting previously deselected package lilo.
Unpacking lilo(from.../lilo_1%3a22.8-8ubuntu1_i386.deb)...
Processing triggers for man-db...
Setting up mbr(1.1.10-2)...
Setting up lilo(1:22.8-8ubuntu1)...
WARNING: kernel& initrd not found in the root directory(/vmlinuz&/initrd.img)
WARNING: Do NOT reboot or LILO may fail to boot if your kernel+initrd is large.
WARNING: Please read/usr/share/doc/lilo/README.Debian
ubuntu@ubuntu:~$
安装过程中,会得到如下lilo的配置提示,按OK就行了:
Package configuration
┌───────────────────────────┤ Configuring lilo├────────────────────────────┐
││
│ LILO configuration│
││
│ It seems to be your first LILO installation. It is absolutely necessary│
│ to run liloconfig(8) when you complete this process and execute│
│/sbin/lilo after this.│
││
│ LILO won't work if you don't do this.│
││
│<Ok>│
││
└───────────────────────────────────────────────────────────────────────────┘
然后使用lilo修复系统:
ubuntu@ubuntu:~$ sudo lilo-M/dev/sda mbr
Backup copy of/dev/sda in/boot/boot.0800
The Master Boot Record of/dev/sda has been updated.
ubuntu@ubuntu:~$
修复完成,重启系统:
ubuntu@ubuntu:~$ sudo-s-H
root@ubuntu:/home/ubuntu# reboot
OK了,相信重启后选择进入系统的画面就出现了,是不是很简单?
如何安装FastDFS
目前FastDFS支持类Unix系统,在Linux和FreeBSD下测试过,本文使用的是Ubuntu10.4,建议安装之前先简单了解一下FastDFS的原理,这对后继的配置部分会有很好的理解。
一、准备工作-安装libevent
FastDFS内部绑定了 libevent作为 http服务器,在V2.X版本必须安装 libevent,本文安装的是V2.2版本,因此必须安装libevent。(官方也推荐使用 http方式下载文件)
如果已经安装了 libevent,请确认安装路径是/usr,因为 FastDFS在编译源程序时,需要到此目录下查找一些依赖文件,否则编译 FastDFS会出错。如果不是,建议首先卸载 libevent,然后安装到/usr下。Ubuntu10.4默认是安装了libevent,可以到软件中心卸载掉然后按照下面介绍的方式安装。
安装步骤:
解压 libevent,然后进入解压后的目录分别执行:
Shell代码
./configure--prefix=/usr
make clean;
make
make install
安装libevent完成。
二、安装 FastDFS
1、下载 FastDFS源程序
2、在 FastDFS_v4.05.tar.gz所在文件夹下执行:
Shell代码
sudo tar vxzf FastDFS_v4.05.tar.gz/home/soar/FastDFS
注:/home/soar/FastDFS也可以是其他目录,记住这是解压目录,以后用%FastDFS%表示)
3、由于要使用内置的 http服务,因此编辑%FastDFS%/make.sh文件,找到
#WITH_HTTPD=1
修改成
WITH_HTTPD=1
以支持 http
4、进入%FastDFS%目录,执行:
Shell代码
sudo./make.sh
5、在%FastDFS%目录下,执行:
Shell代码
sudo./make.sh install
如果运行如上命令后,在命令行信息最后看到类似
Shell代码
#ln-fs/usr/local/lib/libfastcommon.so.1/usr/local/lib/libfastcommon.so
#ln-fs/usr/local/lib/libfdfsclient.so.1/usr/local/lib/libfdfsclient.so
sh./fdfs_link_library.sh
恭喜你,已经安装成功了!
FastDFS的配置文件在%FastDFS%/conf目录下,其中包括
Client.conf客户端上传配置文件
Storage.conf文件存储服务器配置文件
Tracker.conf负责均衡调度服务器配置文件
http.conf http服务器配置文件
配置文件需要根据服务器环境的不同,进行不同的配置,具体可以参考FastDFS官方的安装配置文档,以及FastDFS原理介绍文档
在本例中,Tracker Server,Storage Server都安装在一台服务器上,IP:10.0.2.15
1、配置及启动Tracker Server
A、修改%FastDFS%/conf/tracker.conf文件,修改如下
#可以自己指定目录位置,但目录必须存在,用于存储日志及storage server等信息,否则tracker server无法启动
Txt代码
base_path=/home/yuqing/fastdfs-> base_path=/home/soar/fastdfs_tracker
#改成你想要的http端口,将来http下载文件的端口就是他了
Txt代码
http.server_port=8080-> http.server_port=8090
#http支持
Txt代码
##include http.conf->#include http.conf
#默认4GB,如果空间不足,建议调小,否则会报no free space的异常,无法正常启动
Txt代码
reserved_storage_space= 4GB-> reserved_storage_space= 1GB
#tracker server对storage server供服务的端口,使用默认的即可,也可以自定义
Txt代码
port=22122
B、将http.conf文件拷贝到/etc/fdfs目录下,执行
Shell代码
sudo cp%FastDFS%/conf/http.conf/etc/fdfs/
注:为了支持http,必须将这个文件拷贝到此目录,否则无法启动,报param http.XXX not exist or is empty类似的错误
C、进入/usr/local/bin/目录,启动tracker服务器,执行
Shell代码
sudo fdfs_trackerd%FastDFS%/conf/tracker.conf
D、进入/home/soar/fastdfs_tracker/logs/trackerd.log查看tracker的启动日志,如果看到类似
Shell代码
[2010-11-04 16:21:25] INFO- FastDFS v2.02, base_path=/home/soar/fastdfs_tracker, connect_timeout=30s, network_timeout=60s, port=22122, bind_addr=, max_connections=256, work_threads=4, store_lookup=2, store_group=, store_server=0, store_path=0, reserved_storage_space=4MB, download_server=0, allow_ip_count=-1, sync_log_buff_interval=10s, check_active_interval=120s, thread_stack_size=64 KB, storage_ip_changed_auto_adjust=1, storage_sync_file_max_delay=86400s, storage_sync_file_max_time=300s
[2010-11-04 16:21:25] INFO- HTTP supported: server_port=8090, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0, check_active_interval=30, check_active_type=tcp, check_active_uri=/status.html
恭喜你,tracker server已经启动成功!
2、配置及启动Storage Server
A、修改%FastDFS%/conf/storage.conf文件,修改如下:
#可以自定义,但必须存在此目录,用于存储storage相关的log、group内的相关信息
Txt代码
base_path=/home/yuqing/fastdfs->/home/soar/fastdfs_storge
#文件的存储位置,在一台storage server上可以指定多个存储位置
Txt代码
store_path0=/home/yuqing/fastdfs-> store_path0=/home/soar/fastdfs_storge
#必须指定
Txt代码
group_name=group1
#修改成tracker server的IP和端口信息
Txt代码
tracker_server=192.168.209.121:22122-> tracker_server=10.0.2.15:22122
#http支持
Txt代码
##include http.conf->#include http.conf
B、进入/usr/local/bin/目录,启动storage服务器,执行
Shell代码
sudo fdfs_storaged%FastDFS%/conf/storage.conf
C、进入/home/soar/fastdfs_tracker/logs/storage.log查看storage服务器启动日志,如果看到类似
Shell代码
[2010-11-04 16:37:16] INFO- FastDFS v2.02, base_path=/home/soar/fastdfs_storge, store_path_count=1, subdir_count_per_path=256, group_name=group1, connect_timeout=30s, network_timeout=60s, port=23000, bind_addr=, client_bind=1, max_connections=256, work_threads=4, disk_rw_separated=1, disk_reader_threads=1, disk_writer_threads=1, buff_size=256KB, heart_beat_interval=30s, stat_report_interval=60s, tracker_server_count=1, sync_wait_msec=200ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time=23:59, write_mark_file_freq=500, allow_ip_count=-1, file_distribute_path_mode=0, file_distribute_rotate_count=100, fsync_after_written_bytes=0, sync_log_buff_interval=10s, sync_binlog_buff_interval=60s, sync_stat_file_interval=300s, thread_stack_size=512 KB, upload_priority=10, if_alias_prefix=, check_file_duplicate=0, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=
[2010-11-04 16:37:16] INFO- HTTP supported: server_port=8888, http_trunk_size=262144, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0
[2010-11-04 16:37:16] INFO- file: storage_param_getter.c, line: 48, storage_ip_changed_auto_adjust=1
[2010-11-04 16:37:19] INFO- file: tracker_client_thread.c, line: 274, successfully connect to tracker server 10.0.2.15:22122, as a tracker client, my ip is 10.0.2.15
恭喜你,storage server已经启动成功!
经过前面的安装、配置、启动,马上就可以看到FastDFS的效果了,我们先上传一个文件,然后再通过http下载。
一、上传文件
FastDFS安装包中,自带了客户端程序,通过程序可以进行文件上传。在使用这个客户端程序之前,首先需要配置client.conf,然后再进行文件上传及下载。
1、修改%FastDFS%/conf/client.conf文件,修改如下:
#可自定义,但此目录必须存在,用于存放文件上传log
Txt代码
base_path=/home/yuqing/fastdfs-> base_path=/home/soar/fastdfs_tracker
Txt代码
tracker_server=192.168.209.121:22122-> tracker_server=10.0.2.15:22122
Txt代码
http.tracker_server_port=8080->http.tracker_server_port=8090
#支持http
Txt代码
##include http.conf->#include http.conf
2、进入/usr/local/bin/目录,上传文件,执行
Txt代码
sudo fdfs_test%FastDFS%/conf/client.conf upload a.txt
注:a.txt可以在/usr/local/bin/目录下自己创建一个
如果命令行反馈类似如下:
则说明上传文件成功。
关于fastdfs集群和备份配置
1、修改tracker.conf文件中store_lookup=2平衡负载
2、修改tracker.conf文件中store_server=0采用轮询方式。
如果希望只使用一台文件存储服务器,其他二台做备份,则修改文件tracker_server为某台主机的IP,只启动文件存储服务器的tracker,其他二台备份服务器不需要启动tracker。
如果希望三台服务器集群使用,互相备份,比如:使用A机器存储文件,这时候A机器会将文件同步到B机器和C机器,同理使用B机器存储文件,则会同时将文件同步到A机器和C机器。这时候需要将所有的机器IP和端口号
都配置在storage.conf中,如下所示:
tracker_server=10.207.16.127:22122
tracker_server=10.207.16.129:22122
如何用U盘启动盘来修复Ubuntu系统
首先,当然是准备一个1G以上容量的U盘,用来制作可启动U盘;
其次,到官网上下载Ubuntu desktop镜像文件。Ubuntu Desktop镜像一般700多兆,从而可以把它写到1G大的U盘上,可以从Ubuntu官网下载10.4的镜像文件。
用UltraISO将其写入U盘,制作成可启动的U盘。自作完成后重启电脑,选择从U盘启动。
由于你写入U盘的实际上是个像光盘一样的Ubuntu安装盘,所以进入U盘Ubuntu后,你可以选择不安装而直接试用体验Ubuntu,这也是本方法的关键所在,利用LiveCD,我们可以暂时进入系统,借以修复原有系统!
进入Ubuntu系统后,启动命令终端,输入如下指令,在线安装lilo和mbr:
ubuntu@ubuntu:~$ sudo apt-get install lilo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mbr
Suggested packages:
lilo-doc
The following NEW packages will be installed:
lilo mbr
0 upgraded, 2 newly installed, 0 to remove and 408 not upgraded.
Need to get 413kB of archives.
After this operation, 1,315kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Fetched 413kB in 3s(124kB/s)
Preconfiguring packages...
Selecting previously deselected package mbr.
(Reading database... 129801 files and directories currently installed.)
Unpacking mbr(from.../archives/mbr_1.1.10-2_i386.deb)...
Selecting previously deselected package lilo.
Unpacking lilo(from.../lilo_1%3a22.8-8ubuntu1_i386.deb)...
Processing triggers for man-db...
Setting up mbr(1.1.10-2)...
Setting up lilo(1:22.8-8ubuntu1)...
WARNING: kernel& initrd not found in the root directory(/vmlinuz&/initrd.img)
WARNING: Do NOT reboot or LILO may fail to boot if your kernel+initrd is large.
WARNING: Please read/usr/share/doc/lilo/README.Debian
ubuntu@ubuntu:~$
安装过程中,会得到如下lilo的配置提示,按OK就行了:
Package configuration
┌───────────────────────────┤ Configuring lilo├────────────────────────────┐
││
│ LILO configuration│
││
│ It seems to be your first LILO installation. It is absolutely necessary│
│ to run liloconfig(8) when you complete this process and execute│
│/sbin/lilo after this.│
││
│ LILO won't work if you don't do this.│
││
│<Ok>│
││
└───────────────────────────────────────────────────────────────────────────┘
然后使用lilo修复系统:
ubuntu@ubuntu:~$ sudo lilo-M/dev/sda mbr
Backup copy of/dev/sda in/boot/boot.0800
The Master Boot Record of/dev/sda has been updated.
ubuntu@ubuntu:~$
修复完成,重启系统:
ubuntu@ubuntu:~$ sudo-s-H
root@ubuntu:/home/ubuntu# reboot
OK了,相信重启后选择进入系统的画面就出现了,是不是很简单?