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

5

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!

YumYumYum

Posted 2011-09-03T22:07:58.743

Reputation: 1 399

It's irrelevant now you've solved your problem but what was stopping you from using a usb hub to attach a usb keyboard and mouse as well as the flash drive? – Col – 2011-09-04T07:41:57.793

@Col: Its not about installing with keyboard physically and solve it in 1 minute. Its about learning process how to do this without attached keyboard, because its possible. There are many case where this is the best, you wont run all over the world with a keyboard and mouse with you, traveling from 1 state to another always with a keyboard + mouse, but you can carry simply your laptop + network cable and your prepared iso files, and now install what ever environment is assigned to you. It can be co-location or under the water installation too. – YumYumYum – 2011-09-04T08:22:50.977

Answers

5

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.

Windos

Posted 2011-09-03T22:07:58.743

Reputation: 10 080

Thanks, confused still. "inside the iso" for my case the .iso file was uncompressed and i manually added the ks.cfg file. But i have to repack them as iso and then use UNetbootin? – YumYumYum – 2011-09-03T22:35:30.060

For example i have my configuration file in /tmp/ks.cfg. And i have latest ISO in /home/user/Linux.iso. Is it possible simply inject the ks.cfg to the Linux.iso? So that i can simply load the Linux.iso to UNetbootin with my latest ks.cfg on it? – YumYumYum – 2011-09-03T22:40:23.160

1Yes, although thinking about it again: you could just use the stock iso and then change the file on the usb key after unetbootin has done its thing, either way should give you your desired result. – Windos – 2011-09-03T22:45:49.703

Great thats a good idea. Also i was missing this "mkisofs -o /tmp/cd.iso /home/sun/Downloads/centos/" – YumYumYum – 2011-09-03T22:55:51.027