Euro May Cash in on its Anti-Dollar Role Before the ECB Decision

The dollar is near collapse; and its liquid counterparts stand to reap the benefits of the potential cross-currency winds. However, from a fundamental standpoint who stands to benefit the most? Those pairs that have pressed all the way to the edge of their recent historical highs against the ailing reserve currency (the British pound or Aussie dollar) are heavily dependent upon unpredictable risk appetite. The stalwart among the group is the euro. Liquidity, a steady yield, bullish growth forecasts and a policy authority that is confident financial conditions are sound make for an appealing alternative for the most actively traded currency in the market. However, is the outlook truly as bright as the market is pricing in? More importantly; do speculators even care?

In trying to approach the first question, it is important to remember that valuing a currency is always done on a relative basis. For example, the euro could still rise against one of its major counterparts even when the economy is sinking as long as the Euro Zone is contracting at a slower pace. That being said, the objective answer is that the economy is not as stable as the strength of the currency would suggest. We will not see the first round of the German and Euro Zone second quarter GDP figures until August 13th. Nonetheless, expectations will readily discount each indicator that crosses the wires until then. This past week’s data further exposed a significant discrepancy between expectations and actual data. Surveys for consumer, business and economic sentiment all reported improvements in their July readings (though they were mostly still below the net expansion/contraction line). In contrast, the German unemployment rate has held at its highest level since December of 2007. Consumers are the foundation for economic health and will determine whether the Euro Zone will struggle to recovery or truly return to growth. Retail sales, factory orders and industrial production will all factor in to this outlook.

Each of these indicators will feed into the market’s unobserved and dynamic growth forecasting model; but the true benchmarks for economic activity will come from the ECB. The central bank is scheduled to announce rates on Thursday and both the market and economists suspect the benchmark will be left unchanged at 1.00 percent. The real value from the event comes from the statement that accompanies the announcement and President Jean Claude Trichet’s forum with the press shortly after the official release. Political pressure has intensified from some of the region’s largest economies to reign in stimulus to avoid stoking inflation. What’s more, the RBA has set a precedence in suggesting it was taking a cautious, hawkish turn; and the ECB no longer carries the burden to be the first. These factors aside though, the economy is certainly not stable enough to take such a passive (much less hawkish) approach. There are still economies suffering severe recessions; and even those that are considered relatively strong are still contraction. Should the group remove the safety net too soon, they run the risk of exacerbating a pull back that develops later.

Another generally accepted truism that has worked in the euro’s favor is that the region has remained otherwise financial sound while the UK and US were nearing structural collapse. However, many of the biggest risks to the broader markets going forward come from the Euro Zone. A premature draining of financial aid threatens to choke the economy, regional banks have yet to write off their losses (they will) and Eastern Europe threatens to default on its loans to the EZ in masse. All of these are considerations to keep in mind. – JK
US Dollar Reversal and Breakout a Matter of Time – But When?

The US Dollar finished the week lower against foreign counterparts, but it failed to break below key range-lows despite sharp S&P rallies and fairly disappointing domestic economic developments. The highly-anticipated US Gross Domestic Product showed that the economy contracted less than expected in the second quarter of the year, but noteworthy downward revisions to earlier figures clearly dampened optimism on growth. Government data showed that the economy saw its worst quarter-on-quarter performance in 27 years in Q1. The slower rate of contraction in Q2 may have calmed some nerves, but truly dismal Personal Consumption figures underlined that consumers—the engine of earlier economic growth—remains heavily subdued. The upcoming week brings infamous Non Farm Payrolls data to the fore, and it will be critical to watch for any signs that the US Dollar could finally break its range versus major forex counterparts.

Week in and week out we have discussed potential scenarios for a US Dollar breakout, but FX markets have shown little willingness to push the USD beyond its trading channel through directionless summer trade. Of course, forex market volatility tends to be mean-reverting over the medium-to-long run. Lengthy periods of consolidation most often lead to sharp breakouts, but the timing of said shift remains anything but clear. Forex options markets volatility expectations are near their lowest levels since August, 2008. Anecdotal evidence tells us that trading volumes have fallen sharply through the summer—theoretically making it easier for a big traders to force volatility. Yet few have shown the appetite for moving markets, and we anxiously await signs that the US dollar may finally break out of its consolidative range.

Can the US Non Farm Payrolls report and other key data releases finally break us from our recent range? We will certainly know the answer to this question once the coming week is through, but it is worthwhile to discuss possible scenarios in which the US Dollar could finally move sustainably higher or lower against the Euro and other key counterparts. Consensus forecasts imply that markets expect broad improvements in key NFP and similarly market-moving ISM Manufacturing and Services results. Given the general uptrend in equity markets and general economic mood, such predictions come of little surprise. Yet lofty expectations leave significant room for disappointment, and the very fact that the S&P 500 has rallied so substantially through recent weeks leaves it at risk for a noteworthy correction.

Forex futures and options data shows that traders remain extremely net-short the US Dollar, and our bias remains bullish as a result. The key difficulty remains the timing of any such correction, as market sentiment can remain at extremes for extended stretches. In other words, we know it’s all a matter of time. Given enough of it, we may expect the Greenback to finally break above the Euro 1.4350 mark or below 1.3800. Given enough time, traders will unwind extremely one-sided US Dollar short positions and bring a noteworthy correction. Whether that may be in the week ahead is anyone’s guess, however, and it will be critical to watch for signs of a sustained reversal. Said signal could come from the S&P 500 and other key financial market risk barometers. - DR
Life insurance industry hit by slowdown - min

NEW DELHI (Reuters) - Slowdown in the economy has trimmed growth in premium income of Indian insurers in FY09, a junior finance minister said in a written reply to Parliament on Friday.

Namo Narain Meena said the total premium income of market leader Life Insurance Corp grew 4.45 percent to 1.56 trillion rupees in FY09, lower than the 17.19 percent expansion seen in 2007/08.

The overall premium income of all the life insurers stood at 2.24 trillion rupees at the end of FY09, compared with 2.01 trillion rupees in the previous year.

"In the year 2008/09, the pace of growth in the insurance sector has slowed down which may be a result of the economic slowdown during the period," Meena said.
Adani Power IPO oversubscribed

The initial public offer (IPO) of Adani Power Ltd, a subsidiary of Ahmedabad-based Adani Enterprises, has marked the return of the institutional investors' appetite for public offers. Foreign institutional investors (FIIs), banks, insurance companies and mutual funds have responded overwhelmingly to Adani Power's maiden issue, which closed on Friday.

The company seeks to raise about Rs 2,500 crore from the offer, for which the price band was fixed at Rs 90 to Rs 100 per share. "The over subscription of the Adani Power IPO shows that investor appetite is definitely back especially in the QIB space. Lanco had also launched a QIB of Rs 750 crore on Thursday and even though it is much smaller in size compared to Adani Power, the response has been very good," said Lalit Thakkar, director, Angel Broking.

The Adani Power issue received over 6.5 times subscription to its issue of over 24.87 crore shares, according the subscription figures available on the Bombay Stock Exchange (^BSESN : 15924.23 +253.92) website till 1800 hours. The response from retail investors to Adani Power IPO was lukewarm. Almost all the bids received were at the upper end of the price band, and a large part of it from long-term investors.
Rupee at near 2-mth high on strong equities, weak dollar<

MUMBAI (Reuters) - The rupee rose to its highest in nearly two months on Monday, extending gains into a third straight session, as a falling dollar encouraged buying in the local unit and buoyant equities raised hopes of capital inflows.

The partially convertible rupee ended at 47.635/645 per dollar, off an intraday peak of 47.63 -- its highest since June 12, and about 0.6 percent stronger than Friday's close of 47.93/95.

"The dollar's fall had a significant impact on the rupee's rise today. We would see the rupee in the 47.50-47.70 range tomorrow," a senior trader at a foreign bank said.

The dollar hit its lowest level in 2009 on Monday as solid banking earnings and a U.K. survey showing manufacturing activity unexpectedly expanding boosted the view that the global economy is over the worst.

Higher share prices also bolstered sentiment in favour of the local unit, traders said.

The main share index climbed 1.6 percent on Monday to its highest close in 14 months, led by energy giant Reliance Industries (RELIANCE.NS : 2017 +61.6). Traders said the market picked up steam after European markets rose to a new high this year on encouraging news from banks.

Foreign funds have bought almost $7.5 billion worth of shares this year, following net sales of more than $13 billion in 2008.

One-month offshore non-deliverable forward contracts were quoting at 47.64/74, little changed from the onshore spot rate.

