[Centos-docs] VNC Remote Install Disk

Dustin Krysak chaos at digitalcollision.com
Wed Sep 6 23:25:09 UTC 2006



Ralph Angenendt wrote:
>
> Here to the list, I'd say. 
>
> Regards, 
>
> Ralph
>   
>   

Here it is, and I guess let me know what you need next.


    VNC Install Disk - howto

The purpose of this disk is simple - to be able to install a second 
system with Centos without having to hook up a keyboard/mouse/monitor. 
This second machine is my test machine, and I wipe/install often on it. 
I needed/wanted to use a disk for install as I do not have a 3rd machine 
(or the room for it) to house a NFS server with images on it. I know i 
could buy a KVM, but since i use a mac with OS X for my primary - the 
USB/PS2 with a DVI/VGA mixed model KVMs are expensive for home use. And 
well I like this better - less equipment on my desk. And in a nutshell - 
I got sick of lifting a heavy ass CRT out of my storage every time i 
wanted to install.

I am doing this in point form with a little explanation. No real 
detail... just the commands to get the job done. I did this with a 
Centos 4.2 box running as root. Probably better to run it under a 
regular user account and "sudo" as needed. But alas - I did it this way.

    * Get an fresh Centos Server Cd1)
      <http://digitalcollision.com/wiki/doku.php?id=vnc_install_disk#fn1>
      (You could create a custom CD with the packages you want - however
      that is not covered here) ISO image from the Centos
      <http://www.centos.org> site and save it to your home directory.
    * Now it is time to mount the downloaded Centos server cd ISO2)
      <http://digitalcollision.com/wiki/doku.php?id=vnc_install_disk#fn2>
      so that we can copy the files into our file system to do the
      required edits to make this thing work. On the last line as most
      of you probably realize you can sub "nano" for your favorite text
      editor. So enter the following commands:

mount -oloop CentOSServerCd.iso /mnt/
mkdir /tmp/installDisk
cp -a /mnt/* /tmp/installDisk/
cp /mnt/.* /tmp/installDisk/
cd /tmp/installDisk
nano isolinux/isolinux.cfg

    * Now that we have the files copied onto our drive from the ISO and
      have the "isolinux.cfg" file open we can now make our changes.
      What we will be doing is editing the "boot options" that are
      passed to the installer when the cd installer begins. Currently
      the file will look like:

default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
  kernel vmlinuz
  append initrd=initrd.img ramdisk_size=8192
label text
  kernel vmlinuz
  append initrd=initrd.img text ramdisk_size=8192
label expert
  kernel vmlinuz
  append expert initrd=initrd.img ramdisk_size=8192
label ks
  kernel vmlinuz
  append ks initrd=initrd.img ramdisk_size=8192
label lowres
  kernel vmlinuz
  append initrd=initrd.img lowres ramdisk_size=8192
label local
  localboot 1
label memtest86
  kernel memtest
  append -

    * Now what you need to do is modify it to match the following:

default linux
prompt 0
timeout 0
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
  kernel vmlinuz
  append initrd=initrd.img ramdisk_size=8192 vnc vncconnect=192.168.0.100 headless ip=dhcp ksdevice=eth0 method=cdrom lang=en_US keymap=us
label text
  kernel vmlinuz
  append initrd=initrd.img text ramdisk_size=8192
label expert
  kernel vmlinuz
  append expert initrd=initrd.img ramdisk_size=8192
label ks
  kernel vmlinuz
  append ks initrd=initrd.img ramdisk_size=8192
label lowres
  kernel vmlinuz
  append initrd=initrd.img lowres ramdisk_size=8192
label local
  localboot 1
label memtest86
  kernel memtest
  append -

As you can see I changed a few minor things like the prompt and timeout 
to "0". This is because I do not want to have to do any keyboard 
interaction, nor would I be able to see the screen when I was asked for 
these prompts. This disk is just for VNC installs. So the prompts and 
time outs were removed. The other thing I modified was the default boot 
option. Now as you can see I added the options for the default boot to 
initialize a VNC connection to a listening viewer3) 
<http://digitalcollision.com/wiki/doku.php?id=vnc_install_disk#fn3> 
located on "192.168.0.100". Obviously modify this to match your desired 
network. There is a vnc parameter that can be passed (in a boot option) 
in which you can set a VNC password on the installers VNC server - but I 
figured since it is on my private lan behind a firewall - what the heck. 
No need for it. The security concious may wish to add this parameter. 
The other options cover some of the default information required to be 
able to auto populate these values - otherwise you are prompted to fill 
it out. But again - no keyboard/mouse/monitor. So we pass the info here. 
Feel free to modify with your preferences for a different language, etc. 
And as you can see, there must be a DHCP server on your LAN to assign 
the IP to the machine targeted for installation.

    * Fix a few little permissions with the following command...

chmod u+w isolinux/*

    * Create the final ISO image with this command:

mkisofs -o ../vncCentOS4.2SrvCd.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T .

This will create the final iso in your tmp directory. In my first run at 
this I though - "Hey I'm done!". Well if you had burnt the cd you would 
have quickly discovered it was a no go. Why? Well upon testing the CD 
with a monitor attached I found out the "media check" prompt was coming 
up and waiting for me to press "continue" or "skip". Now this is a good 
feature to have with the intention of being sure that your CD media is 
good. Well unfortunately for me this was bad. It meant I would need a 
monitor and keyboard to get the install going. Again not what I desired. 
After a little homework I discovered that there was a boot option to 
FORCE a media check, however there was no option to disable it. For a 
bit there I thought i was sunk. Since the boot options are passed to 
"anaconda" (the redhat installer) I figured the fine developers on the 
redhat anaconda would be able to point me in the right direction (if 
there was a right direction at this point). Luckily there was a right 
direction. They pointed me out to a tool that was part of the anaconda 
runtime.

    * Check if you have the anaconda runtime installed.

yum list | grep anaconda-runtime

The output from yum should tell you if it is installed.

    * If you need to install it run:

yum install anaconda-runtime

This is just part of the regular Centos repos. Now as to the tool. What 
the hell is it? It is called "implantisomd5". This tool is installed to 
"/usr/lib/anaconda-runtime/". Now the command is real simple like.

    * Remove the media check from the ISO image with:

/usr/lib/anaconda-runtime/./implantisomd5 --supported-iso vncCentOS4.2SrvCd.iso

Be sure to modify the above command if you named your ISO differently.

    * Burn the ISO with your favorite cd burning software.
    * Start your vnc viewer in listening mode.
    * Pop the cd in and boot the machine you wish to install Centos on.
    * Install the OS as per normal.

Hope that helped. Over all this is not a hard procedure at all. The 
hardest thing about it was digging all the info up from different 
resources, and my inexperience with anaconda in general beyond that of a 
regular default install.

Be sure to test your cd with a monitor on the first time since we did 
disable the media check.

1) <http://digitalcollision.com/wiki/doku.php?id=vnc_install_disk#fnt1> 
I used the server cd so that we do not need to switch CD's through the 
installation as the server cd is only 1 cd.
2) <http://digitalcollision.com/wiki/doku.php?id=vnc_install_disk#fnt2> 
Be sure to adjust the commands to reflect the name of your actual ISO file.
3) <http://digitalcollision.com/wiki/doku.php?id=vnc_install_disk#fnt3> 
See your VNC viewer help docs on how to set this up.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.centos.org/pipermail/centos-docs/attachments/20060906/cedc243c/attachment-0001.htm


More information about the Centos-docs mailing list