xen vps debian5升级到debian6

admin
2012-12-20 / 0 评论 / 373 阅读 / 正在检测是否收录...

由于拿到的vps上没有debian6 模板,所以考虑从debian5 升级到debian6。感谢hostloc ,google,citrix ,ofcdn.me

为了详细说明,我一步一步来

1:备份数据。如果你是新机,可以忽略。不是的话,最好备份好数据,不保证一定能成功。

2:修改debian5 apt源,

 

echo deb http://archive.debian.org/debian/ lenny contrib main non-free > /etc/apt/sources.list

 

 3:更新软件。

apt-get update
apt-get upgrade

3.1 这里附加一步,是加入认证key的

gpg --keyserver keyserver.ubuntu.com  --recv-keys 841D6D8DFE3F8BB2

gpg --armor --export FE3F8BB2 | apt-key add -

4:重启系统

reboot

5:修改源为debian6的源
编辑/etc/apt/sources.list ,清空后,输入下边的内容

deb http://ftp.us.debian.org/debian/ squeeze main
deb-src http://ftp.us.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

# squeeze-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ squeeze-updates main
deb-src http://ftp.us.debian.org/debian/ squeeze-updates main

6:更新系统

 apt-get update
 apt-get upgrade

过程中提示:
"Services to restart for PAM library upgrade": If cron is deafult - use this. 选择ok
If /etc/console-tools/config has changed - Keep your change with N (default) 输入n
7:安装内核,安装udev

 apt-get install linux-image-2.6.32-5-686-bigmem
 apt-get install udev

过程中提示
"Services to restart for GNU lib library upgrade": If cron is default - choose this 选择ok
8:重启系统

reboot

9:更新系统

apt-get dist-upgrade

过程中提示

"Use dash as the default system shell /bin/sh": Your choice - default is Yes. 选择yes
"Chainload from menu.lst" - No "Migrate legacy boot sequencing to dependency-based sequencing" - Your choice - default is Yes. 这里一定选择no,否则重启后机子启动不起来。
"Configuring grub-pc: "Linux command line:"; console=hvc0 is OK. 选择ok

10:更新grub ,这步挺关键的

upgrade-from-grub-legacy

过程中会提示

GRUB install devices:
用空格选择 /dev/xvda
用tab键选 ok
最后会提示删除 menu.list ,不要删除 。没有关系 。

11:重启,完成,看看是不是debian6 了

 cat /etc/debian_version
0

评论 (0)

取消