How to test Multicast Packet Filtering?

Today morning I started my day testing with Multicast Packet Filtering. I had buntu 12.04.1 and CentOS 6.5 in my VM running over ESX 5.5.I decided to make CentOS as Client and Ubuntu as server for the setup.

iperf-client-server
First of all, I downloaded iperf as I had no YUM working at my internal lab.
Its simple to install,download the package and install. Luckily, I dint get any dependency hell.

On Ubuntu Box:

SERVER MACHINE
=====================================

sudo iperf -s -u -B 224.0.65.68 -i 1
————————————–

server listening on UDP port 5001
Binding to local address 224.0.65.68
Joining multicast group 224.0.65.68
UDP Buffer size: 120 Kbytes(default)
——————————————

[ 3] local 224.0.65.688 port 5001 connected with 10.112.173.86 port 38577
[ 3] 0.0.-1.0 sec 128 KBytes 1.05 Mbits/sec 0.228 ms 0/ 89 (0%)

On CenTOS Box(Client):

iperf -c 224.0.65.68 -u -T 5 -t 5
———————————-
Client connecting to 224.0.65.68, UDP port 5001
sending 1470 byte datagrams
setting multicast TTL to 5
UDP buffer size: 126 KBytes(default)
——————————————
[ 3] local 10.112.173.86 port 38577 connected with 224.0.65.68 port 5001
[ 3] 0.0- 5.0 sec 642 Kbytes 1.05 Mbits/sec
[ 3] Sent 447 datagrams

1.It clearly shows that multicast address is 224.0.65.68.
e.g. server> iperf -s -u -B -i 1

This will have the iperf servers listening for datagram (-u) from the address (-B multicast address), with a periodic interval of 1s (-i 1)

2. Configure the client VM, connecting to the multicast group address and setting the TTL (-T, –ttl) as needed
e.g. client> iperf -c -u -T 5 -t 5

This will have the client connected to the multicast address (-c multicast address), with a TTL of 5 (-T 5), sending data for 5 seconds
NOTE: Use tcpdump or ethereal on server VMs to capture and analyze IP packets and ensure its validity.

Run the test for 120 sec.

That’s it..
You Have just finally tested Multicast packet Filtering.

0
0

Understanding /proc/cpuinfo

A hyperthreaded processor has the same number of function units as an older, non-hyperthreaded processor. It just has two execution contexts, so it can maybe achieve better function unit utilization by letting more than one program execute concurrently. On the other hand, if you’re running two programs which compete for the same function units, there is no advantage at all to having both running “concurrently.” When one is running, the other is necessarily waiting on the same function units.

cpu

A dual core processor literally has two times as many function units as a single-core processor, and can really run two programs concurrently, with no competition for function units.

A dual core processor is built so that both cores share the same level 2 cache. A dual processor (separate physical cpus) system differs in that each cpu will have its own level 2 cache. This may sound like an advantage, and in some situations it can be but in many cases new research and testing shows that the shared cache can be faster when the cpus are sharing the same or very similar tasks.

In general Hyperthreading is considered older technology and is no longer supported in newer cpus. Hyperthreading can provide a marginal (10%) for some server workloads like mysql, but dual core technology has essentially replaced hyperthreading in newer systems.

A dual core cpu running at 3.0Ghz should be faster then a dual cpu (separate core) system running at 3.0Ghz due to the ability to share the cache at higher bus speeds.

The examples below details how we determine what kind of cpu(s) are present.

The kernel data Linux exposes in /proc/cpuinfo will show each logical cpu with a unique processor number. A logical cpu can be a hyperthreading sibling, a shared core in a dual or quad core, or a separate physical cpu. We must look at the siblings, cpu cores and core id to tell the difference.

If the number of cores = the number of siblings for a given physical processor, then hyperthreading is OFF.

/bin/cat /proc/cpuinfo | /bin/egrep ‘processor|model name|cache size|core|sibling|physical’

Example 1: Single processor, 1 core, no Hyperthreading

processor : 0
model name : AMD Duron(tm) processor
cache size : 64 KB

Example 2: Single processor, 1 core, Hyperthreading is enabled.

Notice how we have 2 siblings, but only 1 core. The physical cpu id is the same for both: 0.

processor : 0
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
processor : 1
model name : Intel(R) Pentium(R) 4 CPU 2.80GHz
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1

