Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
BigRigDriver --
Very detailed reply.
Exploring options:
Would a lower risk option have been to just delete most of the windows files, pagefile, etc. Shrink the ntfs partition to negligible size, then grow the ext3 partition to fill the void? The windows boot option could be deleted from grub.conf and everything else remain the same.
I know, I might not trust myself deleting partitions, messing with grub. Depending on how /etc/fstab was structured, such actions could lead to a cascade of reference errors. I know using labels in fstab has saved me on one occasion when a tech hooked up a an Oracle database server backwards, swapping the scsi channels.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.