HOWTO: Add NFS share in RedHat Enterprise 4

Last week I enabled our server to share a directory using NFS. This should not really have been a very complex task. But it turns out that with RHEL4, anything can be more complicated than it seems at first… at the end I also include how to get Network Installation Services (NIS) running so that you can install RHEL (or many other Linux systems) over either NFS or HTTP.

As usual, resources on the Internet are, for lack of a better word, “scattered”… so in an effort to improve that, I will post my procedure here.

I am using RedHat Linux Enterprise 4 with a Firewall enabled (which causes most of the frustration).

Following is the procedure. Please, if you use this and have any comments or suggestions, feel free to email me or post a comment (reg required) so that I can add your experience to the howto.

Here goes:

Procedure for creating NFS shares on RedHat Enterprise 4 ES with Firewall and enabling NIS (Network Install Service).

  1. Create directory for NFS export at (eg. /var/data/public). Directory structure must have read access for All or Everyone (I use 755) from / level.
  2. Edit: /etc/exports (we’ve created a read-only export that is only accessible from our local subnet)insert as follows (all on one line):
    • /var/data/public/NFS/RHEL4 192.168.1.0/255.255.255.0(ro,insecure,async)
    • You can also do this using the control panel at the GUI in System Settings.
  3. Next… we opened ports on the Firewall to allow access to NFS clients. In GUI “Security Settings” panel… open following ports in Firewall:
    • 111:tcp, 111:udp (for portmap)
    • 2049:tcp, 2049:udp (for nfsd)
    • 32767:tcp, 32767:udp (for mountd)
  4. Finally. We must modify the nfs startup script to bind mountd to a specific port. Otherwise it use a different port everytime we restart the service.
    • in /etc/init.d/nfs look for:
    • “$MOUNTD_PORT”
    • Before this line… add a new line:
    • MOUNTD_PORT=32767
  5. Now restart the nfs service with “service nfs restart”
  6. Test the service on your client.
    • If you get a “BAD MNT” error, then double check that mountd is using the correct port (rpcinfo -p).
    • If you get a “RPC connect failure”, then check that the firewall has the correct ports open.
    • If you get a “permission denied” error, check that the directory has read/execute access for “all”… and that all directories up to your NFS export also have read/execute permissions for “all”.
  7. You can now add files to the NFS share.
    • If you want NIS, simply insert Disks 1 through 4 and type (as root):
    • cp -var /path/to/cdrom/RedHat /var/data/public/NFS
    • This will copy all files and directories including base and RPMS to the NFS folder
    • Once all the files have been copied… you should be able to use /var/data/public/NFS/RedHat as your path for NIS installs.
    • You can also enable NIS over HTTP by creating a new directory or virtual host in your httpd.conf file and pointing it at your NFS directory. Make sure to enable directory listing (with a .htaccess file or in the conf)

Political Masturbation through War Fighting

A plausible conversation at the White House… a couple weeks ago:

(warning course language)

Just another day at the White House:

US General in Iraq via VideoPhone: Mr. President, sir, our troops seem to be sitting around a lot lately.

Bush: Our troops are the best in the world.

US General: Sir, Yes Sir. But we’re doing Dick all.

Rumsfeld: Sorry?

US General: Sir, Yes Sir. We have not engaged Terrorists on a significant level for quite some time sir. We need another Fallujah to break some ground.

Bush: What about where that Church got blown up a while back? There must be a crap load of terrorists there if they blew up the church!

US General: Yes Mr. President, we do believe there is an insurgent presence there. But we have no US Intelligence assets there indicating a large concentration.

Rumsfeld: Hey, what about the Iraqis! They might know something.

US General: Sir, Yes sir, However we are not comfortable with their level of objectivity, sir. They f*&ing hate each other, sir.

Bush: Are there terrorists in the city or not General.

US General: Sir, Yes most likely there are sir.

Bush: Well shit, then lets get in there and flush’em out! Maybe Zarquawi is in there. Use some Iraqi forces too. I want to see Iraqis killing those terrorists!

US General: Sir, Yes sir.

Rumsfeld: And make sure you tell the Media. Send in the Marines. This will be the biggest operation since the invasion! The Terrorists won’t see it coming! Make sure you tell the Media that!

US General: Sir, Yes sir… should we attempt to apprehend any suspects in the murder of that famous Iraqi journalist?

Bush: Didn’t she work for Al Jazeera? I thought we shut those terrorist loving bastards down?

Rumsfeld: Sure go for it General. Might make a nice story. I want to see results General. I want these insurgents to know they don’t run the country. WE DO.

General: Sir. Yes Sir! Thank you Mr. President.

A plausible thought process, afterwards… courtesy, George W. Bush

Fuck, This whole fucking operation has gone to shit. Man. I’m depressed.

I need some potato chips.

Fuck, what am I gonna do. All I wanted to do was help these fucking Iraqis.

Geezus now they’re all killing each other. Fuck. It must be that fucking Bin Laden and Zarquawi. Why can’t I fucking find them.

I need to sit down…

Fuck, we look like fuckin’ morons in Iraq. Iran has more fucking influence than we do. Fucking nutbars and their nukes. This operation should help. It better fucking help. Or we’re fuckin’ screwed. Fucking iraqis will think we’re idiots if this doesn’t turn anything up.

I love those bloody marines though, they’re fucking incredible. Can do anything.