Example 3. Single socket Quad Core

Notice how each processor has its own core id. The number of siblings matches the number of cores so there are no Hyperthreading siblings. Also notice the huge l2 cache – 6 MB. That makes sense though, when considering 4 cores share that l2 cache.

processor : 0
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
processor : 1
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 4
processor : 2
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 4
processor : 3
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4

Example 3a. Single socket Dual Core

Again, each processor has its own core so this is a dual core system.

processor : 0
model name : Intel(R) Pentium(R) D CPU 3.00GHz
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
processor : 1
model name : Intel(R) Pentium(R) D CPU 3.00GHz
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2

Example 4. Dual Single core CPU, Hyperthreading ENABLED

This example shows that processer 0 and 2 share the same physical cpu and 1 and 3 share the same physical cpu. The number of siblings is twice the number of cores, which is another clue that this is a system with hyperthreading enabled.

processor : 0
model name : Intel(R) Xeon(TM) CPU 3.60GHz
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
processor : 1
model name : Intel(R) Xeon(TM) CPU 3.60GHz
cache size : 1024 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 1
processor : 2
model name : Intel(R) Xeon(TM) CPU 3.60GHz
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
processor : 3
model name : Intel(R) Xeon(TM) CPU 3.60GHz
cache size : 1024 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 1

Example 5. Dual CPU Dual Core No hyperthreading

Of the 5 examples this should be the most capable system processor-wise. There are a total of 4 cores; 2 cores in 2 separate socketed physical cpus. Each core shares the 4MB cache with its sibling core. The higher clock rate (3.0 Ghz vs 2.3Ghz) should offer slightly better performance than example 3.

processor : 0
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
processor : 1
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
processor : 2
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
cache size : 4096 KB
physical id : 3
siblings : 2
core id : 0
cpu cores : 2
processor : 3
model name : Intel(R) Xeon(R) CPU 5160 @ 3.00GHz
cache size : 4096 KB
physical id : 3
siblings : 2
core id : 1
cpu cores : 2

Hope you find it useful for your interview preparation.

0
0

How to setup vsFTP server on Linux?

FTP refers to File Transfer Protocol. By default, Red Hat supports vsftp. If you do minimal RHEL installation, you mightn’t have vsftp related RPM packages installed.

ftp

To setup an anonymous ftp server on Red Hat Enterprise Linux, follow these steps:

1. Verify that the vsftpd package is installed.

#rpm -qa |grep vsftpd

If it is not installed, the install it as follows:

RHEL 3 and 4

# up2date -i vsftpd

RHEL 5
# yum install vsftpd

2. Verify the localhost line in /etc/hosts looks like the following:

127.0.0.1 localhost.localdomain localhost

3. Next configure the vsftpd.conf file. NOTE: Back up the vsftpd.conf file

# cd /etc/vsftpd
# cp vsftpd.conf ./vsftpd.conf.ORIG

Using an editor, open the file vsftpd.conf. Uncomment the line
anonymous_enable=YES. Save and quit the vsftpd.conf file.

4. Start the vsftpd service

# service vsftpd start

5. To have the vsftpd service persistent across reboot:

# chkconfig vsftpd on

6. To test the configuration run the following commands:

# ftp localhost

Login with:
username: anonymous
password: root@local

This should show an ftp prompt. Type ‘bye’ to exit to the command prompt.
NOTE: ports 20 and 21 must be opened on the firewall.

0
0

How to increae Swap space under Linux

“Can Linux be installed without swap space?”.

This question was asked to me on one of Linux System admin interview. It might confuse anyone who is still fresher and have no hands-on experience with swap terminology.But the reality is “Yes”. But if you did this, you should be ready to cope up with your Linux box next time you put extra load on your box.It will crash someday.Its always recommended to provide extra space for swap partition.Swap is only used when you have maximum load.

atemyram
This article discuss how to increase the swap space through adding swap file on Linux machine.

Lets proceed with the requisite steps to add swap file as shown below:

Lets use dd command to create swapfile. Then you need to use mkswap command to set up a Linux swap area on a device or in a file.

a) Log in as root user.

b) Run this command to create 512MB swap file (1024 * 512MB = 524288 block size):

  1. dd if=/dev/zero of=/swapf1 bs=1024 count=524288

