Results 1 to 6 of 6

Thread: Installing OS

  1. #1
    Senior Member vamsi's Avatar
    Join Date
    Nov 2009
    Location
    Bangalore / India
    Posts
    263
    Thanks
    138
    Thanked 14 Times in 12 Posts
    Rep Power
    6

    Default Installing OS

    Hey guys..we have some servers in OVH, these guys rock..( their custom server panel has many things that others dont offer )

    but main problem is that they provide only customised operating systems ( Lilo )..and they block many things and then even add their ssh key , so that they can assist their customers when needed..
    me any my friends was thinking of many ways to install the distro that we need (clean ).they do offer kvm,,but its costly..
    so thought of pxe boot..where in we can install os remotely using VNC..
    and it can be done on Processors which has VT ..and it was a time consuming process to do those things manually , so me with the help of my friend wrote this code. please tell me how it can be improved ?


    PHP Code:
    #!/bin/bash
    IP=$(ifconfig grep 'inet addr:'grep -'127.0.0.1' cut -d: -f2 awk '{ print $1}')
    GATEWAY=$(route -grep 'UG[ \t]' awk '{print $2}')
    echo 
    "THIS SHELL WHEN EXECUTED WILL INITIATE A CLEAN OS INSTALL OF CENTOS"
    mkdir /cleaninstall
    cd 
    /cleaninstall
    wget http
    ://ftp.hosteurope.de/mirror/centos.org/5.4/os/x86_64/images/pxeboot/initrd.img
    wget http://ftp.hosteurope.de/mirror/centos.org/5.4/os/x86_64/images/pxeboot/vmlinuz
    cp vmlinuz /boot/vmlinuz.cent.pxe
    cp initrd
    .img /boot/initrd.img.cent.pxe
    yum install grub
    echo "default 0" > /boot/grub/menu.lst
    echo "timeout 30" >> /boot/grub/menu.lst
    echo "title Centos Install (PXE)" >> /boot/grub/menu.lst
    echo "root (hd0,0)" >> /boot/grub/menu.lst
    echo "kernel /boot/vmlinuz.cent.pxe vnc vncpassword=vamsi headless ip="$IP" netmask=255.255.255.0 gateway="$GATEWAY" dns=213.186.33.99 ksdevice=eth0 method=http://ftp.hosteurope.de/mirror/centos.org/5.4/os/x86_64/ lang=en_US keymap=us
    >> /boot/grub/menu.lst
    echo "initrd /boot/initrd.img.cent.pxe" >> /boot/grub/menu.lst
    grub
    -install /dev/sda
    grub
    -install --recheck /dev/sda
    echo "Everything is done..now I am rebooting the server..if everything was done correctly, the server should respond on vnc viewer.or else you are gone ?"
    #shutdown -r now 
    thanks
    Last edited by vamsi; 12th March 2010 at 12:41 PM.
    shebangs

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,513
    Thanks
    17
    Thanked 808 Times in 511 Posts
    Rep Power
    10

    Default

    Code:
    IP=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
    This will get all ips if there are eth0, eth1 and so on. you may want to get ifconfig eth0 as below somewhere you are using eth0.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. The Following User Says Thank You to nixcraft For This Useful Post:

    vamsi (12th March 2010)

  4. #3
    Junior Member
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Hi ,

    Can you explain the whole process , as in , how you go about in setting up a virgin system from PXE boot.

    -Ashish

  5. #4
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by ashish882000 View Post
    Hi ,

    Can you explain the whole process , as in , how you go about in setting up a virgin system from PXE boot.

    -Ashish
    Bump! Also interested!

  6. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    wtf?y r u repeating my messages??

  7. #6
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Because several months passed without anyone answering you, and I also had a similar interest. It's common forum behaviour. There's no need to act like a 5th grader about it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Installing Apache 1.3.36
    By eawedat in forum Ubuntu / Debian
    Replies: 5
    Last Post: 8th May 2011, 01:58 AM
  2. Installing Xen
    By cryingthug in forum XEN
    Replies: 1
    Last Post: 4th October 2009, 09:43 AM
  3. Installing PHP scripts
    By mrallan in forum Getting started tutorials
    Replies: 3
    Last Post: 19th June 2008, 11:53 PM
  4. Installing LanCard
    By SwiftSoft in forum Linux hardware
    Replies: 0
    Last Post: 6th April 2007, 09:57 PM
  5. Installing on RAID
    By cttw in forum Linux software
    Replies: 3
    Last Post: 26th October 2006, 03:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •