If you just deleted the windows partition using cfdisk, did you save and exit? If so, there is a new partition table. If you try to reboot, Linux will not boot until you edit /boot/grub/menu.lst and /etc/fstab. Skip down to the fourth paragraph for instructions on editing those files before rebooting. After editing those files, then reboot so that you are working with the new partition table.
Cfdisk is the ncurses variant of fsidk, so there should be no problem if you continue to use cfdisk.
To merge the partitions, use a live cd. Partition operations should be carried out on unmounted partitions.
You have Linux installed on partition 2. So, resizing 2 to take up the free space that was partition 1 puts the Linux partition as risk. The first thing to do is make a backup of Linux and store that backup somewhere else, such as a DVD.
Now, was partition 1 a primary partition? Is partition 2 a primary parition? If the answer is yes to both questions, then extend partition 2 to take up the free space. While the liveCD is running, edit the Linux /boot/grub/menu.lst to change references to partition 2 to partition 1 (the original 1 is gone; the extended 2 becomes the new 1). Edit /etc/fstab to change the partition references for Linux to /dev/hda1 and swap to /dev/hda2, and delete references to Windows on /dev/hda1.
Now the grub menu.lst and /etc/fstab are corrected to reflect the new partition structure. Reboot and remove the liveCD. It if boots up, great. If it does not boot, then you will have to restore the backup in order to regain a bootable system.
If the windows partition was primary, and Linux and swap are in an extended partition, then you should make a Linux primary partition where windows was and copy your Linux partition into it. Then delete the extended partition (with your original Linux and swap partitions). Then extend the new Linuxpartition into the free space and make a new swap partition.
It isn't terribly difficult, but it is detailed. Do the planning before you begin. Have the plan written down on paper, step by step. Follow that plan, step by step. Make certain you understand what it is that you need to do at each step before you begin. Lack on understanding is your greatest enemy.
And the first step is usually, make a backup of anything you want to preserve before you begin.
Last edited by bigrigdriver; 03-08-2008 at 12:44 AM.