Sabtu, 07 Februari 2009

How Boot Loaders Work




What BIOS does for us

The BIOS is the firmware in the ROM of a PC. When the PC is powered up, the BIOS is the first program that runs. All other programs must be loaded into RAM first. The BIOS contains the following parts:

* POST (Power On Self Test). The running counter that counts the kilobytes of main memory is the most visible part of the POST.
* The Setup Menu, that lets you set some parameters and lets you adjust the real time clock. Most modern BIOS versions let you set the boot order, the devices that BIOS checks for booting. These can be A (the first floppy disk), C (the first hard disk), CD-ROM and possibly other disks as well. The first device in the list will be tried first. Older BIOS-es have only one boot order: A, C. So the BIOS will try to boot from A first and if there is no diskette in the drive it tries to boot from C.
* The boot sector loader. This loads the first 512-byte sector from the boot disk into RAM and jumps to it. This is where the boot loaders described in this paper start.
* The BIOS interrupts. These are simple device drivers that programs can use to access the screen, the keyboard and disks. Boot loaders rely on them, most operating systems do not (the Linux kernel does not use BIOS interrupts once it has been started). MSDOS does use BIOS interrupts.

Apart from the main BIOS there are extension ROMs, which are started by the main BIOS. Every VGA card has one. Also SCSI host adapters and Ethernet cards can have an extension ROM. It is even possible to put an EPROM on an Ethernet card to boot a machine over the network without any disks.

As far as boot loading facilities are concerned, the PC BIOS is very primitive compared to that of other computer systems. The only thing it knows about disks is how to load the first 512-byte sector.

* The first sector of a diskette can be loaded at address 0000:7C00. The last two bytes of the sector are checked for the values 0x55 and 0xAA, this as a rough sanity check. If these are OK, the BIOS jumps to the address 0000:7C00.
* Booting from a hard disk is very similar to booting from a diskette. The first sector of a hard disk (often called the Master Boot Record) is loaded at 0000:7C00 and next the BIOS jumps to it. The MBR program must move itself to an address that is different from 0000:7C00 as it is supposed to load a different boot sector from a partition to address 0000:7C00 and jump to that.
* Modern BIOS versions can treat a certain file on a CD-ROM as a diskette image. They pretend to boot from a diskette by loading the first 512 bytes of the file to 0000:7C00 and jumping to it. Every attempt to access the same diskette using the BIOS routines, will be redirected to the image file on CD-ROM. Some other ways to boot a CD-ROM may also be supported (with an emulated hard disk or with no disk emulation at all).

When the boot sector is loaded, the CPU is in real mode. For those who are unfamiliar with 80x86 architecture: real mode is very limited compared to 32-bit protected mode (in which Linux runs). For example: data outside a 64K segment can only be accessed if you change a segment register and data outside the first 1MB of address space (which contains 640kB of main memory) cannot be accessed at all. As gcc does not know about real mode, programs compiled with it can only be run in real mode with some tricks and with severe memory size restrictions. This is the reason why most boot loaders (except GRUB) are written in assembly. All boot sector programs, even that of GRUB, are written in assembly1.

In theory a boot loader could do its job by directly accessing the bare metal, but 512 bytes would be a very small space for that. The boot loader has access to BIOS interrupts, which are subroutines that can be invoked by the INT instruction (software interrupts). These work in real mode only. The following routines are used by most boot loaders.

* INT 0x10 for screen output.
* INT 0x16 for keyboard input.
* INT 0x13 for disk I/O. The parameters to specify sectors on disk used to have a very limited range. Originally it was only possible to specify 1024 cylinders on a hard disk, while hard disks can have more cylinders. This imposed limitations on where it was allowed to put the boot loader and any files accessed by it. You were forced to create a small partition near the start of the hard disk and put the boot loader there. There are three categories of BIOS:
o BIOS versions earlier than 1995 could only access IDE disks of around 500MB, as the BIOS sector and head numbers corresponded directly to the register values on the IDE interface.
o BIOS versions between 1995 and 1998 can access IDE disks up to about 8GB. They translate the cylinder, head and sector numbers from the INT 0x13 call to different values that better utilize the allowable ranges on the IDE interface.
o BIOS versions of 1998 or later have a new calling interface using linear block addresses.
In any of the three categories you have BIOS-es that have bugs that cause them to stop at a lower disk size limit (a category 2 BIOS that should work up to 8GB, but stops at 2GB). In those cases it makes sense to upgrade to a new BIOS version.
* INT 0x15 is a catch-all for many BIOS functions, one of which is moving data to extended memory (the BIOS is required to switch to protected mode temporarily to do that). Other functions are for disabling the A20 gate and for determining the memory size.

