Home Wiki > SDB:Remote installation
Sign up | Login

SDB:Remote installation

tagline: From openSUSE

This article covers the procedures and methods to install openSUSE on a remote machine.

Performing a Network-only installation

Sometimes it is necessary to upgrade a machine that is only reachable over the network. In openSUSE you have several possibilities to remotely run the installation program. These are:

This tutorial outline here how to install with openSSH. VNC is similar, and for serial console things are even easier. This tip is intended as a hint on how to get things done, not as an in-depth reference.

Note: On a hosted server, it could be wise to don't use the default boot for the install, install on an other partition than the actual running system and use grubonce to boot the install. If ever the install fail, the next reboot will reboot the default running system.


Manual preparation

Get the needed installation files

What you need for a network install is to boot the installation kernel as well as the installation initrd on the remote computer. At the same time, you need to know about the IP-address that the computer will have. Lets suppose that you have a fixed IP-address. If you use dhcp, omit the network definitions and use the IP-address you get from your dhcp server.

First, copy the kernel image and installation initrd to your /boot directory:

cd /boot
wget --output-document=vmlinuz.install http://<path to openSUSE>/boot/loader/linux
wget --output-document=initrd.install http://<path to openSUSE>/boot/loader/initrd

For stable openSUSE release

  • Replace <version> by your openSUSE release (ie,11.2, ...).
  • Replace <arch> by your architecture (i386 or x86_64).
cd /boot
wget --output-document=vmlinuz.install http://download.opensuse.org/distribution/<version>/repo/oss/boot/<arch>/loader/linux
wget --output-document=initrd.install http://download.opensuse.org/distribution/<version>/repo/oss/boot/<arch>/loader/initrd

For latest Factory development code

  • Replace <arch> by your architecture (i386 or x86_64).
cd /boot
wget --output-document=vmlinuz.install http://download.opensuse.org/factory/repo/oss/boot/<arch>/loader/linux
wget --output-document=initrd.install http://download.opensuse.org/factory/repo/oss/boot/<arch>/loader/initrd

Configure GRUB

Next, prepare your grub configuration to boot these images. If the ip adress of your computer is 192.168.10.10, the gateway to the internet is 192.168.10.1 and your root (/) partition is /dev/hda1, add a section like the following to /boot/grub/menu.lst :

title Boot -- openSUSE 11.2
   root (hd0,0)
   kernel /boot/vmlinuz.install noapic usessh=1 sshpassword="12345678" install=ftp://<path to openSUSE> hostip=192.168.10.10 netmask=255.255.255.0 gateway=192.168.10.1 nameserver=192.168.10.1
   initrd /boot/initrd.install

Note: The password must be at least 8 characters long.

Note: Make sure the IP address is really available before reboot. Even local addresses may cause trouble if the target machine is in a larger network segment.

Note that you must enter the IP-address in the path to openSUSE instead of the name if you do not provide a nameserver. Then make this 1st entry the default by changing menu.lst at the line

default 0

to reflect the section number of your entry.

Note: If you want to boot to another section temporarily, do not change the default. Instead use the command grubonce 0, where 0 is the number of your new section.

After doing this, do a reboot.

For stable openSUSE release

  • Replace <version> by your openSUSE release (ie,11.2, ...).
title Boot -- openSUSE <version>
   root (hd0,0)
   kernel /boot/vmlinuz.install noapic usessh=1 sshpassword="12345645" install=http://download.opensuse.org/distribution/<version>/repo/oss/ hostip=192.168.42.123/24 gateway=192.168.42.1 nameserver=192.168.42.1
   initrd /boot/initrd.install

For latest Factory development release

title Boot -- openSUSE Factory INSTALL
   root (hd0,0)
   kernel /boot/vmlinuz.install usessh=1 sshpassword="12345678" install=http://download.opensuse.org/factory/repo/oss/ hostip=192.139.88.209 netmask=255.255.255.0 gateway=192.139.88.254 nameserver=192.139.88.1
   initrd /boot/initrd.install

Eventually, you may have to give the mirror IP.


Automated preparation

Downloading kernel and initrd as well as modifying the grub config can mostly be automated with the Setup GRUB for NFS install script.


Start the installation

The computer will start again after rebooting, but this time booting your installation image instead of the installed system. To reach the installation image, do a ssh to this system:

ssh -X root@192.168.10.10

and enter the password that was given in sshpassword (in the example above, this is "12345645", as 1-8 would be to obvious to phishers;) ). All you have to do now is start yast (or yast2 for graphical installation), and proceed as in a normal installation.

Note: During installation if you're disconnected before you have a chance to entering the root password, then reconnect after a few minutes and enter the given installation password that was set in the grub menu.lst file. After that you have to run /usr/lib/YaST2/startup/YaST2.ssh to continue the installation.


Post-install

After that you may have to run /usr/lib/YaST2/startup/YaST2.ssh to continue the installation.

This may be missed, because it's only usefull to install X, but if not the starting process is somewhat broken.


More information

The options that may be used at the kernel command line are summarized in either /usr/share/doc/packages/autoyast2/html/appendix.linuxrc.html or /usr/share/doc/packages/linuxrc/linuxrc.html. Instead of using a colon (:) to separate the name and values (as used in a /info file), use an equal sign (=) when adding those options in the GRUB menu to the kernel command line. Linuxrc always tries to find out as much information as possible about the computer, so if you don't provide network connection information, it will try to use dhcp to setup its network.


See also


External links