> When I first installed Linux, I set aside 500 mb to eventually install
> Windows. Now I have decided not to install Windows and just run
> Linux. How do I add the 500 mb of free space to my Linux partition?
Unless you want to reinstall, there is no way to add this space
directly to your existing Linux partition.
However, you can make it a separate partition and mount it. Put one
of the directories that take a lot of space into it, e.g. /var or
/home. `du -ks' can help you decide which hierarchy to move to the
Example: Let us assume this free space is organized as partition
/dev/hda3, and you decide to put your /var directory on it. Then
you should do something like this:
1) Switch to single user mode or reboot your system in single user
mode, to ensure no processes are writing to /var while you are
2) Create a file system on the new partition and mount it in a
temporary place. Warning: This will erase all data on that
# mke2fs /dev/hda3
# mount /dev/hda3 /mnt
3) Copy the directory over to the new partition:
# cd /var
# tar cf - . | (cd /mnt && tar xpf -)
This command is a bit complicated: It packs /var into a tar
archive, which is not actually written to the disk but instead
passed to another tar which unpacks it under /mnt.
4) Tell your system about the new partition:
# echo "/dev/hda3 /var ext2 defaults 1 2" >>/etc/fstab
5) Reboot and make sure everything is running flawlessly.
6) Reboot to single user mode again and delete the old /var hierarchy.
Create some directories that may be necessary if you should ever
need to boot without the new /var partition.
# umount /var
# rm -rf /var/*
# mkdir /var/lock /var/log /var/run /var/spool
# ln -s /tmp /var/tmp