Sabtu, 31 Januari 2009

File Recovery with Free Software



Ack! The computer ate my term paper! We've all been there at some point. You delete an important file, somehow it skips your Recycle Bin altogether, and for all practical purposes, it's disappeared into the ether. But before you hit the big red panic button, there's a very good chance that your file is still alive and kicking somewhere on your hard drive—you just need to know how to find it. With the right tools, finding and recovering that deleted file can be as simple as a few clicks of your mouse.
Part I: The Overview
Ok, so you've lost an important file. Don't panic. Take a breath, and let's see if we can find it. Before you go into full-on file recovery mode, make sure you double-check the folder you had saved it in and the Recycle Bin or Trash. Still nothing?
1. Stop What You're Doing
When your operating system deletes a file, all it really does is mark the space on your hard drive that your file occupies as free space. It's still there, but your computer is now perfectly happy to write new data on top of it—at which point the file recovery process becomes a lot more difficult. That means you should do as little computing as possible until you find the file you're looking for, since every time you save a new file—every time your computer writes information to your hard drive—your chances of recovering the file go down.
2. Find the Right File Recovery Program
Windows: You've a lot of really great freeware options for file recovery if you're running Windows. Notable apps include Undelete Plus (original post), PC Inspector File Recovery (original post), and Restoration (original post). Undelete Plus is the most user-friendly option of the bunch, with advanced filtering options that make it easy to find your needle of a file among the haystack of deleted garbage, but in my tests I found both Restoration and PC Inspector File Recovery to be more effective at recovering files. (Of course, your mileage may vary.) As an added bonus, the bare bones Restoration is portable, which makes it an excellent addition to your thumb drive.

UPDATE: Per several readers advice, you may also want to check out Recuva (original post), another freeware Windows file recovery tool.

Mac: If you're on a Mac and aren't afraid to lay down a few bucks in the name of data recovery, the $99 Data Rescue II is the go-to application for file recovery with a friendly graphical interface.

photorec.pngAll Platforms: If you're not afraid to crack open a terminal window or command prompt, the free, cross-platform command-line tool PhotoRec (original post) is a crack shot at recovering photos (as the name implies) as well as virtually any other file type from your removable media or hard drives.
3. Recover Your Files
jumbled-files.pngOnce you've picked a tool, it's time to scan your hard drive for your lost file or files. This process varies depending on the app you're using, but it's basically the same for all of them: Just point the program at the hard drive or folder that was holding your missing file and start your scan. Once the scan is complete, you're going to see a big list of jumbled file names. Often most of these files are nothing more than system files that your operating system has created in the course of basic operation, and you won't need to worry about them. You're just looking for the file type and name that matches what you've lost.

Once you find what you're looking for, saving it is a matter of right-clicking the file and choosing where to save it.

Went through steps one through three and still aren't having any luck? It might be worth trying again with a different application, since there can be a lot of variation between apps. If you're still not having any luck, part two discusses a few other ways you can try addressing more specific problems when your data goes missing.
Part 2: More Specific Problems
Above you got a basic overview for recovering deleted files from your computer. Now we'll take a closer look at some more specific problems, methods of data recovery, and tools that may be of help in your quest for your elusive lost data.
Recover Files from a Wiped or Unbootable Hard Drive
hard-drive-pic.pngSo you didn't just accidentally delete a file or two and empty your Recycle Bin prematurely—instead you've got a whole hard drive worth of missing data. You can still use many of the applications mentioned above to recover files from these drives as long as you have or can get the hard drive into a bootable computer. For more details, check out how to recover files from a wiped hard drive with PhotoRec (original post) or how to recover data from a crashed hard drive with PC Inspector File Recovery (original post).

If you can't or don't know how to get your unbootable drive into another computer, a Linux live CD can be perfect for rescuing files. If the Linux route scares you off, give the popular BartPE (original post) a try.