1500 troops… (Ooo.)

Apache (mmmm) helicopters, (*hmprf*)

Iraqi forces too… (mmmm ya they work it.)

All those gunships! Wonder if they’ll use some Blackhawks (Ohh! Mmm.. fuck)

Man.. if we could get Zarquawi… (mmm, ohh, mmmm oohhh ya)

Fuck. Ya that made me feel better.

Iraq: US sits Idly by as Green Zone plot Foiled

It seems Iraq really is teetering on the cliff of oblivion. It appears as though yesterday they dodged another major bullet.

Minister of Interior Bayan Jabr announced that a plot had been foiled to place hundreds of Sunni Arab troops actually loyal to the insurgency in position at the Green Zone and then to have them rush embassy offices and take diplomatic hostages.
There have been rumors for weeks that the Sunni Arab guerrillas were preparing to “rise up” and take the capital. This was probably the plan to which the rumor mongers were referring.

Still believe Mr. Bush when he tells us that the Iraqi Army is “standing up” ready to protect Iraq? Well, it may be, just not in the fashion Mr. Bush may think.

And what have the American forces in Baghdad been doing to prevent this sort of “sectarian violence” (cause you know, it’s NOT a civil war…).

Not much,

The column of cars was passing through the town of Hassuwa when the cracks of gunfire erupted: sniping between followers of one of Iraq’s most important Sunni clerics and the Shiite policemen who were escorting Bahjat’s funeral convoy.

Those first bullets drew more bullets, and soon the air was crackling.

Dogs yelped in fear. From the minarets of the town’s mosques, the town muezzins called for jihad. A convoy of U.S. military Humvees rolled by midway through the battle. The soldiers kept going, leaving the Iraqis to fight among themselves.

“Please call the interior minister and tell him that our convoy with Atwar Bahjat has been attacked,” Iraqi journalist Fatah Sheik barked into his cellphone, crouching close to the ground. “Can’t you hear the shooting? Please tell the minister.”

The violence was captured in excruciating detail by Al Arabiya cameramen.

What exactly is the purpose of the US Military in Iraq? Do they even know anymore? If they aren’t there to “make peace” then what? They’re obviously not “policing” anything, though they do seem to arrest a number of folks. What, or who are they protecting if they aren’t protecting the Iraqi people?

Apparently today we’re going to hear the United States reiterate it’s position that preemptive action is warranted when there is a “perceived” threat.
It says,

“If necessary, however, under long-standing principles of self-defence, we do not rule out use of force before attacks occur, even if uncertainty remains as to the time and place of the enemy’s attack,”

Why? Because Iraq is such a shining example of that being successful? Come on. Even the Bush administration must recognize their own folly. Or perhaps not.

Maybe the US *should* stay in Iraq indefinitely. At least that way their resources will be so tied up and their bank accounts so drained that they simply won’t be able to launch a pre-emptive attack on any other (likely neighbouring) country.

Korean PM resigns for playing Golf

How different politics, and honour, can be in other countries.

South Korea’s prime minister offered his resignation and an apology Tuesday for playing golf while a national rail strike disrupted his country.

Lee Hae-chan’s resignation was accepted by the country’s president

If only other leaders were so honourable and held to such impeccable standards.

Need I remind my readers of our own leaders transgressions? Which include…

in Canada:
Allowing party hacks to get rich on taxpayer money
Ignoring promises made in an election about ‘integrity’ and instead allowing an MP to completely betray the majority of his own constituents.

in the US:
continuing a “vacation” while there is a national catastrophe in New Orleans (killing or displacing thousands)
starting a war without UN approval nor sufficient military resources (and then failing to “win the peace”… causing untold 100s of thousands of deaths)
spying on your own people.

I think there was a time when, at the slightest whiff of scandal, this sort of resignation happened on a regular basis in both Canada and the US. It may have even been as recently as 20-30 years ago. Now though, greed, power, and corruption seem to have taken hold for good, and a powerful cabinet minister, Prime Minister, or President resigning of his own free will is… well…

laughable.

1 million barrel disruption threatened… Alaska spill

Last month, guerrillas and “terrorists” in Nigeria threatened to shut down 30% of Nigeria’s oil exports.

They managed 20%… about 450,000 barrels per day of oil from Nigeria’s usual output.

This month, they have apparently, raised the bar a little higher.

They promise to remove a further 1 million barrels of oil in March.

If they are as successful as they were last month that likely means a drop in exports of about another 750,000 barrels… bringing the total disruption to about 1.2 million barrels/day.

That’s roughly half of Nigerias total oil production capabilities.

What’s more, it looks like the oil that has already stopped flowing, won’t be coming back anytime soon as the “terrorists” continue to hold hostages of the various companies (local or international).

Add to that the news that there has been a major oil spill in Alaska.

The Alaska Department of Environmental Conservation estimated that a minimum of 201,000 gallons (4,785 barrels) spilled at Prudhoe Bay, the largest U.S. oil field.

Officials expect the cleanup to take four to six weeks.

The shutdown caused BP to lose about 100,000 barrels of daily production, although the company has been able to divert production of about 5,000 of those barrels through a different pipeline, BP spokesman Daren Beaudo said.

The Prudhoe Bay field normally produces about 470,000 barrels a day, a little more than half of all North Slope oil output.

You can expect a serious jump in your fuel prices… if they haven’t already.