前几天侄儿在我这里乱下东西,windows下木马太多,无奈之下重新安装了windowsXP,grub的MBR引导信息被覆盖,无法启动ubuntu。
ubuntu的安装光盘的修复模式不是很好用,不能单纯的只修复grub。所以只能另外找办法解决。
网上找了下,如下方法可以解决:
首先下载grub4dos http://download.gna.org/grub4dos/grub4dos-0.4.4-2008-11-19.zip
将grub.exe和grldr两个文件解压缩到C盘根目录,然后在boot.ini里面添加C:\GRLDR="Start GRUB" ,重新启动后,windows多了个启动项,选择"Start GRUB"后会自动搜索menu.lst文件,就能找到原来ubuntu下的menu文件,然后正常启动ubuntu。
接着在控制台输入sudo grub
grub>root (hd1,0)
grub>setup (hd0)
grub>quit
重启后原来的ubuntu的grub启动菜单就复现了!
推荐使用域名http://ubuntu.dormforce.net代替http://ubuntu.uestc.edu.cn
Ubuntu 8.10 Intrepid Ibex
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-updates main restricted universe multiverse
Ubuntu 8.04 Hardy Heron
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ hardy-updates main restricted universe multiverse
Ubuntu 7.10 Gutsy Gibbon
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ gutsy-updates main restricted universe multiverse
Ubuntu 7.04 Feisty Fawn
deb http://ubuntu.uestc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
最近一些软件更新源经常出问题,收藏几个避免无源可用。
deb http://mirror.cs.umn.edu/ubuntu/ hardy main restricted universe multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy-security main restricted universe multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy-updates main restricted universe multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://mirror.cs.umn.edu/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy main restricted universe multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://mirror.cs.umn.edu/ubuntu/ hardy-backports main restricted universe multiverse
这里https://launchpad.net/ubuntu/+archivemirrors可以找到一些通过官方认证的源。
转载http://linux.chinaitlab.com/command/738913.html
常用的APT命令参数:
apt-cache search package 搜索包
apt-cache show package 获取包的相关信息,如说明、大小、版本等
sudo apt-get install package 安装包
sudo apt-get install package - - reinstall 重新安装包
sudo apt-get -f install 修复安装”-f = ——fix-missing”
sudo apt-get remove package 删除包
sudo apt-get remove package - - purge 删除包,包括删除配置文件等
sudo apt-get update 更新源
sudo apt-get upgrade 更新已安装的包
sudo apt-get dist-upgrade 升级系统
sudo apt-get dselect-upgrade 使用 dselect 升级
apt-cache depends package 了解使用依赖
apt-cache rdepends package 是查看该包被哪些包依赖
sudo apt-get build-dep package 安装相关的编译环境
apt-get source package 下载该包的源代码
sudo apt-get clean && sudo apt-get autoclean 清理无用的包
sudo apt-get check 检查是否有损坏的依赖