c) Set up a Linux swap area:

  1. mkswap /swapf1

d) Activate /swapfile1 swap space immediately:

  1. swapon /swapf1

e) To activate /swapf1 after Linux system reboot, add entry to /etc/fstab file. Open this file using text editor such as vi:

  1. vi /etc/fstab

Then,append following line:

/swapf1 swap swap defaults 0 0

So next time Linux comes up after reboot, it enables the new swap file for you automatically.

Verifying if the swap is activated or not?

$ free -m

Hope the article proves useful for everyone who wants an extra swap space therein.

0
0

How to setup Centralized Logging System on Linux?

I was just hanging around blogs until I cam across one nice piece of setting up centralized Logging setup.I thought to try it out of mine and here is the output:Syslog is a fantastic facility for logging on Linux machines. Lets say you have a small number of servers, and want to log them all to one central syslog server. Here we’ll describe a simple configuration.
syslog-2
1) Setup the syslog serverOn the system you want to use as the syslog server, edit the file /etc/sysconf/syslog, and add ‘-r’ as follows:

  1. Options to syslogd
  2. -m 0 disables ‘MARK’ messages.
  3. -r enables logging from remote machines
  4. -x disables DNS lookups on messages recieved with -r
  5. See syslogd(8) for more details

SYSLOGD_OPTIONS=”-m 0 -r”

  1. Options to klogd
  2. -2 prints all kernel oops messages twice; once for klogd to decode, and
  3. once for processing with ‘ksymoops’
  4. -x disables all klogd processing of oops messages entirely
  5. See klogd(8) for more details

KLOGD_OPTIONS=”-x”

Initially I added -x because I thought it would use networked DNS. But as I am logging all from local servers, all of which are defined in /etc/hosts, it doesn’t actually go to the network for name lookup. And, having the name of the system in the log file is nice.

Now, restart syslog, and confirm that syslog is listening on port 514 (the syslog port):

root@ajeet:/root>/etc/init.d/syslog restart
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
root@ajeet:/root>netstat -an|grep 514
udp 0 0 0.0.0.0:514 0.0.0.0:*

2) Now, configure your client:

For simplicity, I added a line in the /etc/hosts file to add the name ‘loghost’ to the other names I am using for my logging server. This is actually beneficial – because I can move my syslog server to another host – and I only have to modify the hosts file…

Next, edit the /etc/syslog.conf file. I added 1 simple line to log all informational messages to the remote loghost:

*.info @loghost

Note: separate all columns with the tab character, not space.

Finally restart syslog on the client with /etc/init.d/syslog restart.

To test, you can use the command line logging facility called logger. On the client I type:

root@tuxbuddy:/etc>logger foobar

And on the server I see:

root@ajeet:/root>tail -f /var/log/messages

Jun 28 21:17:29 tubxuddy bemo: fooba

Hence, the centralized logging server is Ready !!!

0
0

How to create password-less SSH for Linux

Sometimes you might need setting up Password-less SSH for running script or for application where you dont want to use password everytime. Here is a quick method to setup password-less SSH.

SSH_Dock_Icon_by_eternicode

Lab Scenerio:

Machine1: 192.168.160.194

Machine2: 192.168.160.197

a. Run this command on Machine1:

#ssh-keygen -t rsa

It will show you this output. Just press Enter throughout the queries asked.

Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is:

40:f0:87:19:23:47:1e:ef:65:7b:5d:05:b0:fa:48:81 root@puppet-server.test.com

The key’s randomart image is:

+–[ RSA 2048]—-+

| ooB …..|

| * B . . .|

| * E + . .|

| + o + . . |

| S + . . |

| . + |

| . . |

| |

| |

+—————–+

b. Let’s copy the key to remote Machine2:

#ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.160.197

root@192.168.160.197’s password:

It will show you the following output.

Now try logging into the machine, with “ssh ‘root@192.168.160.197′”, and check in:

.ssh/authorized_keys

to make sure we haven’t added extra keys that you weren’t expecting.

c. Now passwordless SSH is ready. Just test by typing this:

#ssh 192.168.160.197

0
0

Installing SMARTFOX Server Pro on Debian

SmartFoxServer is a massive multiplayer platform for building games, MMO communities, virtual worlds, realtime multiplayer games.

smartfox-10

To setup SFS, in short on Linux platform like Debian, one can follow the below steps:

