在centos下重新安装centos方法

2013-04-16 11:32:39来源:linuxde作者:

系统挂掉了,没有了光驱,怎么办。想到最简单的办法就是在cenots下使用iso光盘文件重新安装CentOS

系统挂掉了,没有了光驱,怎么办。想到最简单的办法就是在cenots下使用iso光盘文件重新安装CentOS

挂载光盘

mount -o loop centos.iso /mnt/

拷贝启动文件

cp /mnt/isolinux /boot/ -a

编辑添加grub.conf内容:

title centos_setup

root (hd0,0)          //请确定你的/boot所在的分区,我的/boot使用的是单独的分区

kernel /isolinux /vmlinuz ro root=/isolinux/isolinux.bin   //如果你的/boot不是单独的分区,你要写成/boot /isolinux/vmlinuz和 /boot/isolinux/isolinux.bin

initrd /isolinux/initrd.img

确定你的/分区已经没有重要资料需要备份了,注意,我说的是/分区,不是/目录!!!

reboot

在grub中,选择"centos_setup",如果你上面的操作没有问题,那么你就会看到文字安装界面,首先看到的是选择语言:一定要选默认的英文,否则...我就不说了

关键词:centos

赞助商链接: