Deploy Windows from Linux TFTP server using PXE

July 9, 2009

# apt-get install tftpd-hpa

# apt-get install dhcp3-server

# apt-get install samba

# apt-get install cabextract

# apt-get install syslinux

# apt-get install wget

We might also want some other packages for debugging:

# apt-get install tftp-hpa

# apt-get install ethereal

# apt-get install smbclient

# cd

# wget http://oss.netfarm.it/guides/ris-linux.tar.gz

# tar xvfz ris-linux.tar.gz

# cp –a ris-linux/* /usr/local/bin

Configuring DHCP

subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.100 192.168.0.200; option broadcast-address 192.168.0.255; option routers 192.168.0.17; option domain-name-servers 192.168.0.17; option domain-name “lab2.local”; option subnet-mask 255.255.255.0; allow bootp;

host lab2-18

{ hardware ethernet 00:01:02:03:04:05; fixed-address 192.168.0.18; server-name “192.168.0.17”; next-server 192.168.0.17; filename “startrom.0”; } }

Configuring TFTP

/etc/default/tftpd-hpa:

RUN_DAEMON=”yes”

OPTIONS=”-l -s /tftpboot -m /etc/tftpd-hpa.rules -vvv”

/etc/tftpd-hpa.rules

rg \\ /

The Boot Files

# mkdir /tftpboot

# cd /tftpboot

# mount /media/cdrom

# cabextract /media/cdrom/I386/STARTROM.N1

# ln –sf startrom.n12 startrom.0

We need the NTLDR and NTDETECT.COM files as well:

# cp /media/cdrom/I386/SETUPLDR.BIN /tftpboot/ntldr

# fixloader.py /tftpboot/ntldr

# cp /media/cdrom/I386/NTDETECT.COM /tftpboot/ntdetect.com

/tftpboot/winnt.sif

[SetupData]

OsLoadOptions = “/fastdetect /minint”

SetupSourceDevice =

“\Device\LanmanRedirector\server\share\path

[UserData]

ComputerName = WindowsPE

In the SetupSourceDevice line, be sure to specify the server name, share name and path name. For example: SetupSourceDevice = “\Device\LanmanRedirector\lab2-17\RemInst\winpe”

Configuring Samba

/etc/samba/smb.conf

[global]

oplocks = false

level2 oplocks = false

encrypt passwords = true

passdb backend = tdbsam guest

obey pam restrictions = yes

guest account = nobody

invalid users = root

socket options = TCP_NODELAY

null passwords = true

[RemInst]

path = /tftpboot

browsable = true

read only = Yes

guest ok = Yes

[images]

path = /images

browsable = true

read only = Yes

guest ok = Yes

Copying the WinPE Files

# mkdir /tftpboot/winpe

# cp –a /media/cdrom/* /tftpboot/winpe

Starting the BINL Server

This uses the BINL server found in the ris-linux.tar.gz file. First you need to fix the case of some of the files in the OSD image. Edit the /usr/local/bin/fixup-repository.sh and point the REP variable at /tftpboot/winpe. Then run it.

# fixup-repository.sh

Then we need to generate a driver database. This is equivalent to the .PNF files that RIS uses. Unfortunately, as it stands, the script does not correctly deal with newer, IA64-enabled drivers. We need to make a couple of changes. There are two lines in the file that look like this:

if check[-1].startswith(‘nt’): They need to read like this.

if check[-1].startswith(‘ntx86’): Then run it:

# cd /usr/local/bin

# ./infparser.py /tftpboot/winpe/i386/inf

With the OSD image we used in the example, the result of running the command was: “Compiled 733 drivers”. Now you can run the BINL server:

# /usr/local/bin/binlsrv.py


Red Hat Enterprise Linux Subscription comparison

July 9, 2009
Red Hat Enterprise Linux 2.1, 3, 4 Red Hat Enterprise Linux 5
Red Hat Enterprise Linux ES, Basic Red Hat Enterprise Linux, Basic
Red Hat Enterprise Linux ES, Standard Red Hat Enterprise Linux, Standard
Red Hat Enterprise Linux ES, Premium Red Hat Enterprise Linux, Premium
Red Hat Enterprise Linux AS, Standard Red Hat Enterprise Linux Advanced Platform, Standard
Red Hat Enterprise Linux AS, Premium Red Hat Enterprise Linux Advanced Platform, Premium
Red Hat Enterprise Linux WS, Basic Red Hat Enterprise Linux Desktop + Workstation option, Basic
Red Hat Enterprise Linux WS, Standard Red Hat Enterprise Linux Desktop + Workstation option, Standard
Red Hat Enterprise Linux WS HPC Compute Node (2) Red Hat Enterprise Linux for HPC Compute Nodes, Basic (Up to 2 sockets)
Red Hat Enterprise Linux WS HPC Compute Node (4) Red Hat Enterprise Linux for HPC Compute Nodes, Basic (Up to 4 sockets)

Using zebra for OSPF

July 9, 2009

Zebra

Grab zebra.conf and ospfd.conf, copy them to /usr/local/etc.

Now start zebra:

# service zebra restart

And connect to the zebra daemon:

# telnet localhost zebra

If you can’t connect then check /var/log/zebra.log to see if it has any excuses.

The default password is ‘fish’, now we are going to change it.

First we put zebra in ‘enable’ mode (this is a lot like suing to root).

zebra> enable

Yup, the password is fish again. The prompt should change to a # after you’ve typed it. (you should see something like this):

zebra> enable
Password:
zebra#

Now we need to tell zebra we’re going to configure it, so type:

zebra# configure terminal

At this point it’s probably helpful to point out that zebra supports command line editing, tab completion, and command history…

If your offered multiple choices when you hit tab you can type ‘?’ to get brief help on the commands available.

Your screen should look something like this:

zebra# configure terminal
zebra(config)#

First things first, lets change those passwords

zebra(config)#
zebra(config)# password “passwd”
zebra(config)# enable password “passwd”

Ok, lets check the changes we made, first, type exit to get out of configure mode, then:

zebra# show running-config

You can abrieviate it to sh run if you like.

You can now page through the config file, now with new encrypted passwords!

You’ll also notice something else – remember all those comments that where in the config file? Well zebra ignores them, and they will dissapear… (yes, this does suck).

Press space to page through the end of the config file

Now we’d better change the hostname to the hostname (or nodename) of this box. This will help if you ever cut and paste stuff from zebra to show other people for debuging reasons, or if you have multiple machines.

Enter config mode as we did before and then type:

zebra(config)# hostname “yourhostname”
“yourhostname”(config)#

As you can see the prompt changes to the hostname you just set

Saving your changes

This is important! if you forget to do this all your changes will be lost

in enable mode type copy running-config startup-config, you should see something like this:

“yourhostname”# copy running-config startup-config
Configuration saved to /usr/local/etc/zebra.conf
“yourhostname”#

copy running-config startup-config can be, (and usually is), abbreviated to cop run sta. Say it out load in any pub and anyone who’s ever been anywhere near a cisco will look around them in surprise and alarm.

Seriously tho, this is the most common cause of problems with zebra and cisco IOS, you forget to save the config, the box gets rebooted later (weeks? months?) and it dosn’t work.

So as you lie awake in bed tonight repeat cop run sta to yourself 50 times. One day you may even thank me for it.

On another note (unless your configureing static routes) you’ll probably never need to touch zebra again.

ospfd

Ok, run ospfd:

# service ospfd restart

and connect to it:

% telnet localhost ospfd

Now log in as you did with zebra, and change the passwords and the hostname.

list interfaces
choose which ones to use
enable ospf
router-id
redistribute connected route-map just-10
passive-interface unused interfaces
add a 'description' to the interfaces you plan to use.
add a 'cost' to the interfaces you plan to use.
generate a md5 'key' (just 8 hex digits).
then, in the 'router ospf' section:
network base/mask area 0
now exit out of config mode
'sh ip ospf neighbor'
'sh ip ospf database'
run a packet sniffer to check
'terminal moniter' to get logging to your terminal
'no terminal moniter' to switch it off.
fiddle.

List of Linux distributions

July 9, 2009

* Debian-based
o 1.1 Knoppix-based
o 1.2 Ubuntu-based
+ 1.2.1 Official distributions
+ 1.2.2 Contributed distributions
+ 1.2.3 Unofficial distributions
* Gentoo-based
* RPM-based
o 3.1 Fedora-based
o 3.2 Red Hat Enterprise Linux-based
o 3.3 Others (RPM-based)
* Slackware-based
o 4.1 SLAX-based


Login as root in ubuntu linux

June 6, 2009

By default the root user can not login in ubuntu linux, here I’m telling the steps to activate root login

1. Give password for root by loging as user
#sudo passwd root

2. Edit the gdm.conf configuration file
#sudo vi /etc/gdm/gdm.conf
Change “AllowrootLogin=false” into      “AllowrootLogin=true”


Accel IT Academy, Thrissur

August 4, 2007

Hi All,

This blog was created by Accel IT academy, Thrissur to provide solutions for hardware/network problems.. Hope this blog will be helpfull to all..