Download the SmartFox Server Pro 1.6.6 fromhttp://smartfoxserver.com/download/get/77/SFSPRO_linux64_1.6.6.tar.gz link.

smart-2

1. Open a terminal window and move to the folder where you have downloaded the file.
2. Type “gzip -d filename.tar.gz” to extract the .tar file (where “filename” is the name of the downloaded file) as shown in the screenshot.
3. Type “tar xf filename.tar” to extract the files.
4. Move inside the uncompressed folder and type ./install

smart-3

smart-4

To start the server move to the {installation-directory}/SFS_PRO_1.6.6/Server folder and type ./sfs start

smart-5

The complete list of commands is the following:

./sfs start Start the server
./sfs stop Stop the server
./sfs restart Restart the server
./sfs status Show the current status of the server ( running / not running etc… )

Installing SmartFoxServer as a Linux daemon:

smart-6

Hope it helps !!!

0
0

Setting up a Simple Samba Share – Part II

In the previous article we saw the practical implication of setting up a samba share.In this article we will explore more about the Samba with practical approach.

samba-2

Aim:

Connnecting to Samba Server through Own Client Software on the same machine

Implementation:

[root@rhel samba]# smbclient //localhost/ -U jen
Password:
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
[root@rhel samba]# smbclient //localhost/jen -U jen
Password:
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]
smb: \>
You will see lots of commands here:

smb: \> ?
? altname archive blocksize cancel
case_sensitive cd chmod chown close
del dir du exit get
getfacl hardlink help history lcd
link lock lowercase ls mask
md mget mkdir more mput
newer open posix posix_open posix_mkdir
posix_rmdir posix_unlink print prompt put
pwd q queue quit rd
recurse reget rename reput rm
rmdir showacls setmode stat symlink
tar tarmode translate unlock volume
vuid wdel logon listconnect showconnect
!

smb: \>

Example:

Lets put a file called text1 from the share to a directory /tmp
Here it goes:

[root@rhel samba]# cd /home/jen/
[root@rhel jen]# ls
[root@rhel jen]# touch text <<—– Lets Create a file called text1 [root@rhel jen]# vi text [root@rhel jen]# smbclient //localhost/jen -U jen Password: Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6] smb: \> ls
. D 0 Mon Aug 3 17:16:20 2009
.. D 0 Mon Aug 3 17:02:24 2009
.bash_logout H 24 Mon Aug 3 17:02:24 2009
.kde DH 0 Mon Aug 3 17:02:24 2009
.gtkrc H 120 Mon Aug 3 17:02:24 2009
.bash_profile H 191 Mon Aug 3 17:02:24 2009
text 6 Mon Aug 3 17:16:20 2009 <<— Here is a file .bashrc H 124 Mon Aug 3 17:02:24 2009 50521 blocks of size 262144. 27714 blocks available smb: \>

Remember currently we are now in /tmp directory:

[root@rhel jen]# cd /tmp
[root@rhel tmp]# smbclient //localhost/jen -U jen
Password:
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]
smb: \> ls
. D 0 Mon Aug 3 17:16:20 2009
.. D 0 Mon Aug 3 17:02:24 2009
.bash_logout H 24 Mon Aug 3 17:02:24 2009
.kde DH 0 Mon Aug 3 17:02:24 2009
.gtkrc H 120 Mon Aug 3 17:02:24 2009
.bash_profile H 191 Mon Aug 3 17:02:24 2009
text 6 Mon Aug 3 17:16:20 2009
.bashrc H 124 Mon Aug 3 17:02:24 2009

50521 blocks of size 262144. 27714 blocks available
smb: \> get text
getting file \text of size 6 as text (60000.0 kb/s) (average inf kb/s)
smb: \>

Now, When I browse /tmp directory i can see:

[root@rhel tmp]# ls
mapping-root text
[root@rhel tmp]#

Aim:

Seting up a Samba Server which avails documents and printer to only the system regular users and not to anyone outside.

Implementation:

1. Share Point ==> /export
2. All files owned by user called Ajeet Raina

Lets create a user :

[root@rhel tmp]# useradd -c “Ajeet Raina” -m -g users -p Oracle9ias ajeetr
[root@rhel tmp]# mkdir /export
[root@rhel tmp]# chmod u+rw,g+rw,o+rw /export
[root@rhel tmp]# chown ajeetr.users /export
[root@rhel tmp]#