Finally, if none of these options can even read your hard drive, you still might be able to get it working for just long enough with a few tricks of the data recovery trade, like putting the busted hard drive in the freezer.
Recover Lost Photos
zero-assumption-pic.pngIf you need to resurrect photos from a damaged flash memory card from your digital camera, you'll be happy to know that most of the applications listed in part one above will do the trick—you just need plug in your camera or insert the card into your computer's card reader before running your data recovery application of choice. That said, you can find other applications, like Zero Assumption Digital Image Recovery (original post), that are focused specifically on image recovery that you may want to add to your data recovery toolbox.
Recover Lost Word Documents
If your lost dissertation was saved as a Word document, you've got a few more interesting options for getting to your lost or deleted documents—read more about them here and here.
Recover Data from Scratched or Corrupted CDs and DVDs
scratched-cd.pngIf your munged data is sitting on optical media like a CD or DVD, the recovery process can be slightly different. Freeware application CD Recovery Toolbox (original post) is made specifically to read the portions of a CD that are readable in an effort to rescue as much data as possible from a damaged disc. If that doesn't work, you may want to give a look at the 30-day trial of shareware application CDCheck, as recommended by a reader. Then again, if scratches are the issue, you may be able to get away with simply fixing your scratched CD or DVD yourself.
Part 3: Don't Let This Happen Again
backup.pngWhatever the cause of your lost file, the best method of data recovery is a good preemptive data backup plan. If you're on Windows, we've taken you step-by-step through how to automatically back up your hard drive so that this sort of thing never happens again. If you're running a Mac, do yourself a favor: Get an external hard drive and flip the switch on the easy-to-use Time Machine. Linux users should check out backup options like FlyBack, TimeVault, or the time-honored rsync.

Have you ever raised deleted files from the hard drive graveyard? What software did you use to do it? Tell us your tales of file recovery victory and woe in the comments.

Minggu, 25 Januari 2009

Restore Your Computer to Factory Setting with Restore System



Restoring your Computer with System Restore.
Ever dragged yourself into bed after a particularly disastrous day, wishing you could wake up the next morning and find everything back to normal?

Although things usually remain the same when we wake up, that doesn't have to be the case with Windows XP and its built-in System Restore feature.



System Restore (also built into Windows Me) provides Windows XP with an easy way to bring peace back into a troubled world. Every so often, the System Restore program takes a "snapshot" of Windows XP's key internal settings and saves them by date, known as a "Restore Point". When Windows XP is behaving badly on your system, call up System Restore, and tell it to return to a Restore Point when everything was working correctly.

Windows XP quickly loads the settings it used on that Restore Point's date, and when Windows XP restarts, it works just as well as it did on that day in the past.

If you choose a Restore Point that somehow makes things even worse than they were, head back to System Restore and chose Undo my last restoration. System Restore promptly discards those settings, restarts, and lets you choose a different Restore Point.

Since everything System Restore does is reversible, there's rarely much to lose in giving it a try. Here are a few tips for using System Restore to its full potential.

Finding the System Restore Program

