centos 6.x 遠程重新安裝

來源:互聯網
上載者:User

標籤:style   http   color   使用   os   strong   檔案   io   

注意:本文使用的為公網源 所以重裝的機器需要能連公網,如果不能串連公網你需要搭建私人源

登入到需要重裝系統的centos上 下載開機檔案

本文安裝的為centos6.5 根據不同版本下載不同的檔案

wget http://mirrors.aliyun.com/centos/6.5/os/x86_64/images/pxeboot/vmlinuzwget http://mirrors.aliyun.com/centos/6.5/os/x86_64/images/pxeboot/initrd.img


將下載的檔案複製到/boot 目錄

cp vmlinuz /boot/vmlinuz.centos.pxecp initrd.img /boot/initrd.img.centos.pxe


安裝grub
yum install grub -y


添加安裝啟動項

編輯啟動菜單

vim /boot/grub/menu.lst

添加

title CentOS 6.5 VNC Installationroot (hd0,0)kernel /vmlinuz.centos.pxe vnc vncpassword=PASS headless ip=127.0.0.1 netmask=255.255.255.0 gateway=127.0.0.1 dns=114.114.114.114 ksdevice=eth0 method=http://mirrors.aliyun.com/centos/6.5/os/x86_64/ keymap=usinitrd /initrd.img.centos.pxe

更改PASS為你的vnc密碼

更改127.0.0.1 為重裝系統主機的IP

更改網關127.0.0.1為重裝系統主機的網關

編輯啟動順序

找到

default=0

若剛才添加的title 為第二個title 則將0改為1

若剛才添加的title 為第三個title 則將0改為2

以此類推

附上我的配置

# Note that you do not have to rerun grub after making changes to this file# NOTICE:  You have a /boot partition.  This means that#          all kernel and initrd paths are relative to /boot/, eg.#          root (hd0,0)#          kernel /vmlinuz-version ro root=/dev/mapper/vg_openstack-lv_root#          initrd /initrd-[generic-]version.img#boot=/dev/sdadefault=1timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenutitle CentOS (2.6.32-431.el6.x86_64)        root (hd0,0)        kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_openstack-lv_root rd_LVM_LV=vg_openstack/lv_root rd_NO_LUKS.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_openstack/lv_swap rd_NO_DM rhgb quiet        initrd /initramfs-2.6.32-431.el6.x86_64.imgtitle CentOS 6.5 VNC Installationroot (hd0,0)kernel /vmlinuz.centos.pxe vnc vncpassword=PASS headless ip=192.168.2.254 netmask=255.255.255.0 gateway=192.168.2.1 dns=114.114.114.114 ksdevice=eth0 method=http://mirrors.aliyun.com/centos/6.5/os/x86_64/ keymap=us       initrd /initrd.img.centos.pxe

最後仔細檢查是否有錯誤

重啟
reboot


通過vnc用戶端訪問 IP:1

開始安裝


參考:http://www.centosx.com/install-centos-remotely-through-vnc/

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.