Copy the files that should be shared to the /export directory.

0
0

Setting up a Simple Samba Share – Part I

Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments using the winbind daemon.In simple words, Samba is the standard Windows interoperability suite of programs for Linux and Unix.Since long back in 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others.

Samba

Today we are going to setup a simple samba share.

Setting Up a Simple Samba Share which can be accessed by anyone who has account on the Machine.

Backup the smb.conf file
——————————————

Locating the Correct Samba configuration File:

[root@rhel samba]# smbd -b | grep smb.conf
CONFIGFILE: /etc/samba/smb.conf
[root@rhel samba]#

[root@rhel ~]# cd /etc/samba/
[root@rhel samba]# cp smb.conf smb.conf.orig
[root@rhel samba]# > smb.conf
[root@rhel samba]# vi smb.conf

Add a simple Homes Share in smb.conf
——————————————————

[root@rhel samba]# cat smb.conf

[global]
workgroup = MIDEARTH
[homes]
guest ok = no
read only = no

[root@rhel samba]#

[root@rhel samba]# service smb restart
Shutting down SMB services: [FAILED]
Shutting down NMB services: [FAILED]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@rhel samba]#

Add a user called Jen
—————————–

[root@rhel samba]# useradd jen
[root@rhel samba]# passwd jen
Changing password for user jen.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Provide him with smb credentials(this is different from normal user/pass credentials)

[root@rhel samba]# smbpasswd -a jen
New SMB password:
Retype new SMB password:
Added user jen.
[root@rhel samba]#

Go to Start > Run > \\MachineIP
Login in through user/pass
Successfull !!!

You can see home directory [homes] and jen own home directory

Testing Your Samba Share
————————-

[root@rhel samba]# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section “[homes]”
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
workgroup = MIDEARTH

[homes]
read only = No
[root@rhel samba]#

List Shares Available on the Server
———————————————–

[root@rhel samba]# smbclient -L rhel -U jen
Password:
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]

Sharename Type Comment
——— —- ——-
homes Disk
IPC$ IPC IPC Service (Samba 3.0.25b-0.4E.6)
jen Disk Home directory of jen
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]

Server Comment
——— ——-

Workgroup Master
——— ——-
MIDEARTH BL07DL380G5

Done. Your first samba share is Ready !!!

0
0

Fog – An Open Source Cloning Solution

If you are a system admin who is still sticking to Clonezilla, you must probably look out to try FOG – a very fast and easy to deploy cloning solution. Compared to Clonezilla, Fog imaging process usually takes less than few minutes. With the current release, fog includes the ability and support for Linux and multiboot resizable imaging too. However,FOG can be used to image Windows XP, Vista, Windows 7 and Window 8 PCs using PXE, PartClone, and a Web GUI to tie it together.

foggu

I had one of my friend who runs cyber cafe business and keen on deploying the similar configuration on all the 50 Windows machine. I visited his cyber cafe in the inauguration day where I came up with the idea of cloning and rescue suite. I decided to help him out with the implementation of Fog – really a great tool.

  1. Installing Ubuntu 12.04.1

As a pre-requisite, install Ubuntu 12.04.1 on the physical machine.

Ensure Ubuntu Desktop packages are selected to be installed.

  1. Installing Fog Cloning Solution
  2. Open Firefox
    2. Go tohttp://www.fogproject.org and download FOG.
    3. Open Terminal Applications->Accessories->Terminal
    4. cd Desktop (Remember Linux is case sensitive)
    5. tar -xvzf fog*
    6. cd fog*
    7. cd bin
    8. sudo ./installfog.sh
    9. Select opt 2 Enter
    10. N Enter
    11. Default IP Enter
    12. You dont need to set up a router IP but I will in case I ever use the server for DHCP.
    13. Set up a DNS IP, just accept the default.
    14. No do not change the default network interface.(you may not get this prompt if you have 1 nic)
    15. I will not be using FOG for DHCP. (will require changing my current DHCP server.)
    16. Note your IP settings and continue.
    17. Enter to Acknowledge.
    18. (I like to notify the FOG group, they have made a great product and deserve my feedback, choice is yours here)
    19. gksu gedit /var/www/fog/commons/config.php and put your mysql password you typed during install in “MYSQL_PASSWORD”, “<passwordhere>” save and close. It has been noted that you also should change the MYSQL password here while you are at it /opt/fog/service/etc/config.php.
    20. Browse to http://localhost/fog/management
    21. Click install!
    22. Click to log in. You can now reach this webpage from anywhere on the network where your server is installed by using it’s ip address. eg http://192.168.0.100/fog/managementI would reccomend putting an A record in your DNS called FOGSERVER this will make things easier to remember.