(For more news on Reuters Money click http://in.reuters.com/money)

Rupee at near 2-mth high on strong equities, weak dollar<

MUMBAI (Reuters) - The rupee rose to its highest in nearly two months on Monday, extending gains into a third straight session, as a falling dollar encouraged buying in the local unit and buoyant equities raised hopes of capital inflows.

The partially convertible rupee ended at 47.635/645 per dollar, off an intraday peak of 47.63 -- its highest since June 12, and about 0.6 percent stronger than Friday's close of 47.93/95.

"The dollar's fall had a significant impact on the rupee's rise today. We would see the rupee in the 47.50-47.70 range tomorrow," a senior trader at a foreign bank said.

The dollar hit its lowest level in 2009 on Monday as solid banking earnings and a U.K. survey showing manufacturing activity unexpectedly expanding boosted the view that the global economy is over the worst.

Higher share prices also bolstered sentiment in favour of the local unit, traders said.

The main share index climbed 1.6 percent on Monday to its highest close in 14 months, led by energy giant Reliance Industries (RELIANCE.NS : 2017 +61.6). Traders said the market picked up steam after European markets rose to a new high this year on encouraging news from banks.

Foreign funds have bought almost $7.5 billion worth of shares this year, following net sales of more than $13 billion in 2008.

One-month offshore non-deliverable forward contracts were quoting at 47.64/74, little changed from the onshore spot rate.

(For more news on Reuters Money click http://in.reuters.com/money)

Forex reserves fall by $560 m

Mumbai: Forex reserves fell by $560 million to touch $263.917 billion for the week ended July 10, according to the latest figures from the Reserve Bank of India. The moderate fall in reserves is mainly on account of currency revaluation, said a forex dealer with a private bank.
Most Read
India Inc cautiously optimistic; 6% firms cut salary
Corporate India's hiring up 8% in June
Mahindra Satyam seeks more time
When TV remote can double up as phone
Wyeth's 7-in-1 vaccine

This is the second consecutive week that forex reserves have declined.

In the earlier week, the foreign exchange reserves had fallen by $107 million to $264.477 billion.

In the week under consideration, foreign currency assets fell by $559 to $252.873 billion. Foreign currency assets expressed in US dollar terms include the effect of appreciation or depreciation of non-US currencies such as Euro, Sterling and Yen held in reserves.

Gold and SDRs were unchanged at $9.8 billion and $1 million respectively.

The reserve position in the IMF fell by $1 million to $1.243 billion.

Next week, the rupee movement will depend on the domestic stock market, the dealer said. "The rupee could be under pressure because of month-end demand. It could fall to 48.85-49," the dealer said.

How strong is dollar-commodities link?

One of the most enduring perceptions in global markets is about the inverse relationship between the US dollar and commodity prices. In fact, such an inverse relationship and of the causation – running from the dollar to commodities - is considered almost axiomatic particularly when the dollar is on a weakening mode. Headlines such as "Tumbling dollar lifts metals on LME", "Gold hits new high as dollar crashes" and "Weaker dollar to push crude higher" are well reflective of this widely held view.
Also see
Six hot stocks
The AX effect from HP
Mitsubishi's e-car
Jewellery watch
Wish-list for a dream Budget
Intraday - Make money in stock market
Track your stocks here | Auto

How valid is this perception? Is it supported by price movements in the dollar and commodities over long periods of time? Going beyond the validity of this relationship at the level of financial/commodity markets (from a trading perspective), how significant is this question at the level of economic policy formulation? If it can be established that the perceived dollar-commodities link is tenuous, at best, will that provide any signal for policymakers, particularly in emerging market economies (EMEs), such as India?

More India business stories

These are the questions which come to the fore in the backdrop of the fairly sharp rise in commodities prices in recent months. This has come despite the dollar broadly holding its own against other major global currencies in the past few months. Indeed, despite the magnitude of problems the US economy (and the dollar potentially) faces, the US currency, on average, has remained stable against a basket of the currencies of its important trade partners. This means that while the dollar has lost value against some currencies, it has gained against others.

This development in the dollar-commodities complex, therefore, has been at variance with the widely held perception that rising commodities should be accompanied by a crashing dollar.

To be sure, this development is in the short-term and certainly cannot provide evidence for the existence/strength of any long-term relationship or otherwise between the dollar and commodities.

What history says

What is the evidence then from the long-term data on dollar and commodity prices?

Statistical analysis (static correlation analysis) of the historical returns on dollar and commodity prices shows that the widely held view about a "strong" inverse relationship between the two is not supported - both when the dollar is on the ascendant as well as when the US currency is on a declining trend.

The statistical analysis does support the a priori expectation of a negative relationship between the two. Global commodities, after all, are priced in dollars and other things remaining equal, price movements in the two variables should be in opposite directions.

But, importantly, the historical data show that the relationship goes only that far. Other factors have remained same only to the extent of not disturbing a basic, negative relationship between the two variables.

But, going further, these other factors have had a dominant influence on the level and direction of commodities prices in the past decade and more.

For the data analysis, we considered two time periods - one during which the dollar was rising and the other during when the dollar was on a declining trend. The dollar price studied here is the US currency's effective exchange rate (index) - this gives a summarised, average measure of the US currency against its major trading partners.

The dollar strengthening period is between May 1995 and April 1999 (remember the dollar hit its all-time low of 80 yen and 1.35 German marks in April 1995. From thereon, it was a recovery for the US currency - well captured by the "strong dollar" policy of Robert Rubin).

The weak dollar period has been taken as between May 2005 and April 2009. This period saw the US currency quoted at as low as 1.65 units to the euro, two units against the pound and at 90 yen - all close to its pre-April 1995 lows).

As for commodities, we have taken the time series data on gold, spot crude oil and an index of base metals prices.

Interpretation of results

As can be noted from the table, the correlation between the dollar and commodities, though negative, is quite weak. At -0.57, the correlation between gold and dollar is the highest in the 2005-2009 period. Despite this correlation estimate being statistically significant (that is, we can be 95 per cent confident that the actual correlation between the two is not zero and could, in fact, be even the estimated -0.57), it means that just around 30 per cent of the moves in one variable are in tune with the moves with the other. The relationship is even weaker for spot crude oil and base metals.

The weak relationship inference is more valid in the 1995-1999 period.

As can be seen, the correlation estimates are not even statistically significant for crude oil and base metals in that period. This means that there is probably zero correlation between the two and the dollar.

Another inference that can be made is that the relationship between the dollar and commodities (though weak overall) is (relatively) stronger when the dollar is on a weakening trend.

This can be explained as (partly) due to the portfolio diversification and risk minimisation strategies of investors exposed to dollar assets.

The macro signal

Going farther, these statistics also provide some signals for macroeconomic policymaking. The analysis shows that the relation between the dollar and commodities is not secure. Even during the recent period of fairly severe dollar weakness, the sympathetic movement in commodities was limited. Forces larger than the dollar's value seem to have played a dominant role in driving up commodities prices strongly in the period up to July 2008. One such key force was the pressure of demand from large EMEs such as China and India.

Per contra, we can expect that even if the dollar were to register a strong performance in the ensuing period, global commodities prices need not necessarily weaken.

More India business stories

This dynamic probably has to be factored into demand (and inflation) management policies in the EMEs. We cannot explain away accommodative policies - fiscal and monetary - on the ground that global commodities prices are being driven by the dollar. Historical data seem to point otherwise.

India Forex Reserves Increase

Friday, the Reserve Bank of India said in a report that nation's foreign exchange reserves stood at US$ 267.711 billion as on July 24, up from US$ 266.187 billion as on July 17.

At the same time, gold reserves remained unchanged at US$ 9,800 billion. Foreign currency assets amounted to US$ 256.657 billion, larger than the US$ 255.138 billion in the previous week.

Meanwhile, nation's reserve position with the International Monetary Fund totaled US$ 1.253 billion versus US$ 1.248 billion in the preceding week.

Forex Market in India - Foreign Exchange Markets in India

Since the onset of liberalization, foreign exchange markets have witnessed explosive growth in trading volume. The importance of the exchange rate to the Indian economy has also been greater than ever before. While the government has explicitly adopted a flexible exchange rate regime, in practice the rupee is one of most efficient trackers of the US dollar. Apprehensions of capital flow-driven currency crisis have held India back from capital account convertibility though the debate continues. The rupee’s deviations from Covered Interest Parity (with respect to the dollar) exhibit relatively long-lived swings. An inevitable side-effect of the Indian exchange rate policy has been the ballooning of foreign exchange reserves to well over a hundred billion dollars. In an unprecedented move, the government is considering using part of these reserves to finance infrastructure investments in the country

Keywords: Foreign exchange in India, India, Forex Market in India

Foreign Exchange Market in India

Foreign Exchange Market in India works under the central government in India and executes wide powers to control transactions in foreign exchange.

The Foreign Exchange Management Act, 1999 or FEMA regulates the whole foreign exchange market in India. Before this act was introduced, the foreign exchange market in India was regulated by the reserve bank of India through the Exchange Control Department, by the FERA or Foreign Exchange Regulation Act, 1947. After independence, FERA was introduced as a temporary measure to regulate the inflow of the foreign capital. But with the economic and industrial development, the need for conservation of foreign currency was urgently felt and on the recommendation of the Public Accounts Committee, the Indian government passed the Foreign Exchange Regulation Act, 1973 and gradually, this act became famous as FEMA.

Foreign Exchange Market in India, Indian Economy
Until 1992 all foreign investments in India and the repatriation of foreign capital required previous approval of the government. The Foreign-Exchange Regulation Act rarely allowed foreign majority holdings for foreign exchange in India. However, a new foreign investment policy announced in July 1991, declared automatic approval for foreign exchange in India for thirty-four industries. These industries were designated with high priority, up to an equivalent limit of 51 percent. The foreign exchange market in India is regulated by the reserve bank of India through the Exchange Control Department.

Initially the government required that a company`s routine approval must rely on identical exports and dividend repatriation, but in May 1992 this requirement of foreign exchange in India was lifted, with an exception to low-priority sectors. In 1994 foreign and nonresident Indian investors were permitted to repatriate not only their profits but also their capital for foreign exchange in India. Indian exporters are enjoying the freedom to use their export earnings as they find it suitable. However, transfer of capital abroad by Indian nationals is only allowed in particular circumstances, such as emigration. Foreign exchange in India is automatically made accessible for imports for which import licenses are widely issued.

Indian authorities are able to manage the exchange rate easily, only because foreign exchange transactions in India are so securely controlled. From 1975 to 1992 the rupee was coupled to a trade-weighted basket of currencies. In February 1992, the Indian government started to make the rupee convertible, and in March 1993 a single floating exchange rate in the market of foreign exchange in India was implemented. In July 1995, Rs 31.81 was worth US$1, as compared to Rs 7.86 in 1980, Rs 12.37 in 1985, and Rs17.50 in 1990.

Since the onset of liberalization, foreign exchange markets in India have witnessed explosive growth in trading capacity. The importance of the exchange rate of foreign exchange in India for the Indian economy has also been far greater than ever before. While the Indian government has clearly adopted a flexible exchange rate regime, in practice the rupee is one of most resourceful trackers of the US dollar.

Predictions of capital flow-driven currency crisis have held India back from capital account convertibility, as stated by experts. The rupee`s deviations from Covered Interest Parity as compared to the dollar) display relatively long-lived swings. An inevitable side effect of the foreign exchange rate policy in India has been the ballooning of foreign exchange reserves to over a hundred billion dollars. In an unparalleled move, the government is considering to use part of these reserves to sponsor infrastructure investments in the country.