For some reason, Microsoft hid the darn thing. To locate System Restore, put on your wading boots and click your Start menu. Point to All Programs, then Accessories, then System tools and, finally, click on System Restore. (You'll also find System Restore hidden in the Control Panel under Performance and Maintenance.)

Making your own Restore Points

System Restore normally takes a snapshot of your computer's settings on a daily basis. It often usually takes another automatic snapshot when you install a new computer part - just in case the newcomer causes problems. But Windows XP simply slaps the date onto these System Restore points. How can you remember which Restore Point to use? For better control over your Restore Points, feel free to create your own Restore Points when everything's running smoothly: Just call up System Restore and choose Create a restore point.

Windows will ask you to describe your new Restore Point. The description is just something to help you remember why you made the Restore Point. Type something like, "Created just before installing the Eggplant Toss game." That way, if the Eggplant Toss game messes up your computer, you know which Restore Point will bring the computer back to sanity. (The Restore Points that Windows XP creates automatically have the boring, non-descript name "System Checkpoint.")

You don't need to include the date in your description, as Windows automatically gives each one a date stamp. But when you create your own Restore Point with a descriptive name, you'll know immediately which one to try first should things go bad.

Understanding what System Restore does and doesn't do

System Restore won't delete any of your letters, e-mails, or other data files, thank goodness. The files you created yesterday will still be there, even if you use a Restore Point from last month.

Since System Restore only deals with Windows XP's settings, it only helps with Windows XP itself. It can't help you locate deleted e-mails or recover deleted files that are no longer in the Recycle Bin.

Using System Restore to "go back in time" won't disinfect your computer of a newly acquired virus, unfortunately.

If you use a Restore Point from two weeks ago, then any programs installed since then might not work. Programs often alter Windows XP's settings as a way of introducing themselves to your computer. When Windows XP "wakes up" with settings from two weeks ago, it won't remember that those programs have been installed. You'll probably have to reinstall them.

System Restore normally takes a "snapshot" of your computer's most treasured settings every day. However, storing all these settings consumes considerable amounts of space. If the available hard disk space on your C drive runs lower than 200MB, System Restore stops working until you clear off more space for it to store its settings.

Also, since System Restore has a limited amount of storage space, it deletes its oldest Restore Points to make room for the newest. That means your "window" of available Restore Points might be as little as two weeks into the past.

System Restore Tips

* When you find yourself humming a happy tune while computing, don't hesitate to create a Restore Point. Just think how happy you'll be down the road if you can return your sick computer to that happy state.
* Make it a habit to create your own Restore Points before you do anything that will change your computer's settings: Installing a new computer part, like a scanner, or adding new software. The important thing is to create the Restore Point before you make the changes. That gives Windows XP something to return to if the changes mess things up.
* When Windows XP is first installed onto your computer, it reserves about 12 percent of your available disk space for System Restore to use. That's usually enough to extend about one month into the past. (Your mileage may vary, depending on the size of your hard disk and how much computing you do.) To change those settings, right-click on My Computer in your Start menu, choose Properties, and click the System Restore tab. (The "status" area should say "monitoring", meaning System Restore is up and running.)
* If your anti-virus program just disinfected your computer of a nasty virus, then quickly use System Restore to create a Restore Point called "Disinfected Computer." Then, never use any Restore Points dated earlier than your newly created "Disinfected Computer" Restore Point. Those older Restore Points might return your computer back to a time when it was infected. (Also, if your anti-virus program discovers an infected Restore Point, you'll need to delete that Restore Point manually; the anti-virus program usually can't do it. You'll find detailed instructions at the end of this page.)

The moral? If everything's going along smoothly as you're reading this, perhaps it's time to create a Restore Point.

Here's how to manually remove Restore Points that might contain a virus:

Follow the steps that apply to your operating system:

Windows Me:

1. Close all open programs.
2. Right-click My Computer on the Windows desktop, and then click Properties.
3. Click the Performance tab.
4. Click File System.
5. Click the Troubleshooting tab.
6. Check Disable System Restore, click OK, and then click Close.
7. Click Yes to restart. This disables the System Restore feature; when you restart your computer, it will remove all the existing Restore Points.
8. Download the latest virus definitions from your AntiVirus program's Web site.
9. Make sure to scan all files and all drives, and then scan the computer.
10. After cleaning the infected files, repeat steps 1 through 7, except in step 6, uncheck Disable System Restore.

Windows XP:

1. Click Start, and then right-click My Computer.
2. Click Properties.
3. Click the System Restore tab.
4. Check Turn off System Restore.
5. Click Apply, and then click OK.
6. Restart the computer.
7. Download the latest virus definitions from your AntiVirus program's Web site.
8. Make sure to scan all files and all drives on your computer, then do a full scan.
9. After cleaning the infected files, repeat steps 1 through 6, except in step 4, uncheck Turn Off System Restore.

Sabtu, 17 Januari 2009

Windows XP Shuttingdown Faster


You can make your shut down process a bit faster by the following tweak.

Steps: (download the registry file)

1. This step is very important.
Export (right click > Export) the following keys and save it to a safer place.

HKEY CURRENT USER\Control Panel\Desktop
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control

2. Open Notepad, copy and paste the following to the Notepad.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"AutoEndTasks"="1"
"HungAppTimeout"="1000"
"WaitToKillAppTimeout"="2000"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="2000"

3. Save the file and close Notepad.

4. Change extension of the file from .txt (text file) to .reg (registry file).

5. Double click open this file and click Yes and the OK .

Israelis edging closer to cease-fire agreement in Gaza




Gaza City : U.N. Secretary General Ban Ki-moon again called for an immediate ceasefire in Gaza on Saturday during a speech at the Lebanese parliament, where he cited heavy civilian casualties.
A man escapes following an Israeli strike in Beit Lahia in northern Gaza on Saturday.

'"The level of violence in Gaza is unprecedented," the U.N. chief said. "The Israeli aerial and land offensives against Hamas targets are inflicting heavy civilian casualties, widespread destruction and tremendous suffering for the entire region."

Israel's security cabinet is scheduled to meet Saturday to vote on the basics of a plan that could end the fighting in Gaza, as movement toward a cease-fire seemed to be picking up steam on multiple fronts.

The meeting in Jerusalem would come a day after Israeli and U.S. diplomats signed an agreement designed to stop arms smuggling into the Palestinian territory.

But still fighting continued Saturday, the three-week offensive claiming more than 1,000 lives -- many of them Palestinian civilians.

Two children were killed in an Israeli artillery attack at a U.N. school north of Gaza City early Saturday, an attack that illustrated the crucial need for the rumored cease-fire diplomats have been negotiating, a United Nations official said.

"This yet again illustrates that there is no place safe in the Gaza Strip," said Chris Gunness, a U.N. spokesman. "This fighting has to stop because innocent people, women and children, who are taking refuge in neutral U.N. buildings are discovering that there is nowhere safe." Video Watch a report on aid shortages to Gaza »

For its part, Hamas says a cease-fire alone is not enough.

"We are working in every direction so we can achieve our objectives in stopping the aggression, lifting the blockade, opening the crossings, and the compensation of our people and the rebuilding of the Gaza strip," said Hamas delegation spokesman Salah Bardwill.

Israeli Defense Ministry official Amos Gilad remained in Cairo on Friday, discussing a cease-fire proposal. A Hamas delegation is also in the Egyptian capital, talking with leaders there who are trying to hammer out a temporary truce.

Other diplomatic efforts included the state of Qatar also held an emergency summit Friday in an attempt to find a unified Arab voice on Gaza. The meeting brought together some Arab and Muslim leaders including the presidents of Iran and Syria and the leader of Hamas, Khaled Meshaal.

Friday evening, the United Nations' general assembly voted 142-4 to call on Israel to abide by a January 8 resolution by the U.N. Security Council.

The resolution, which called for an immediate cease-fire by both sides in the conflict, has been universally ignored.

Israel and the United States were among the countries voting against Friday's effort.

More than 1,000 Palestinians, including hundreds of women and children, have been killed since the offensive began, according to medical sources in Gaza. Thirteen Israelis, 10 of them soldiers, have been killed, according to the Israeli military.

Sabtu, 10 Januari 2009

How to Clean a Virus in Your Computer ?



Computer viruses are insidious, sneaky and--like their biological counterparts--constantly mutating. If you think your computer has been infected, the only safe course of action is to use a good anti-virus program.

Step1
As soon as you suspect that your computer has a virus, remove your computer from any networks it might be on, as well as from the Internet, so that you don't inadvertently spread the bug to others. Unplug your network cable if you have to.
Step2
If you have virus-scanning (anti-virus) software installed, run it.
Step3
If you don't have anti-virus software, you'll need to obtain some. If you can't get it from a network administrator or download it from an uninfected computer, you can mail-order it from a retailer.
Step4
Start your computer (still not connected to a network) and follow the instructions that came with the anti-virus software.
Step5
Keep running the virus-scanning software until your computer comes up clean.
Step6
Reconnect your computer to the Internet and check with the anti-virus software's publisher to make sure you have the latest updates. If not, download them now.
Step7
After updating the anti-virus software, run it again until your computer comes up clean.

Sabtu, 03 Januari 2009

7th Day Israel Strike Gaza





Israel has threatened to widen Operation Cast Lead after Saturday's deadly air raids [AFP]

Israeli warplanes have resumed their air strikes on Gaza Strip, hitting targets across the territory, including a mosque and a television station.

Two bodies were retrieved from the rubble of a mosque near Gaza City's Shifa hospital early on Sunday, witnesses said.

The blast, just after midnight, blew out windows at the hospital, hospital officials said.

The studio building of al-Aqsa TV was also destroyed, but the station remained on air with a mobile unit.

Palestinians counted about attacks in the early hours of Sunday, after more than 225 people had been killed and hundreds of other injured in air raids the previous day as Israel launched Operation Cast Lead.

Ehud Barack, Israel's defence minister, has warned that the air raids could be followed by a major ground incursion into the Gaza Strip.

"We are ready for anything. If it's necessary to deploy ground forces to defend our citizens, we will do so," Barak's spokesman quoted him as saying on Sunday.

Israeli television has reported that hundreds of infantry and armoured forces were massing on the border of the territory.

No truce

Earlier Barak rejected calls for a new truce between the Palestinian Hamas movement and Israel.

"For us to be asked to have a ceasefire with Hamas is like asking you [the United States] to have a ceasefire with al-Qaeda. It's something we cannot really accept," he told Fox News from Tel Aviv.

Ehud Olmert, the outgoing Israeli prime minister, described the assault as a war on the Palestinian faction which took full control of the Gaza Strip in June 2007 after pushing out security force loyal to Mahmoud Abbas, the Palestinian president.

Members of the Israeli cabinet say the attack was in response to an increase in the number of home-made rockets being fired into southern Israel since a ceasefire ended on December 19.

At least one Israel was killed and six other wounded in missile attacks by Palestinian fighters after the raids on Gaza began.

Carnage

Gaza witnesses reported heavy damage after dozens of missiles were fired from helicopter gunships and fighter jets on about 40 different locations in the strip on Saturday.

Israel resumes Gaza bombardment

Many of the dead in the series of attacks were police officers, including Tawfiq Jabber, the Gaza chief of police.

The toll is expected to rise further, with bodies still lying buried under the rubble of destroyed buildings.

Hospitals, already suffering from shortages due to an 18-month blockade on the Gaza Strip, said they were struggling to cope with the number of injured, which included women and children.

Gaza is densely populated. Its 1.5 million residents were already experiencing shortages in power and basic supplies due to the siege which is widely condemned by human rights movements as a collective punishment.

'Ugly massacre'

Ismail Haniya, the Hamas leader in Gaza, called the assault Israel's "ugliest massacre".

About 40 installations were hit in the first day of attacks by Israel [AFP]
"I call on Palestinians to remain united and together in the face of this crime, in the face of this massacre and continued aggression, targeting our soil and our citizens," he said.

Olmert, speaking in Tel Aviv on Saturday, said the operation would take time and called on Israelis to be "patient".

"The quiet we offered was answered with mayhem. Our desire for calm was answered with terror," he said.

"You are not our enemies. We do not fight against you," Olmert said in a direct address to Palestinians.

"[Terrorist organisations] are disastrous for both peoples. Israel is not fighting against the Palestinian people, and the targets attacked today were chosen with the intent of avoiding civilian casualties."

Long operation

Jacky Rowland, Al Jazeera's correspondent in Jerusalam, said: "People have been forewarned about further operations of this intesnsity for many days to come, with more sorties flown by Israeli planes and helicopters and more targets in Gaza.

"In response, more than 50 rockets were fired into Israel today. Defence officials are warning that there could be as many as 200 rockets fired every day into Israel in the days to come."

Salam Fayyad, the Palestinian prime minister in the West Bank-based government, condemned the attack and demanded an immediate cessation.

Many leaders added their voices to condemn the onslaught, including Ban Ki-moon, secretary-general of the UN, who called for an immediate cessation of hostilities.

Mousa Abu Morzouz, the deputy leader of Hamas, said: "Nobody in this world can accept what happened and the Israeli aggression ... [we expect] the international community to stand against this and say that it is not acceptable."

Mustafa Barghouthi, the former Palestinian information minister, said: "This is not an attack on Hamas. It is an attack on the whole population and the free will of the people of Gaza."

He accused Israel of committing "war crimes" and demanded that Abbas and his government stop all relations with Israel.

'Only just beginning'

The Israeli army released a statement on Saturday saying "terrorist installations" were hit and that all Israeli pilots returned unharmed.

A police graduation ceremony in Gaza City was struck by an Israeli attack [AFP]

Avi Benayahu, an Israeli military spokesman said: "The operation against Hamas is "only just beginning".

The air raids follow a breakdown of a six-month-old Israel-Hamas truce earlier this month.

The ceasefire expired on December 19, with Hamas arguing that Israel had violated the truce by preventing vital supplies from entering the Strip.

Egypt has opened the Rafah crossing with the Gaza Strip to receive injured people, Egyptian officials said. Ambulances have been sent to the crossing and two Egyptian hospitals emptied to take in the wounded.

Hamas won control of the Palestinian Legislative Council in elections in January 2005. The international community refused to accept a Hamas-led government, demanding that the faction recognise Israel and renounce violence. Economic sanctions by the EU and US followed.

Hamas took control of the Gaza Strip in June 2007 after bloody street battles against its rival, Fatah.