Start an installation from GRUB

系统 1671 0

Start an installation from GRUB

 

Description

This tip will show you how to start an installation for network or hard disk from an existing GRUB bootloader from CentOS or another distro. This is useful if the system has no CD or DVD bootable device and it is not possible or convenient to boot from other removable media. The example uses CentOS 5 i386 but should work for other versions and architectures.

 

Fetch boot kernel and initrd

The required installer vmlinux and initrd.img files can be gotten from loopback mount of an ISO image, from a close by mirror, or from an installation tree on hard disk. The example shows fetching them from centos.org:

    cd /boot


    
      wget http://mirror.centos.org/centos/5/os/i386/isolinux/vmlinuz


      
        mv vmlinuz vmlinuz-c5 
        
          wget http://mirror.centos.org/centos/5/os/i386/isolinux/initrd.img 
          
            mv initrd.img initrd-c5.img 
            
            
          
        
      
    
  

 

Create GRUB boot stanza

The following assumes that /dev/sda1 (or /dev/hda1 - first partition on first disk) is the boot partition. For /dev/sdb3 substitute (hd1,2) for (hd0,0), etc.

    title CentOS 5 Install


    
          root (hd0,0)


      
         kernel /vmlinuz-c5 ro 
        
           initrd /initrd-c5.img 
          
          
        
      
    
  

If there is no /boot partition and the root filesystem is on the first partition use

    title CentOS 5 Install


    
          root (hd0,0)


      
         kernel /boot/vmlinuz-c5 ro 
        
           initrd /boot/initrd-c5.img 
          
          
        
      
    
  

Optional parameters can be added to the kernel. For example

    title CentOS 5 Install


    
          root (hd0,0)


      
         kernel /vmlinuz-c5 ro keymap=no lang=en_US.UTF-8 method=http://10.0.0.10/repos/CentOS/5.5/os/i386 
        
           initrd /initrd-c5.img 
          
          
        
      
    
  

Or

    title CentOS 5 Install


    
          root (hd0,0)


      
         kernel /vmlinuz-c5 ro vnc vncconnect=192.168.15.2 ip=dhcp upgradeany lang=en_US keymap=us method=http://192.168.15.40/mrepo/centos5-x86_64/disc1/ ksdevice=link 
        
           initrd /initrd-c5.img
        
      
    
  

Start an installation from GRUB


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论