The foreign exchange market India is growing very rapidly, since the annual turnover of the market is more than $400 billion. This foreign exchange transaction in India does not include the inter-bank transactions. According to the record of foreign exchange in India, RBI released these transactions. The average monthly turnover in the merchant segment was $40.5 billion in 2003-04 and the inter-bank transaction was $134.2 for the same period. The average total monthly turnover in the sector of foreign exchange in India was about $174.7 billion for the same period. The transactions are made on spot and also on forward basis, which include currency swaps and interest rate swaps.

The Indian foreign exchange market is made up of the buyers, sellers, market mediators and the monetary authority of India. The main center of foreign exchange in India is Mumbai, the commercial capital of the country. There are several other centers for foreign exchange transactions in India including the major cities of Kolkata, New Delhi, Chennai, Bangalore, Pondicherry and Cochin. With the development of technologies, all the foreign exchange markets of India work collectively and in much easier process.

Foreign Exchange Dealers Association is a voluntary association that also provides some help in regulating the market. The Authorized Dealers and the attributed brokers are qualified to participate in the foreign Exchange markets of India. When the foreign exchange trade is going on between Authorized Dealers and RBI or between the Authorized Dealers and the overseas banks, the brokers usually do not have any role to play. Besides the Authorized Dealers and brokers, there are some others who are provided with the limited rights to accept the foreign currency or travelers` cheque, they are the authorized moneychangers, travel agents, certain hotels and government shops. The IDBI and Exim bank are also permitted at specific times to hold foreign currency.

The Foreign Exchange Market in India is a flourishing ground of profit and higher initiatives are taken by the central government in order to strengthen the foundation

RESERVE BANK OF INDIA FOREIGN EXCHANGE

1.RESERVE BANK OF INDIA
FOREIGN EXCHANGE DEPARTMENT
2.Eligibility
All resident individuals are eligible to avail of the facility under the scheme. The
facility will not be available to corporates, partnership firms, HUF, Trusts, etc.
3. Purpose
3.1 This facility is available for making remittance up to USD 25,000 per calendar
year for any current or capital account transactions or a combination of both.
3.2 Under this facility, resident individuals will be free to acquire and hold immovable
property or shares or any other asset outside India without prior approval of the Reserve
Bank. Individuals will also be able to open, maintain and hold foreign currency accounts
with a bank outside India for making remittances under the scheme without prior
approval of Reserve Bank. The foreign currency account may be used for putting
through all transactions connected with or arising from remittances eligible under this
scheme.
3.3 It is further clarified that the facility under the scheme is in addition to those
already available for private travel, business travel, gift remittances, donations, studies,
medical treatment etc as described in Schedule III of Foreign Exchange Management
(Current Account Transactions) Rules, 2000. (Annexure B).
3.4 The remittance facility under the scheme is not available for the following:
i) Remittance for any purpose specifically prohibited under Schedule-I (like
purchase of lottery/sweep stakes, tickets proscribed magazines etc) or any
item restricted under Schedule II of Foreign Exchange Management (Current
Account Transactions) Rules, 2000. (Annexure B).
ii) Remittances made directly or indirectly to Bhutan, Nepal, Mauritius or
Pakistan.
iii) Remittances made directly or indirectly to countries identified by the Financial
Action Task Force (FATF) as “non co-operative countries and territories” viz
Cook Islands, Egypt, Guatemala, Indonesia, Myanmar, Nauru, Nigeria,
Philippines and Ukraine.
iv) Remittances directly or indirectly to those individuals and entities identified as
posing significant risk of committing acts of terrorism as advised separately by
the Reserve Bank to the banks.
4. Remittance Procedure
Requirements to be complied with by the remitter
4.1 To avail of this facility, the individual will have to designate a branch of an AD
through which all the remittances under the scheme will be made.
4.2 The resident individual seeking to make the remittance should furnish an
application letter cum declaration in the format as indicated in Annexure–A regarding
the purpose of the remittance and declaration that the funds belong to the remitter and
will not be used for the purposes as detailed above.
Requirements to be complied with by the Authorised Dealers
4.3 While allowing the facility to resident individuals, Authorised Dealers are required
to ensure that the "Know Your Customer" Guidelines have been implemented in
respect of these accounts. They should also comply with the Anti-Money Laundering
Rules in force while allowing the facility.
4.4 The applicants should have maintained the bank account with the bank for a
minimum period of one year prior to the remittance. If the applicant seeking to make the
remittance is a new customer of the bank, Authorised Dealers should carry out due
diligence on the opening, operation and maintenance of the account. Further the AD
should obtain bank statement for the previous year from the applicant to satisfy
themselves regarding the source of funds. If such a bank statement is not available,
copies of the latest Income Tax Assessment Order or Return filed by the applicant may
be obtained.
4.5 The AD should ensure that the payment is received out of funds belonging to the
person seeking to make the remittance, by a cheque drawn on the applicant's bank
account or by debit to his account or by Demand Draft / Pay Order.
4.6 Authorised dealer should certify that the remittance is not being made directly or
indirectly by /or to ineligible entities and that the remittances are made in accordance
with the instructions contained herein.
5. Reporting of the transactions
The remittances made under this Scheme will be reported in the R-Return in the
normal course. The ADs may also prepare and keep on record dummy Form A2, in
respect of remittances exceeding USD 5000. Authorised Dealers may arrange to
furnish on a quarterly basis, information on the number of applicants and total amount
remitted to the Chief General Manager, External Payment Division, Foreign Exchange
Department, Reserve Bank of India, Central Office, Mumbai-400001.
6. Necessary amendments to the relevant Foreign Exchange Management
Regulations, 2000 as also the relevant Notifications, issued under FEMA, 1999 are
being issued separately.
7. Authorised Dealers may bring the contents of this circular to the notice of their
constituents concerned.
8. The directions contained in this circular have been issued under Sections 10(4) and
11(1) of the Foreign Exchange Management Act, 1999 (42 of 1999).

FOREX MARKET HOURS

At 7:00 pm Sunday, New York time, trading begins as markets open in Tokyo, Japan. Next, Singapore and Hong Kong open at 9:00 pm EST, followed by the European markets in Frankfurt (2:00 am), and then London (3:00 am). By 4:00 am, the European markets are in full swing, and Asia has concluded their trading day. The U.S. markets open first in New York around 8:00 am Monday, as Europe winds down. Australia will take over around 5:00 pm, and by 7:00 pm Tokyo is ready to re-open.

All times are quoted in Eastern Standard Time (New York).

FX or Forex, currency trading is the trading of one currency against another. In terms of trading volume, the currency exchange market is the world's largest market, with daily trading volumes in excess of $1.5 trillion US dollars. This is orders of magnitude larger than the bond or stock markets. The New York Stock Exchange, for example, has a daily trading volume of approximately $50 billion.

Currencies are traded for hedging and speculative purposes. Various market participants such as individuals, corporations, and institutions trade forex for one or both reasons.

Corporate treasurers, private individuals and investors have currency exposures during the the regular course of business. The FXTrade Platform is an ideal platform to hedge any such exposure. An investor, who has bought a European stock and expects the EUR exchange rate to decline, can hedge his currency exposure by selling the EUR against the USD.

Currency markets are ideally suited for speculative trading. The foreign exchange market
has a daily volume in excess of 1.5 trillion USD, which is 50 times the size of the transaction volume of all the equity markets taken together. This makes the foreign exchange market, by far, the most liquid and efficient financial market of the world. Thanks to its efficiency, there is little or no slippage of market price for the execution of even large buy and sell orders. Traders are able to take advantage of intra-day volatility thanks to the low spreads and enter positions for short time periods, such as minutes and hours. Unlike equity trading, where restrictions limit a trader's ability to profit from a market down turn, there are no such constraints on currency trading. Currency traders can take advantage of both up and down trends thus increasing their profit potential.

The most commonly traded currencies are: USD, EUR, JPY, GBP, CHF, CAD and AUD.

The most commonly traded currency pair is EUR/USD.

Forex Symbol Guide
Symbol Currency Pair Trading Terminology
GBP/USD British Pound / US Dollar "Cable"
EUR/USD Euro / US Dollar "Euro"
USD/JPY US Dollar / Japanese Yen "Dollar Yen"
USD/CHF US Dollar / Swiss Franc "Dollar Swiss", or "Swissy"
USD/CAD US Dollar / Canadian Dollar "Dollar Canada"
AUD/USD Australian Dollar / US Dollar "Aussie Dollar"
EUR/GBP Euro / British Pound "Euro Sterling"
EUR/JPY Euro / Japanese Yen "Euro Yen"
EUR/CHF Euro / Swiss Franc "Euro Swiss"
GBP/CHF British Pound / Swiss Franc "Sterling Swiss"
GBP/JPY British Pound / Japanese Yen "Sterling Yen"
CHF/JPY Swiss Franc / Japanese Yen "Swiss Yen"
NZD/USD New Zealand Dollar / US Dollar "New Zealand Dollar" or "Kiwi"
USD/ZAR US Dollar / South African Rand "Dollar Zar" or "South African Rand"
GLD/USD Spot Gold "Gold"
SLV/USD Spot Silver "Silver"

CURRENCY PAIRS
All currencies are assigned an International Standards Organization (ISO) code abbreviation. In currency trading, these codes are often used to express which specific currencies make up a currency pair. For example, USD/JPY refers to two currencies: the US Dollar and the Japanese Yen.

SPOT FOREX
Spot foreign exchange is always traded as one currency in relation to another. So a trader who believes that the dollar will rise in relation to the Euro, would sell EUR/USD. That is, sell Euros and buy US dollars. The following is guide for quoting conventions:

What does it mean to be "long" or "short" a currency?
Being long means buying a currency. Being short means selling a currency.
If a trader goes long USD/JPY, he or she buys US Dollars and sells Japanese Yen. Buying a currency is synonymous with taking a long position in that currency. A trader takes a long position in a currency if he or she believes it will appreciate in value.
If a trader goes short USD/JPY, he or she sells US Dollars and buys Japanese Yen. Selling a currency is synonymous with shorting that currency. A trader would short a currency if he or she believes it will depreciate in value.

CURRENCY TRADING: BUYING AND SELLING CURRENCIES
All Forex trades result in the buying of one currency and the selling of another (currency trading), simultaneously.

Buying ("going long") the currency pair implies buying the first, base currency and selling an equivalent amount of the second, quote currency (to pay for the base currency). It is not necessary to own the quote currency prior to selling, as it is sold short. A trader buys a currency pair if he/she believes the base currency will go up relative to the quote currency, or equivalently that the corresponding exchange rate will go up.

Selling ("going short") the currency pair implies selling the first, base currency, and buying the second, quote currency. A trader sells a currency pair if he/she believes the base currency will go down relative to the quote currency, or equivalently, that the quote currency will go up relative to the base currency.

An open trade or position is one in which a trader has either bought or sold one currency pair and has not sold or bought back an adequate amount of that currency pair to effectively close the trade. When a trader has an open trade or position, he/she stands to profit or lose from fluctuations in the price of that currency pair.

Forex is the backbone of all international capital transactions. Compared to the slim profit margins rendered in other areas of commercial banking, huge profits are generally produced in a matter of minutes form minor currency market movements. Some banks generate 60% of their profits from trading currency aggressively.

Trading volume has been growing at a rate of 25% per year since the mid-1980s and therefore it is not difficult to accept the notion that the currency market is one of the world fastest growing industries. What used to require days to accomplish in Europe or Asia now oly takes a few minutes. Needless to say, technology has changed everything and millions of Dollars are moved from one currency into another every second of every day by major banks through computers and for the average investor, with the touch of a computer key.

Foreign exchange is the backbone of all international capital transactions. Compared to the slim profit margins rendered in other areas of commercial banking, huge profits are generally produced in a matter of minutes from minor currency options market movements. Some banks generate up to 60% of their profits from trading currency aggressively.

Transactions in foreign currencies take place when one country's currency is purchased (exchanged) with another country's currency. The price agreed upon or negotiated for the currency purchased is referred to as the foreign exchange rate. Major commercial banks in the money market centers throughout the world are responsible for the majority of foreign currencies bought and sold.

Trading volume has been growing at a rate of 25% per year since the mid-1980s and therefore it is not difficult to accept the notion that the currency options is the world\'s fastest growing industry. What used to require days to accomplish in Europe or Asia now only takes a few minutes. Needless to say, technology has changed everything and millions of Dollars are moved from one currency into another every second of every day by major banks through computers and for the average investor, with the touch of a phone.

FOREX BASICS - What's a PIP
A "pip" is the smallest increment in any currency pair. In EUR/USD, a movement from .8951 to .8952 is one pip, so a pip is .0001. In USD/JPY, a movement from 130.45 to 130.46 is one pip, so a pip is .01.

CALCULATING THE WORTH OF A PIP
How much in dollars is this movement worth, for example, per 10,000 Euros in EUR/USD? How much is one pip worth per 10,000 Dollars in USD/JPY? We will refer to the size, in this case 10,000 units of the base currency, as the "Notional Amount". The formula for calculating a pip value is therefore:

(one pip, with proper decimal placement / currency exchange rate) x (Notional Amount)

Using USD/JPY as an example, this yields:

(.01/130.46) x USD 10,000 = $0.77 or 77 cents per pip

Using EUR/USD as an example, we have:

(.0001/.8942) x EUR 10,000 = EUR 1.1183

But we want the pip value in USD, so we then must multiply EUR 1.1183 x (EUR/USD exchange rate): EUR 1.1183 x .8942 = $1.00

This is in fact a phenomenon you will see with any currency in which the currency is quoted first (such as EUR/USD or GBP/USD): the pip value is always $1.00 per 10,000 currency units. This is why pip (or "tick") values in currency futures, where the currency is quoted first, are always fixed.

Approximate pip values for the major currencies are as follows, per 10,000 units of the base currency:

USD/JPY: 1 pip = $.77 (i.e. a change from 130.45 to 130.46 is worth about $.77 per $10,000)

EUR/USD: 1 pip = $1.00 (.8941 to .8942 is worth $1.00 per 10,000 Euros)

GBP/USD: 1 pip = $1.00 (1.4765 to 1.4766 is worth $1.00 per 10,000 Pounds)

USD/CHF: 1 pip = $.59 (1.6855 to 1.6866 is worth $.59 per $10,000)

Spread
The spread is the difference between the price that you can sell currency at ( Bid) and the price you can buy currency at ( Ask). The spread on majors is usually 3 pips under normal market conditions.

Market Hours
The spot Forex market is unique to any other market in the world; trading 24-hours a day. Somewhere around the world a financial center is open for business and banks and other institutions exchange currencies every hour of the day and night, only stopping briefly on the weekend. Foreign exchange markets follow the sun around the world, giving traders the flexibility of determining their trading day and the ability to take advantage of global economic events.

FOREX or The Foreign exchange rate market is an international market where various currency exchange transactions take place; this is in the shape of simultaneously buying one currency and selling another. The most commonly traded currencies are referred to as “Majors”; over 85% of daily transactions on Forex trading involve the Majors. These seven currencies are the US Currency (Dollar, USD), Japanese Yen (JPY), Euro (EUR), British Pound (GBP), Swiss Franc (CHF), Canadian Dollar (CAD) and Australian Dollar (AUD). The Forex system in operation today was established in the 1970s when free currency exchange rates were introduced, this period also saw the US Dollar overtake the British Pound as the benchmark currency. Prior to this and in particular during World War II, exchange rate remained more stable.

Forex trading in simplest terms is the buying of one currency and the selling of another. Forex trading, also referred to, as “FX” is open to corporations, small businesses, commercial banks, investment funds and private individuals, it is the largest financial market in the world averaging a daily turnover of over $1 trillion dollars, making it a diverse and exciting market. It is a 24-hour market enabling it to accommodate constant changing world currency exchange rates . According to New York time, trading begins at 2.15pm on Sunday in Sydney and Singapore and progresses through to Tokyo at 7pm, London at 2am and reaches New York at 8am. This leaves investors free to respond to global political, economic and social events when they take place, day or night.

Unlike trading on the stock market, the forex market is not conducted by a central exchange, but on the “interbank” market, which is thought of as an OTC (over the counter) market. Trading takes place directly between the two counterparts necessary to make a trade, whether over the telephone or on electronic networks all over the world. The main centres for trading are Sydney, Tokyo, London, Frankfurt and New York. This worldwide distribution of trading centres means that the forex market is a 24-hour market.

Welcome to my blog

Diagnosing SELinux-related Network Service Issues

The final Troubleshooting and System Maintenance item in the
RHCE part of the Exam Prep guide is the ability to diagnose
and correct networking services problems
where SELinux
contexts are interfering with proper operation
.



In most cases, this is simpler than it looks. SELinux log
messages are stored in /var/log/messages with an avc label.
But even better, the Setroubleshoot browser can identify SELinux issues,
describe causes, and even suggest solutions. Watch it for suggested commands
such as chcon to change SELinux contexts and sesetbool to set SELinux booleans. All you need to do is open the
browser in a GUI with the sealert -b command, and browse the
most recent errors.

Network Service Issues

The Red Hat Exam Prep guide says that you may have to diagnose and correct problems with network services during the Troubleshooting and System Maintenance portion of the RHCE exam. These are the same network services that you may need to configure during the Installation and Configuration portion of the same exam. Example scenarios and solutions are shown as follows. Needless to say, the solutions are far from complete: for example, firewalls and network configuration issues can prevent communication to any network service

Filesystem Corruption and Checking

Although there are potentially many things that will prevent a system from booting, these problems can be generally categorized as either hardware problems or software and configuration problems. The most common hardware-related problem you will probably encounter is a bad hard drive; like all mechanical devices with moving parts, these have a finite lifetime and will eventually fail. Fortunately, the Red Hat exams do not require you to address hardware failures.

Software and configuration problems, however, can be a little more difficult. At first glance, they can look just like regular hardware problems.

In addition to knowing how to mount disk partitions, edit files, and manipulate files, you will need to know how to use several other commands to fix problems from rescue mode or single-user mode. The most useful of these are the df, fdisk, and the fsck commands. To diagnose a problem, you need to know how these commands work at least at a rudimentary level.

df
The Linux df command was covered briefly in Chapter 4. When you use df, you can find mounted directories, the capacity of each partition, and the percentage of each partition that's filled with files. The result shown back in Figure 16-8 illustrates the result in kilobytes. There are a couple of simple variations; the following commands provide output in megabytes and inodes:

# df -m
# df -i

fdisk and parted
The Linux fdisk and parted utilities were covered briefly in Chapter 4. When you use fdisk or parted, you can find the partitions you have available for mounting. For example, the fdisk -l /dev/hda (or parted /dev/hda print) command lists available partitions on the first IDE hard disk:

# fdisk -l /dev/hda

Disk /dev/hda: 15.0GB, 15020457984 bytes
240 heads, 63 sectors/track, 1940 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
   Device    Boot   Start     End     Blocks    Id  System
/dev/hda1    *      1         949    7174408+   b   Win95 FAT32
/dev/hda2           950       963    105840     83  Linux
/dev/hda3           964       1871   6864480    83  Linux
/dev/hda4           1872      1940   521640     f   Win95 Ext'd (LBA)
/dev/hda5           1872      1940   521608+    82  Linux swap

Looking at the output from fdisk, it's easy to identify the partitions configured with a Linux format, /dev/hda2, /dev/hda3, and /dev/hda5. Given the size of each partition, it is reasonable to conclude that /dev/hda2 is associated with /boot, and /dev/hda3 is associated with root (/). Here's a fairly complex output from parted:

# parted /dev/sda print

Model: ATA HDS728080PLA380 (scsi)
Disk /dev/sda: 82.3GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start   End     Size    Type     File system  Flags
 1     32.3kB  197MB   197MB   primary  ext3         boot
 2     197MB   15.2GB  15.0GB  primary  ext3
 3     15.2GB  16.2GB  1003MB  primary  linux-swap
 4     16.2GB  82.3GB  66.1GB  extended
 5     16.2GB  16.3GB  107MB   logical  ext3
 6     16.3GB  26.8GB  10.5GB  logical  ext3
 7     26.8GB  41.8GB  15.0GB  logical  fat32        lba
 8     41.8GB  51.8GB  10.0GB  logical  ext3
 9     51.8GB  82.3GB  30.5GB  logical  ext3

Information: Don't forget to update /etc/fstab, if necessary.


In this example, it's easy to identify the Linux swap partition. Since /boot partitions are small and normally configured toward the front of a drive (with a boot flag), it's reasonable to associate it with /dev/sda1.

For simple partitioning schemes, this is easy. It gets far more complicated when you have lots of partitions. You should always have some documentation available that clearly identifies your partition layout within your filesystem:

# fdisk -l /dev/hda
Disk /dev/hda: 26.8 GB, 26843545600
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device   Boot   Start      End     Blocks     Id  System
/dev/hda1   *      1          13      104391     83  Linux
/dev/hda2          14         268     2048287+   b   Win95 FAT32
/dev/hda3          269        396     1028160    83  Linux
/dev/hda4          397        3263    23029177+  f   Win95 Ext'd (LBA)
/dev/hda5          397        1097    5630751    83  Linux
/dev/hda6          1098       1734    5116671    83  Linux
/dev/hda7          1735       1989    2048256    83  Linux
/dev/hda8          1990       2244    2048256    83  Linux
/dev/hda9          2245       2372    1028218+   83  Linux
/dev/hda10         2373       2499    1020096    82  Linux swap
/dev/hda11         2500       2626    1020096    83  Linux
/dev/hda12         2627       2753    1020096    83  Linux
/dev/hda13         2754       2880    1020096    83  Linux
/dev/hda14         2881       3007    1020096    83  Linux
/dev/hda15         3008       3134    1020096    83  Linux
/dev/hda16         3135       3236    1020096    83  Linux

In this example, it's easy to identify the Linux swap partition. Since /boot partitions are small and normally configured toward the front of a drive, it's reasonable to associate it with /dev/hda1.

However, that is just a guess; some trial and error may be required. For example, after mounting /dev/hda2 on an empty directory, you would want to check the contents of that directory for the typical contents of /boot.

e2label
Based on the previous output from fdisk -l, you could probably use a little help to identify the filesystems associated with the other partitions. The e2label command can help. When you set up a new filesystem, the associated partition is normally marked with a label. For example, the following command tells you that the /usr filesystem is normally mounted on /dev/hda5.

# e2label
Usage: e2label device [newlabel]

# e2label /dev/hda5
/usr

dumpe2fs
You can get a lot more information on each partition with the dumpe2fs command, as shown in Figure 16-9.

 
Figure 16-9: The dumpe2fs command provides a lot of information.
The dumpe2fs command not only does the job of e2label but also tells you about the format, whether it has a journal, and the block size. Proceed further through the output, and you'll find the locations for backup superblocks, which can help you use the fsck or e2fsck command to select the appropriate superblock for your Linux partition.

 On the Job  fsck is a "front end" for e2fsck, which is used to check partitions formatted to the ext2 and ext3 filesystems.
 

Filesystem Check-fsck
You should also know how to use the fsck command. This command is a front end for most of the filesystem formats available in Linux, such as ext2, ext3, reiserfs, vfat, and more. This command is used to check the filesystem on a partition for consistency. In order to use the fsck command effectively, you need to understand something about how filesystems are laid out on disk partitions.

When you format a disk partition under Linux using the mkfs command, it sets aside a certain portion of the disk to use for storing inodes, which are data structures that contain the actual disk block addresses that point to file data on a disk. The mkfs command also stores information about the size of the filesystem, the filesystem label, and the number of inodes in a special location at the start of the partition called the superblock. If the superblock is corrupted or destroyed, the remaining information on the disk is unreadable. Because the superblock is so vital to the integrity of the data on a partition, the mkfs command makes duplicate copies of the superblock at fixed intervals on the partition, which you can find with the dumpe2fs command described earlier.

The fsck command checks for and corrects problems with filesystem consistency by looking for things such as disk blocks that are marked as free but are actually in use (and vice versa), inodes that don't have a corresponding directory entry, inodes with incorrect link counts, and a number of other problems. The fsck command will also fix a corrupted superblock. If fsck fails due to a corrupt superblock, you can use the fsck command with the -b option to specify an alternative superblock. For example, the following command performs a consistency check on the filesystem on disk partition /dev/hda5, using the superblock located at disk block 8193:

# fsck -b 8193 /dev/hda5


Troubleshooting the Boot Loader

The boot loader associated with Red Hat Enterprise Linux 5 is GRUB. For an extensive discussion, see Chapter 3. It can help you to know how to:

Associate the root directive with the partition with the /boot directory.

Boot into the desired, non-default runlevel.

Access the GRUB command line.

Test different GRUB commands.

Use command completion to find and use the exact names of your kernel and initial RAM disk.

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

It's most helpful if you have a VMware snapshot of your RHEL system. Problems like those created in this exercise have caused administrators to mess up their systems in other ways. You'll also need the first RHEL installation CD.

Back up the configuration file associated with the boot loader, /boot/grub/grub.conf. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

Open the /boot/grub/grub.conf configuration file in a text editor. Focus on the kernel command line, which might look like one of the following:

kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00

or

kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/

Introduce a typographical error in the root directive in the kernel command line.

Reboot the system, and let your partner back at the computer. Tell him or her to address the error message shown. Give your partner the first RHEL 5 installation CD.

Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

Whatever happens, restore the original /boot/grub/grub.conf configuration file when your partner is finished with this exercise. (Alternatively, you can restore the configuration from a VMware snapshot.)

Module Errors

Most kernels are compiled with loadable modules. Current Linux distributions, including RHEL, configure modules in the initial RAM disk, which is compiled into a initrd-* file in the /boot directory. As you can see in the GRUB configuration file, the initial RAM disk is normally associated with the last line in a GRUB configuration stanza. As described in topic 8, you can create a new initial RAM disk configuration file with the mkinitrd command. But errors are also possible, as you'll see in the following exercise.

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

It's most helpful if you have a VMware snapshot of your RHEL system. Problems like those created in this exercise have caused administrators to mess up their systems in other ways. You'll also need the first RHEL installation CD.

  1. Back up the configuration file associated with the boot loader, /boot/grub/grub.conf. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  2. Open the /boot/grub/grub.conf configuration file in a text editor. Focus on the initrd command line, which might look like the following:

    initrd /initrd-2.6.18-8.el5.img
  3. Misspell both initrd words in this line.

  4. Reboot the system, and let your partner back at the computer. Tell him or her to address the error message shown. Give your partner the first RHEL 5 installation CD.

  5. Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

  6. Whatever happens, restore the original /boot/grub/grub.conf configuration file when your partner is finished with this exercise. (Alternatively, you can restore the configuration from a VMware snapshot.)

Adding New Partitions, Filesystems, and Swap

Reading the Red Hat Exam Prep guide carefully, this skill states that RHCTs should be able to add new partitions, filesystems, and swap to existing systems (I've added the boldface to provide emphasis on this particular Exam Prep requirement). This implies that space is available on the hard drive(s) that you are using during your exam.

You need to know how to add new partitions, which suggests that you need to know how to use the fdisc and parted utilities described in chapter 4. When you create a new partition, make sure the partition type is associated with what you're creating; there are different partition types for standard Linux and swap partitions.

This is one exercise that does not require a partner. However, it assumes that you've installed RHEL with extra available space on any existing hard drives. If you don't have any additional space, you can substitute a spare USB key.

This exercise assumes you'll be creating a partition on a second SATA or SCSI hard drive. If you're using a different drive and partition, substitute device file names accordingly.

  1. If you've configured a VMware machine to practice for the Red Hat exam, take a snapshot of your current configuration (unless you're willing to keep the changes made during this exercise).

  2. Run the fdisk -l command to display configured partitions. The cylinders will tell you if space is available. For example, the following output suggests that 5000 cylinders are free:

    Disk /dev/sdb: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 9205 73939131 83 Linux
    /dev/sdb2 9206 14457 42349190 83 Linux
  3. Add a new partition of 500MB. It doesn't have to be exact. Make sure that the partition type is associated with Linux. I don't specify exact steps, as you can use either fdisc or parted to create the new partition.

  4. Write the changes to disk, and use the partprobe command or reboot the system.

  5. Format the new partition. For example, if the new partition device is /dev/sdb3, you can do so with the mkfs.ext3 /dev/sdb3 command.

  6. Assign the partition to user michael's home directory in /etc/fstab. (Create user michael if needed.) For example, if the partition device is /dev/sdb3, you can do so with the following directive in that file:

    /dev/sdb3    /home/michael     ext3     defaults     1 2
  7. Mount /dev/sdb3 on the /home/michael directory. Reboot your system to make sure your system recognizes the changes and mounts the new partition.

  8. Run the fdisk -l, mount, and df commands to verify the new partition.

  9. If you took a VMware snapshot, press the Revert button in the VMware window to revert to the snapshot.

Configuring a Desktop Environment

Configuring a desktop environment is a slightly different process than configuring the X Window. As discussed in chapter 14, the default login manager is configured in /etc/X11/prefdm. The default desktop environment can be changed with the switchdesk command. Standard applications can be started with the desktop environment using settings in /etc/X11/xinit/xinitrc and files in the /etc/X11/xinit/xinitrc.d directory.

You can also customize a desktop environment based on hidden files in each user's home directory. These files are read first by the key scripts that start the X Window.

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

  1. Back up the configuration file associated with the display manager, /etc/X11/prefdm. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  2. Open the /etc/X11/prefdm configuration file in a text editor. Near the beginning of the file, you'll see the following directive:

    # Run preferred X display manager
    preferred=
  3. Change the directive to:

    preferred=kdm
  4. Make sure the default runlevel in /etc/inittab is set to 5.

  5. Reboot the system, and let your partner back at the computer. Tell him or her to configure the system to boot into the GNOME Display Manager.

  6. Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

  7. Whatever happens, restore the original /etc/X11/prefdm configuration file when your partner is finished with this exercise.

  8. Image from book

Configuring the X Window System

There are a number of issues associated with the smooth operation of the X Window System. If there are problems with the X configuration file, you may be able to fix it directly using a text editor, create a new file using the Red Hat Display tool (system-config-display), or use a command line tool such as Xorg -configure.

And as discussed in chapter 14, the X Window may not work under certain conditions. Naturally, Linux doesn't boot into an X login window unless the default runlevel in /etc/inittab is set to 5. The X Window can't run without the X Font Server. And it can't start if the partitions associated with certain directories are full or have inappropriate permissions.

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

  1. Back up the configuration file associated with the X Window System, /etc/X11/xorg.conf. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  2. Open the /etc/X11/xorg.conf configuration file in a text editor. Near the end of the file, you'll see the following directive:

    Section "Screen"
  3. Change the directive to:

    Section "Scree"
  4. Configure the system to start in runlevel 3, in /etc/inittab.

  5. Reboot the system, and let your partner back at the computer. Tell him or her to try starting the GUI.

  6. Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

  7. If your partner gives up, restore the original /etc/X11/xorg.conf configuration file.

Image from book

Diagnosing and Correcting Hostname Resolution Problems

Hostname resolution is based on the relationship between hostnames such as enterprise5a.example.org and IP addresses such as 192.168.44.66. First, the default hostname is defined in /etc/sysconfig/network, based on the HOSTNAME directive. Hostnames are associated with IP addresses in /etc/hosts. If you use a DNS service, you need to make sure that the DNS server's IP address is identified in /etc/resolv.conf. If you use DHCP to get your IP address, it overwrites the DNS server addresses /etc/ resolv.conf, unless PEERDNS=no before the BOOTPROTO=dhcp directive in /etc/ sysconfig/network-scripts/ifcfg-eth0. Then a command like dhclient eth0 will acquire the DNS server address(es) from the DHCP server and place them in /etc/resolv.conf.

When there's appropriate routing information, as shown by the route command, along with DNS information in /etc/resolv.conf, you can apply the ping command to confirm connectivity to the external host of your choice.

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

  1. Back up the configuration file associated with the DNS server, /etc/resolv .conf. Back up the /etc/hosts configuration file. Back up the /etc/host.conf configuration file. Make sure to back up these files to a non-standard location, in case your partner also backs up any files before changing them.

  2. Open the /etc/host.conf configuration file in a text editor. If it isn't already as shown, change the directive in this file to:

    order hosts,bind
  3. Open the /etc/hosts configuration file. Set the name of another computer on your network (which supports SSH access) to an incorrect IP address.

  4. Reboot your system, and let your partner back at the computer. Tell him or her to try connecting to another system on your network (the one you've set to the wrong IP address).

  5. Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

  6. If your partner gives up, restore the original /etc/hosts configuration file (and anything else your partner might have changed).

    Image from book

Diagnosing and Correcting Network Problems

To diagnose misconfigured networking, you need to use the commands and analyze the files described in topic 7. To check your current network settings, you'll want to run commands such as:

  • ifconfig to find the settings of your network card(s)

  • ping to confirm connectivity to other systems

  • route to confirm the current routing table

You'll also want to check key files, such as:

  • /etc/sysconfig/network to confirm that NETWORKING=yes

  • /etc/sysconfig/network-scripts/ifcfg-eth0 to confirm defaults for your network card (assuming the default eth0 device for the network card)

  • /etc/resolv.conf to confirm connections to DNS servers (which is associated with PEERDNS=yes in the aforementioned ifcfg-eth0 configuration file)

Refer to topic 7 more information on these commands and files. There are a lot of details; if you forget something, it may be easier to use a Red Hat utility such as the GUI-based Network Configuration tool.

For this exercise, you'll need a partner. Have that partner make changes to your system. Let that partner work privately on your system, until told that the computer is rebooting. Don't look at this lab, until you've solved the problem as created by your partner.

  1. Run the ifconfig command and review your current network settings.

  2. Back up the configuration file associated with the network card, usually ifcfg-eth0 in the /etc/sysconfig/network-scripts directory. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  3. Open up the ifcfg-eth0 file in a text editor.

  4. Set BOOTPROTO=none if it isn't already done.

  5. Set or add an IPADDR directive. Make it just a little different from the IP Address setting you saw in the output from ifconfig. Make sure the new address is on a different network; for example, if the original IP Address and network mask was 192.168.0.50 and 255.255.255.0, set IPADDR=192.168.1.50 and NETMASK=255.255.255.0.

  6. Reboot your system, and let your partner back at the computer. Tell him or her to try connecting to another system on your network.

  7. Tell your partner to back up any files that he or she might change to the home directory.

  8. If your partner gives up, restore the original ifcfg-eth0 configuration file to the /etc/sysconfig/network-scripts directory.

Image from book

The linux rescue Environment

In brief, you can boot even an unbootable system using the linux rescue environment. Using the first RHEL installation CD, type linux rescue at the boot: prompt. The first couple of steps are the same as those for installing RHEL 5. If the linux rescue environment detects your system, it may mount the standard directories in /mnt/ sysimage subdirectories in read-write or in read-only mode. If your filesystems are not mountable, you can open a command prompt and continue with your troubleshooting.

When you type linux rescue at the installation boot prompt and go through the steps, the installation discs install a compact version of a root filesystem. To boot into linux rescue mode, first boot your system using the first installation CD in a bootable CD-ROM drive,

Now take the following steps:

  1. Boot your system from the first RHEL 5 installation CD.

  2. Type linux rescue at the boot: prompt . Your system boots a basic Linux system from the first installation CD.

  3. Select an appropriate language when prompted.

  4. Select an appropriate keyboard type when prompted.

  5. You'll see the following message, briefly:

    Running anaconda, the Red Hat Enterprise Linux rescue mode - please wait...
  6. You'll be asked whether you want to set up the network interfaces on the local system. Select Yes if you need to connect to a network installation source to install other packages; otherwise, select No and skip to step 8.

  7. You'll see a network configuration window for the local network card, similar to what's . If directed by your instructor or exam proctor to set up a static IP address, follow the instructions carefully; otherwise, try to configure this interface using a local network DHCP server. If you set up a static IP address, you'll see another screen where you're prompted to enter a gateway, a primary DNS, and a secondary DNS IP address.

  8. Select one of the three options for the rescue environment, . Generally, you should try the Continue option first, followed by Read-Only. Continue mounts your RHEL filesystems in read-write mode. Read-Only mounts RHEL file systems in read-only mode. Skip does not mount any of your RHEL filesystems. I address each of these three options in detail in the following sections.

  9. When successful, you'll see a message to the effect that your system has been mounted under /mnt/sysimage. When you select OK (the only option), you'll see the following prompt, where you have root privileges.

Standard linux rescue Environment

When you select Continue from the screen

, you're taken through the standard linux rescue environment. The rescue files search for your root directory (/) filesystem. If found, your standard root directory (/) is mounted on /mnt/sysimage. All of your other regular filesystems are subdirectories of root; for example, your /boot directory will be found on /mnt/sysimage/boot.

Not all of your filesystems may mount properly. You may see error messages such as:

An error occurred trying to mount some or all of your filesystem

This suggests that at least one of the filesystems listed in /etc/fstab isn't mounting properly for some reason. If the linux rescue environment has no problems, you'll see a message noting that your system has been mounted,

Select OK. You should see the following prompt messages:

Your system is mounted under the /mnt/sysimage directory.
When finished please exit from the shell and your system will reboot.
You'll use the chroot /mnt/sysimage command shortly. Now you
can work on repairing any files or filesystems that might be damaged. First,
check for unmounted filesystems. Run a df command.
Compare the result to the /mnt/sysimage/etc/fstab configuration file. If some filesystem is not mounted, it may be configured incorrectly in the fstab file. Alternatively, the label associated with a partition may not match the filesystem shown in your fstab file. For example, to find the label associated with /dev/sda1, run the following command:

# e2label /dev/sda1

This should return the name of a filesystem to be mounted on that partition such as /boot.

Sometimes an unmounted filesystem just needs a little cleaning; remember, a command such as the following cleans the /dev/sdb1 partition:

# fsck /dev/sdb1

The fsck command works only on an unmounted filesystem. For example, if you get a message such as:

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

unmount the subject filesystem with a command such as umount /mnt/sysimage/boot. If that doesn't work, restart the rescue process. When you get to the screen select Skip and read the "No Mount linux rescue Environment" section later in this topic

Alternatively, you may see a message like:

fsck.ext2: Device or resource busy while trying to open /dev/hda2
filesystem mounted or opened exclusively by another program?

This is presented when the partition, in this case /dev/hda2, is part of a Logical Volume Manager (LVM) array as described in topic 8. In that case, you'll need to review your /mnt/sysimage/etc/fstab file for the appropriate logical volume (and unmount it), before trying to apply the fsck

Read-Only linux rescue Environment

When you select the Read-Only option , you'll get the same basic prompt. There is little difference between regular and read-only rescue mode. The rescue system attempts to do everything that it would under regular mode, except all partitions associated with your standard system are mounted read-only. (Some of the rescue system filesystems are still mounted as read-write.)

This is appropriate if you have a large number of mounted filesystems; it can help you cull through what is and isn't working with less risk of overwriting key configuration files.

No Mount linux rescue Environment

When you select the Skip option shown in Figure 16-6, the rescue environment doesn't even search for a Linux installation. A minimal root image is loaded into a RAM disk created by the kernel, and you're taken to a root shell prompt (#), as shown:

When finished, please exit from the shell and your system will reboot.

At this point, you have access to a basic set of commands. You can mount filesystems, create directories, move files, and use editors such as vi. As nothing from your physical drives is mounted, you can apply the fdisc and fsck commands to various hard disks and partitions. A few other basic commands are also available.

The great difficulty in operating from the rescue environment is that you are working with a minimal version of the Linux operating system. Many of the commands you are accustomed to having at your disposal are not available at this level. If your root partition has not been completely destroyed, you may be able to mount this partition to your temporary root directory in memory and access commands from there.

But you may need a little help identifying the partitions on your system. As I'll show you shortly, the fdisk -l /dev/hda command lists the configured partitions on the first IDE hard drive. You can create a new directory such as /mnt/sysimage, mount a partition such as /dev/hda2 on that directory, and check the result with the following commands:

# mkdir /mnt/sysimage
# mount /dev/hda2 /mnt/sysimage
# ls /mnt/sysimage

If you can verify that you've mounted the standard root directory (/) filesystem on the /mnt/sysimage directory, you can run the chroot /mnt/sysimage command. You can then have full access to the commands and configuration files available under that mounted partition.




Troubleshooting

Overview


While you've read about many troubleshooting scenarios throughout this book, it's the troubleshooting part of the Red Hat exams that I believe causes the most "fear and loathing" among Red Hat certification candidates.

Troubleshooting is a mindset based on experience and a systematic way of thinking. Troubleshooting strategies on the Red Hat exams are based on the simplest problems that you can check quickly, moving to more complex problems.

Red Hat has done excellent work addressing some problems that formerly led to unbootable systems. For example, flaws in the /etc/fstab file used to lead to an unbootable system. Now most users would hardly know the difference if this file is missing.

The most important troubleshooting tool is the linux rescue environment, which can bypass boot problems, from a missing GRUB boot loader to a missing kernel. In most cases, the first installation CD, booted into the linux rescue environment, can detect and mount even damaged installations of RHEL.

This topic focuses on the Troubleshooting and System Maintenance section of the RHCT and RHCE exams, as defined in the Inside the Exam sidebar. It further focuses on troubleshooting skills, as they evoke more concern than regular system maintenance.

This chapter includes a number of exercises for which you'll need the help of a partner. When you start an exercise, let your partner have your computer and wait until your system begins to reboot. This chapter includes enough exercises to allow you and your partner to take turns working with the system.


Troubleshooting and System Maintenance

  1. Define the question.

    Understand what happened. Take the error messages you see. If possible, analyze log files for other messages. If you've read this book and run the labs, you may recognize the problem and cause immediately.

  2. Gather information and resources.

    Analyze your system. This may require that you check the relevant configuration files to make sure that appropriate services are running and that security or other characteristics of your system are working as they should. If you have experience, you'll often recognize the problem and cause when you see something wrong in these areas.

  3. Form a hypothesis.

    If you're still not sure what's wrong, make your best guess. Remember that time is severely limited during the Red Hat exams, so if you can afford it, consider skipping a problem. (To qualify for either the RHCT or RHCE, you're required to solve all RHCT-level Troubleshooting and System Maintenance issues.)

  4. Perform experiments and collect data.

    Before performing any experiments, back up anything you might change. For example, if you think the problem is with your Samba configuration file, back up your /etc/samba/smb.conf file, in case your hypothesis makes things worse.

  5. Analyze data.

    This is essentially identical to step 1. If what you do doesn't solve the problem, you'll need to analyze what went wrong, using error messages and log files as appropriate.

  6. Interpret data and draw conclusions that serve as a starting point for new hypotheses.

    In many cases, you'll want to restore what you did from the backup in step 4, repeat steps 2 through 4, and try again.

  7. Publish the results.

    Once you've solved the problem, you'll want to make sure the problem remains solved after rebooting your system. For example, if you've addressed a Samba problem, you'll want to "publish" by making sure the Samba daemon starts the next time your Linux system boots.

Two places where you are likely to make errors that result in an unbootable system are in the boot loader and init configuration files, /boot/grub/grub.conf and /etc/ inittab. For example, identifying the wrong partition as the root partition (/) can lead to a kernel panic. Other configuration errors in /boot/grub/grub.conf can also cause a kernel panic when you boot Linux. Whenever you make changes to these files, the only way to fully test them out is to reboot Linux.

The following scenarios and solutions list some possible problems and solutions that you can have during the boot process, and possible associated solutions. It is far from comprehensive. The solutions that I've listed work on my computer, as I've configured it. There may be (and often is) more than one possible cause. These solutions may not work for you on your computer or on the Red Hat exams. To know what else to try, use your experience.

To get the equivalent of more experience, try additional scenarios (remember: never do these things on a production computer). Once you're familiar with the linux rescue environment, test these scenarios. These scenarios worked as shown when I tested them on RHEL 5. However, they lead to different errors on RHEL 4 and RHEL 3.

For the first scenario shown, change the name of the grub.conf file so it can't be loaded. Reboot and see what it does on your system. Use the linux rescue environment to boot into RHEL and use the noted solution to fix your system.

For the second scenario shown, overwrite the MBR; on a SATA/SCSI drive, you can do so with the following command (substitute hda for sda if your system uses an IDE/PATA drive):

# dd if=/dev/zero of=/dev/sda bs=446 count=1

The third scenario is misleading; it's what happened when I overwrote my /bin/ mount with /sbin/mount.nfs and rebooted.

The fourth scenario is what happened when I overwrote my /bin/init command.

The fifth scenario is based on a missing /etc/inittab; I suspect it's much more likely that you'll see some major error (such as a key command, commented out) in that file.

The sixth scenario results in the messages , which happened when I set the default runlevel to 3 and commented out the commands with the mingetty directives in /etc/inittab.



The seventh scenario is based on a typo in the root directive in /boot/grub/grub. conf.

Sometimes, you may run into a problem with the default runlevel. But you're not stuck. There are two ways to boot into different runlevels. You can boot directly from the GRUB configuration menu, or you can boot into the linux rescue environment from the first RHEL installation CD.

SCENARIO & SOLUTION

When you boot, you see a grub> prompt.

You may have a problem that prevents the boot loader from reading the GRUB configuration file, grub.conf. The file may be missing or corrupt. For hints on creating a new grub.conf, see menu.1st in the /usr/share/doc/grub-versionnum directory.

When you boot your computer, you see a message such as "Missing operating system" or "Operating System Not Found."

Your master boot record (MBR) has been erased, and you'll need to reload GRUB on the MBR using grub-install. (It's possible that everything has been erased, which I believe is beyond the scope of this part of the exam.)

During the boot process, you see the "Could not start the X server (graphical environment) due to some internal error" message.

You could have problems with a full or unmounted /tmp or /home directory. If these directories are not mounted, the mount command may be corrupt. In that case, you'll need to reload it from the mount RPM.

You see an "exec of init (/sbin/init) failed!!!" error.

Your init command may be corrupt. Try reloading it from the SysVinit RPM.

You see the "INIT: No inittab file found" message.

This is straightforward-there is something wrong with your /etc/inittab file. RHEL 5 prompts you to "Enter runlevel"; as of this writing, if /etc/inittab is missing, enter s to see a bash prompt.

You see a message

You may not have anything starting a text or GUI console in the active runlevel; trace it starting with /etc/inittab.

You see a message . Take careful note of the last file cited in the message.

RHEL has encountered some problems when reading the grub.conf configuration file. Start the linux rescue environment and check this file as well as the referenced files in the /boot directory.

Booting Into Different Runlevels

In brief, you can boot into the runlevel of your choice from the GRUB configuration menu. This is one of the RHCT Troubleshooting and System Maintenance skills and also an essential skill for all Linux administrators.

Table 16-1: Linux Runlevels

Runlevel

Description

0

Halts the system

1

Activates SELinux; runs /etc/rc.sysinit, which checks and mounts filesystems; executes all scripts in the /etc/rc1.d directory

s or single

Single-user mode; activates SELinux; runs /etc/rc.sysinit, which checks and mounts filesystems

emergency

Emergency boot mode; activates SELinux; mounts only the root (/) filesystem

init=/bin/sh

Emergency boot mode; mounts only the root (/) filesystem

2

Multiuser mode with some networking; does not include some NFS functions, the automounter, or CUPS

3

Multiuser mode with networking; boots into a text login console

4

Generally unused; however, the defaults support near-identical settings to runlevel 3

5

Multiuser mode with the X Window; boots into an X-based login screen

6

Reboots the system

The Red Hat Exam Prep guide states that "RHCTs should be able to boot systems into different run levels for troubleshooting and system maintenance." This is straightforward; at the boot loader prompt, you can start Linux at a different runlevel. This may be useful for two purposes. If your default runlevel in /etc/inittab is 5, your system normally boots into the GUI. If you're having problems booting into the GUI, you can start RHEL into the standard text mode, runlevel 3.

One other option to help rescue a damaged Linux system is is appropriate if your system can find at least the root filesystem (/). Your system may not have problems finding its root partition and starting the boot process, but it may encounter problems such as damaged configuration files or an inability to boot into one of the higher runlevels. When you boot into single-user mode, options are similar to those of the standard linux rescue environment described later in this topic.

To boot into a different runlevel, first assume that you're using the default RHEL boot loader, GRUB. In that case, press (lowercase) p to enter the GRUB password if required. Type (lowercase) a to modify the kernel arguments. When you see a line similar to

grub append> ro root=LABEL=/ rhgb quiet

add one of the following commands (shown in boldface) to the end of that line:

grub append> ro root=LABEL=/ single
grub append> ro root=LABEL=/ init=/bin/sh
grub append> ro root=LABEL=/ emergency
grub append> ro root=LABEL=/ 1

You can use the same technique to boot into another runlevel. For example, to boot from the GRUB boot loader into runlevel 3, navigate to where you can modify the kernel arguments, and add the following command to the end of the following line:

grub append> ro root=LABEL=/ 3



On the Job

The terms boot loader and bootloader are used interchangeably. In this book, I've normally used the term boot loader, as that seems to be the direction of the Red Hat documentation. However, the term bootloader is still common even in Red Hat documentation.

grub append> ro root=LABEL=/ 3

When you boot into runlevel 1, no password is required to access the system. As you'll see later in this topic, running your system in this runlevel is somewhat similar to running a system booted in rescue mode. Many of the commands and utilities you normally use are unavailable. You may have to mount additional drives or partitions and specify the full pathname when running some commands.

When you have corrected the problem, you can reboot the system. Alternatively, you can type the exit command to boot into the default runlevel as defined in /etc/ inittab, probably runlevel 3 or 5.


On the Job

In runlevel 1, any user can change the root password. You do not want people rebooting your computer to go into this runlevel to change your root password. Therefore, it's important to keep your server in a secure location. You can also password-protect GRUB or even the BIOS menu to keep anyone with physical access to your computer from booting it in single-user mode.