How to make a USB bootable stick for installing Fedora or Centos using VNC?

Posted on

Problem :

I have a PC with no option for a keyboard. I have to install the operating systems without a keyboard or mouse.

I have to make a bootable USB stick which can allow me to connect to the PC from my Laptop with a VNC connection, then the complete installation using IP to IP. I did this with the following:

  1. Download http://centos.arcticnetwork.ca/6.0/isos/i386/CentOS-6.0-i386-minimal.iso

  2. Extract the files of .iso to my laptop

  3. Add the manual file in CentOS-6.0-i386-minimal/isolinux/ks.cfg

    install
    lang en_US.UTF-8
    keyboard us
    timezone --utc Europe/Brussels
    rootpw  --iscrypted $6$i5qEWD.
    selinux --disabled
    authconfig --enableshadow --passalgo=sha512
    firewall --service=ssh
    bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
    vnc --password=1234
    network --bootproto=static --ip=192.168.1.125 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=192.168.1.1
    
  4. Copy and paste all files on my laptop to the USB stick

  5. Unplug my USB and connect to the target PC

  6. However it never boots to the USB, and then I checked the USB in my laptop, which is also the same as it’s not yet a bootable USB

Any ideas how to fix this?

Note: I have followed:

http://fedoraproject.org/wiki/Anaconda/Kickstart#vnc

http://fedoraproject.org/wiki/Anaconda/Kickstart#Creating_a_Kickstart_Boot_CD-ROM
http://wiki.centos.org/TipsAndTricks/VncHeadlessInstall

http://www.centos.org/docs/5/html/5.2/Installation_Guide/s1-kickstart2-startinginstall.html

Follow up:

  1. yum -y install unetbootin.i686

    This allows me to write the iso file to USB, disk or CD

  2. mkisofs -o /tmp/cd.iso /home/sun/Downloads/centos/

    This allows you to modify your original iso files with the new contents and pack it as one .iso file

    1. Finally load unetbootin and burn to your USB or disk or CD

It works great now!

Solution :

In general just copying files directly to a usb key will not make it boot-able.

Easiest way I know of to make sure the usb is boot-able is to use an application like UNetbootin.

In your case make sure what ever changes you make (in your case to ks.cfg) is updated inside the iso and get the application to apply the iso to the usb.

Leave a Reply

Your email address will not be published.