Graphic installation of Scientific Linux 6 on ServerLoft server

    I have been using rented servers in some projects for a long time and one of the data centers I use is ServerLoft .

    Recently (to be precise, after the release of RHEL6) it has become necessary to install CentOS6 or SL6 on servers, but the problem is that ServerLoft does not offer the possibility of installing the 6th version of OS data (for now, at least). The OS specialists do not manually install the OS.

    Almost all servers in ServerLoft are provided with IPMI / iLO / iRMC / etc. Due to this fact, you can get a text console on the server, and even a graphic one for HP servers, and this allows you to install the desired OS without any special difficulties.

    Details below.

    The installation of Scientific Linux 6 will be discussed below (the CentOS6 installation should not be any different, but I did not install the 6th CentOS because of its slow but sure sending to the dustbin of history, unfortunately the community).

    If the server has just been provided, then to start the installation of SL6 you need to go to the interface of your ServerLoft account and install any version of CentOS5 (I usually install CentOS5 x86_64 minimal RAID1) through Restore.

    After the successful Restore procedure, you should have SSH root access to the target server.

    IPMI


    Typically, the Restore procedure involves automatically configuring the IPMI interface on the server.
    The IP address of the management interface (aka IPMI) can be viewed in your account in the server description. Immediately I recommend trying to go to HTTPS to this IP address and make sure that you see something sane in the browser, otherwise you need to issue a ticket and tell specialists that you have problems with IPMI (such problems are usually resolved by restarting the power supply).

    Now you can go to the server and change the password to IPMI.

    We determine which IPMI channel is responsible for interacting with the network:

    # for i in {0..15}; do ipmitool channel info $i 2>/dev/null | grep -i LAN > /dev/null && echo $i; done

    Usually, the 2nd channel is responsible for the LAN. It will be used later. If your script above returned something else, then this number should be used later.

    Now look at the list of users on the second channel:

    # ipmitool user list 2

    Usually the list looks like this or similar:
    ID Name Enabled Callin Link Auth IPMI Msg Channel Priv Limit
    1 true true true true Unknown (0x00)
    2 root true true true true OEM
    


    Now we change the password for the user "" and root: Note: it is not recommended to set a password over 16 characters, it is also not recommended to use special characters in the password. Now it's time to check what gets us into the serial console from a remote computer: where 10.20.30.40 is the IP address of your IPMI. If a session has opened, we see “[SOL established]” on the screen and the program did not end immediately (with an error), then success has been achieved - we have a serial console (serial over LAN). Usually, the servers in ServerLoft after installation are immediately configured in such a way that agetty is launched on the serial console and if you press Enter, we will see an invitation to login.

    # ipmitool user set password 1 somesecret
    # ipmitool user set password 2 somesecret






    $ ipmiconsole -W sun20,solpayloadsize -h 10.20.30.40 -u root -p somesecret --serial-keepalive







    To open the console, you can use ipmitool instead of ipmiconsole, but the latter in my experience works in more cases.

    It is worth noting that each manufacturer makes IPMI on the principle of “who is what,” so sometimes something can work in one case and not work in another.

    Kernel and initrd image of SL6, loading into the installer


    Now you need to download the installation kernel and the initrd image of SL6, and then boot into this new kernel. We open /etc/grub.conf for editing and bring to a similar look:

    # cd /boot/
    # wget ftp1.scientificlinux.org/linux/scientific/6.1/x86_64/os/isolinux/vmlinuz
    # wget ftp1.scientificlinux.org/linux/scientific/6.1/x86_64/os/isolinux/initrd.img



    # grub.conf generated by anaconda
    #
    # 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. console = ttyS0,57600 console = tty0
    # root (hd0.0)
    # kernel / vmlinuz-version ro root = / dev / sda2 console = ttyS0,57600 console = tty0
    # initrd /initrd-version.img
    # boot = / dev / sda
    serial --unit = 0 --speed = 57600
    terminal --timeout = 2 serial console
    default = 1
    timeout = 5
    hiddenmenu
    title EL6
            kernel / vmlinuz console = ttyS0,57600 console = tty0 serial text
            initrd /initrd.img
    title CentOS (2.6.18-274.7.1.el5)
            root (hd0.0)
            kernel /vmlinuz-2.6.18-274.7.1.el5 ro root = LABEL = / nodmraid console = ttyS0,57600 console = tty0
            initrd /initrd-2.6.18-274.7.1.el5.img
    title CentOS (2.6.18-274.el5)
            root (hd0.0)
            kernel /vmlinuz-2.6.18-274.el5 ro root = LABEL = / nodmraid console = ttyS0,57600 console = tty0
            initrd /initrd-2.6.18-274.el5.img
    


    Pay attention to the comments. If the / boot directory on your system is done on a separate partition, then the paths will be as in the example above, otherwise you need to write "/ boot" at the beginning of all paths.

    Key lines in grub.conf:
    - “console = ttyS0,57600 console = tty0” in the parameters of each kernel — these are the settings for forwarding kernel messages to tty0, this is the terminal connected to the COM port of the IPMI controller;
    - "serial --unit = 0 --speed = 57600" and "terminal --timeout = 2 serial console" - redirecting Grub output to serial console (in addition to real consoles, of course);
    - “default 1” - at boot time, select EL6 in Grub to install (by default, the CentOS5 kernel and the old system will boot);
    - “title EL6” - the point of the new kernel and further - its description.

    Almost everything is ready to reboot into the new kernel. It remains only to remember the network settings to make them in the installer, because the installation will be made from network sources.

    # ip a
    1: lo:  mtu 16436 qdisc noqueue 
        link / loopback 00: 00: 00: 00: 00: 00 brd 00: 00: 00: 00: 00: 00
        inet 127.0.0.1/8 scope host lo
        inet6 :: 1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eth0:  mtu 1500 qdisc pfifo_fast qlen 1000
        link / ether 00: 26: 70: 70: 70: 70 brd ff: ff: ff: ff: ff: ff
        inet 123.123.123.170/26 brd 188.138.40.191 scope global eth0
    3: eth1:  mtu 1500 qdisc noop qlen 1000
        link / ether 00: 26: 80: 80: 80: 80 brd ff: ff: ff: ff: ff: ff
    4: sit0:  mtu 1480 qdisc noop 
        link / sit 0.0.0.0 brd 0.0.0.0
    #
    # ip r | grep default
    default via 123.123.123.129 dev eth0 
    


    Now you can reboot into the SL6 kernel and perform the installation.

    Installation and VNC



    Select the menu item created earlier in the serial console:
        GNU GRUB version 0.97 (627K lower / 2094848K upper memory)
     + ------------------------------------------------- ------------------------ +
     | EL6 |  
     | CentOS (2.6.18-274.7.1.el5) |
     | CentOS (2.6.18-274.el5) |
     | |
     | |
     | |
     | |
     | |
     | |
     | |
     | |
     | |  
     + ------------------------------------------------- ------------------------ +
          Use the ^ and v keys to select which entry is highlighted.
          Press enter to boot the selected OS, 'e' to edit the
          commands before booting, 'a' to modify the kernel arguments
          before booting, or 'c' for a command-line.
    

    and watch the boot process until the installer asks the first question:
    Welcome to Scientific Linux for x86_64
                        ┌────────┤ Choose a Language ├────────┤
                        │ │
                        │ What language would you like to use │
                        │ during the installation process? │
                        │ │
                        │ Catalan ↑ │
                        │ Chinese (Simplified) ▒ │
                        │ Chinese (Traditional) ▮ │
                        │ Croatian ▒ │
                        │ Czech ▒ │
                        │ Danish ▒ │
                        │ Dutch ▒ │
                        │ English ↓ │
                        │ │
                        │ ┌────┐ │
                        │ │ OK │ │
                        │ └────┘ │
                        │ │
                        │ │
                        └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ┘ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
      / between elements |  selects |  next screen
    

    We go through the dialogue.

    Now the installer asks about the installation method
    Welcome to Scientific Linux for x86_64
                            ┌───┤ Installation Method ├───┐                         
                            │ │                         
                            │ What type of media contains │                         
                            │ the installation image? │                         
                            │ │                         
                            │ Local CD / DVD │                         
                            │ Hard drive │                         
                            │ NFS directory │                         
                            │ URL │                         
                            │ │                         
                            │ ┌────┐ ┌──────┐ │                         
                            │ │ OK │ │ Back │ │                         
                            │ └────┘ └──────┘ │                         
                            │ │                         
                            │ │                         
                            └──────────────────────────────└                         
      / between elements |  selects |  next screen
    

    We select the URL and naturally, we need to configure the network:
    Welcome to Scientific Linux for x86_64
                 ┌───────────────┤ Networking Device ├───────────────┐              
                 │ │              
                 │ You have multiple network devices on this system. │              
                 │ Which would you like to install through? │              
                 │ │              
                 │ eth0 - Ethernet device eth0 - 00: 26: 70: 70: 70: 70 │              
                 │ eth1 - Ethernet device eth1 - 00: 26: 80: 80: 80: 80 │              
                 │ │              
                 │ ┌────┐ ┌──────────┐ ┌──────┐ │              
                 │ │ OK │ │ Identify │ │ Back │ │              
                 │ └────┘ └──────────┘ └──────┘ │              
                 │ │              
                 │ │              
                 └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ └ ─ └ ─ ─ ─ ─ └ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ──┘              
      / between elements |  selects |  next screen
    

    Here you need to remember which interface we have configured in the source system and make its settings.

    Disable IPv6, manually configure IPv4:
    Welcome to Scientific Linux for x86_64
                    ┌────────────┤ Configure TCP / IP ├─────────────┐                
                    │ │                
                    │ [*] Enable IPv4 support │                
                    │ () Dynamic IP configuration (DHCP) │                
                    │ (*) Manual configuration │                
                    │ │                
                    │ [] Enable IPv6 support │                
                    │ (*) Automatic neighbor discovery │                
                    │ () Dynamic IP configuration (DHCPv6) │                
                    │ () Manual configuration │                
                    │ │                
                    │ ┌────┐ ┌──────┐ │                
                    │ │ OK │ │ Back │ │                
                    │ └────┘ └──────┘ │                
                    │ │                
                    │ │                
                    └ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ─ ─ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ┘ ─ ─ ─ ─                
      / between elements |  selects |  next screen
    


    We enter IPv4 settings (google DNS after reinstallation needs to be changed to something more sane):
    Welcome to Scientific Linux for x86_64
                                                                                    
           TCP────────────────┤ Manual TCP / IP Configuration ├─────────────────┐       
           │ │       
           │ Enter the IPv4 and / or the IPv6 address and prefix (address / │       
           │ prefix). For IPv4, the dotted-quad netmask or the CIDR-style │       
           │ prefix are acceptable. The gateway and name server fields must │       
           │ be valid IPv4 or IPv6 addresses. │       
           │ │       
           │ IPv4 address: 123.123.123.170_ / 26______________ │       
           │ Gateway: 123.123.123.129 __________________________ │       
           │ Name Server: 8.8.4.4 __________________________________ │       
           │ │       
           │ ┌────┐ ┌──────┐ │       
           │ │ OK │ │ Back │ │       
           │ └────┘ └──────┘ │       
           │ │       
           │ │       
           └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ └ ─ └ ─ ─ ─ ─ └ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ───────────────┘       
      / between elements |  selects |  next screen
    


    With the network finished and the server IP address should start pinging.

    Now we are setting the path to the repository (ftp://ftp1.scientificlinux.org/linux/scientific/6.1/x86_64/os/):
    Welcome to Scientific Linux for x86_64
            ┌───────────────────────┤ URL Setup ────┐        
            │ │        
            │ Please enter the URL containing the Scientific │        
            │ Linux installation image on your server. │        
            │ │        
            │: //ftp1.scientificlinux.org/linux/scientific/6.1/x86_64/os/_ │        
            │ │        
            │ [] Enable HTTP proxy │        
            │ │        
            │ Proxy URL ___________________________________ │        
            │ Username _______________ │        
            │ │        
            │ Password _______________ │        
            │ │        
            │ ┌────┐ ┌──────┐ │        
            │ │ OK │ │ Back │ │        
            │ └────┘ └──────┘ │        
            │ │        
            │ │        
            └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ └ ─ └ ─ ─ ─ ─ └ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─────────────┘        
      / between elements |  selects |  next screen
    


    Click OK and observe how the server downloads the installer files necessary for subsequent installation.

    Now it remains to answer the last important question - do we want to install via VNC in graphical mode or continue in text mode:

                  ┌──────────┤ Would you like to use VNC? ├──────────┐
                  │ │
                  │ Text mode provides a limited set of installation │
                  │ options. It does not allow you to specify your │
                  │ own partitioning layout or package selections. │
                  │ Would you like to use VNC mode instead? │
                  │ │
                  │ ┌──────────┐ ┐────────────────┐ │
                  │ │ Start VNC │ │ Use text mode │ │
                  │ └──────────┘ ┘────────────────┘ │
                  │ │
                  │ │
                  └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ └ ─ └ ─ ─ ─ ─ └ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┘
      / between elements |   selects |   next screen
    


    Click Start VNC and enter the password:
                   ┌────────────┤ VNC Configuration ├──────────────┐
                   │ │
                   │ A password will prevent unauthorized listeners │
                   │ connecting and monitoring your installation │
                   │ progress. Please enter a password to be used │
                   │ for the installation │
                   │ │
                   │ Password: ********* _______ │
                   │ Password (confirm): ********* _______ │
                   │ │
                   │ │
                   │ ┌────┐ ┌─────────────┌ ┌──────┐ │
                   │ │ OK │ │ No password │ │ Back │ │
                   │ └────┘ └─────────────└ └──────┘ │
                   │ │
                   │ │
                   └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ─ ┘ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
      / between elements |   selects |   next screen
    


    We see a message
    21:52:40 Starting VNC ...                                                       
    21:52:41 The VNC server is now running.
    21:52:41 
    You chose to execute vnc with a password. 
    21:52:41 Please manually connect your vnc client to loftXXXX.serverloft.com:1 (123.123.123.170) to begin the install.
    Press  for a shell
    21:52:41 Starting graphical installation.
    


    Rejoice. On a local system that works in graphical mode, launch the VNC client:

    $ vncviewer loftXXXX.serverloft.com:1
    (or any other favorite VNC client)

    and install in full graphical mode.

    PS Kernel parameters that are passed to Anaconda during installation. Here you can transfer the path to the kikcstart file and all network settings so that the system is installed automatically. The kickstart file needs to be written in advance, but this article is not about how to write it, but only to show how you can install a fresh OS in a convenient installer mode.
    PPS A text installation is quite suitable for someone, but, unfortunately, mdraid and LVM cannot be fully configured in it.

    Also popular now: