Start an installation from grub

Source: Internet
Author: User
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 shocould work for other versions and ubuntures.

 

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 /bootwget http://mirror.centos.org/centos/5/os/i386/isolinux/vmlinuzmv vmlinuz vmlinuz-c5wget http://mirror.centos.org/centos/5/os/i386/isolinux/initrd.imgmv 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.