default: fog/password

Creating an Image in FOG

  The following instructions walk administrators through the process of configuring a computer for image creation in FOG.

Create Image in FOG

Log into the FOG management console

  1. FOG management console URL or address is:

http://ip address/fog/management

  1. Click the Image Management icon
  2. Click New Image button in the left section of screen
  3. Enter the following Information
  4. Image Name: Use clear concise name
  5. Consider keeping name short and model or OS specific
  6. Image Description: Enter clear concise description
  7. Storage Group: Default
  8. Image File: Will automatically be entered. You may edit if you want
  9. Image Type
  10. Windows XP = Single Partition (NTFS Only, Resizable)
  11. Windows Vista/7 = Multiple Partition Image – Single Disk (Not Resizable)
  12. Click Add

Inventory Machine

  1. Boot host machine to FOG pxe boot menu
  2. Select Perform Full Host Registration and Inventory
  3. Enter the computer Host Name and press enter
  4. Leave IP Address field blank and press enter
  5. Press the ? and press enter to get the list of Image ID’s
  6. Enter the Image ID number
  7. Press the ? and press enter to get the list of Operating System ID’s
  8. Enter the Operating System ID number
  9. Choose Y or N to add to Active Directory
  10. NOTE: XP choose Y, Vista/7 choose N
  11. Leave Primary User field blank and press enter
  12. Leave both Asset #’s blank unless you utilize
  13. Select N as you do not want to Image this machine and press enter
  14. Enter “fog” and press enter
  15. Load machine with all software and drivers you need.
  16. Windows XP you need an image for each model
  17. Windows Vista & Windows 7 you can use the same image for any model but hard drive size can cause issues.

**DO NOT Activate Windows in Vista or 7**

Optional 

It is a good idea to change the default boot order to enable the network boot to be your first boot item. It is not required, however. All brands have a slightly different way of doing this. Check your manufacturer’s manual for assistance figuring out how to boot into the BIOS to make this change.

  1. Ensure all Windows Updates are Current
  2. Make sure all service packs are current
  3. Make sure current with .NET framework
  4. Install the FOG Client
  5. Enter the IP address of your FOG server
  6. Leave all other options checked
  7. Windows XP continue to STEP 13
  8. Windows Vista & Windows 7 continue to STEP 25

 

 Windows XP

  1. Install the Windows XP Service Pack 2 Support Tools
  2. http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38
  3. Download Windows XP Service Pack 3 Deployment Tools
  4. http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=673a1019-8e3e-4be0-ac31-70dd21b5afa7
  5. Open the deploy.cab file
  6. Select all files within
  7. Right Click and select Extract
  8. Select the following destination
  9. C:\Windows\System32\Sysprep
  10. NOTE: If the Sysprep folder doesn’t exist you need to create it
  11. Double Click the setupmgr.exe file in the C:\Windows\System32\Sysprep folder
  12. Click Next
  13. Select Modify Existing
  14. Click Browse Button
  15. Go to the C:\Windows\System32\Sysprep folder if not already there
  16. Click the drop down menu in the “Files of type” field
  17. Select Sysprep Inf Files (*.inf)
  18. Select the sysprep.inf file
  19. Click Open
  20. Click Next
  1. Make sure “Sysprep setup” is selected
  2. Click Next
  3. Select “Windows XP Professional”
  4. Click Next
  5. Select “Yes, fully automate the installation” if you use the same product key for all machines. If not select “No, do not fully automate the installation”
  6. Click Next
  7. Change the following settings:
  8. Name and Organization
  9. Time Zone

iii. Product Key

  1. Computer name
  2. Set to Automatically generate computer names (FOG will rename for you)
  3. Administrator Password
  4. Click File
  5. Click Save
  6. The save location should be C:\Windows\System32\Sysprep
  7. Click OK
  8. Close the Setup Manager program
  9. Run Disk Cleanup
  10. Select all items
  11. Click the More Options Tab
  12. Under the “System Restore and Shadow Copies” section click the Clean Up button
  13. Click OK
  14. Click the Delete Files button
  15. Run Disk Defragment Tool
  16. Run the defragmenting tool and ensure there is not more than 5%-10% fragmentation
  17. 1%-2% is ideal
  18. When ready to Sysprep the machine ensure you have installed all programs you want on the machine and removed everything you do not.

NOTE: You cannot turn the machine back on after SYSPREP’ing until after you have taken the image.

  1. When ready to sysprep the machine proceed to step 12.
  2. Navigate to C:\Windows\System32\Sysprep
  3. Double Click the Sysprep.exe file
  4. When the Sysprep program appears choose the following settings
  5. Options section
  6. Check “Use Mini-Setup”
  7. Shutdown Mode: “Shut down”
  8. Click Reseal button
  1. The machine will sysprep and then shut down
  2. Continue to STEP 37

**Leave the machine OFF until instructed otherwise**

Windows Vista & Windows 7

Windows Vista & Windows 7 do not have the Support Tools XP does. These instructions will cover this difference along with different SYSPREP steps.

Retrieving NETDOM.exe Instructions

You will need to perform STEP 6 in the Windows XP instructions on a Windows XP machine. You only need to do this one time.

Once installed navigate to C:\Program Files\Support Tools

Locate the NETDOM.exe file and copy

On a flash drive or network share you manage create a folder called “Support Tools”

Paste the NETDOM.exe file into the new Support Tools folder

  1. Copy the “Support Tools” folder (see “Retrieving NETDOM.exe Instructions”)
  2. Navigate to C:\Program Files
  3. Paste Support Tools folder into Program Files folder
  4. Path will be C:\Program Files\Support Tools
  5. NETDOM.exe will be inside the Support Tools folder
  6. Run Disc Cleanup Utility
  7. Check all items
  8. Click More Options tab
  9. In the System Restore and Shadow Copies section click Clean Up
  10. Click Delete button
  11. Click OK
  12. Click Delete Files button
  13. Run Disc Defragmenter Utility
  14. You can choose to simply Analyze the disc first. Your disc must be less than 15% fragmented. If it is higher then defragment it.
  15. I recommend defraging it anyway to get it as low as possible

**Ensure you are prepared to SYSPREP this machine as you will have to repeat the following steps if you have to boot the machine after SYSPREP’ing**

Optional

Past versions of FOG required Vista and 7 images to have the following three commands run immediately before continuing to STEP 23

Run CMD.exe as Administrator

bcdedit /set {bootmgr} device boot

bcdedit /set {default} device boot

bcdedit /set {default} osdevice boot

**It is not required to run these commands**

  1. Copy the unattend.xml file to the following location:
  2. c:\windows\system32\sysprep
  3. Run CMD.exe as Administrator
  4. Run the following command:
  5. cd c:\windows\system32\sysprep
  6. Now run the following command to sysprep the drive:
  7. sysprep /generalize /oobe /shutdown /unattend:c:\windows\system32\sysprep\unattend.xml
  8. SYSPREP will take a few moments to run
  9. The machine will shut down when done
  10. Continue to STEP 37

**Leave the machine OFF until instructed otherwise**

 

Uploading the Image

Choosing shutdown after task completion ensures you don’t begin unpacking your sysprep’ed machine by booting to Windows should the image upload fails.

  1. Log into the FOG Management Console
  2. Click the Task Management icon
  3. Click List All Hosts
  4. Locate the host you Inventoried in the Inventory Machine section of these instructions
  5. Click the Upload arrow for the indicated host
  6. Add a check to the following option
  7. Shutdown after task completion?
  8. Click Upload Image
  9. Ensure the host machine PXE boots and not to the hard drive

**NOTE: If the machine begins to boot to Windows for any amount of time you will need to SYSPREP again if your image has not been uploaded successfully

Test Image

  1. When the image has been uploaded test it on a different machine
  2. Ensure you use the same make and model if using a Windows XP machine
  3. Vista and Windows 7 machines are not model or brand specific but you may run into driver issues. You will need to address those issues either prior to upload or after.

46. Test as many possible scenarios prior to implementing your image to production

0
0