[ltp] Wasted Free Space

Alex Bell linux-thinkpad@www.bm-soft.com
Mon, 27 Mar 2000 18:03:25 -0500


On Mon, 27 Mar 2000 14:30:48 -0500, George Staikos wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>
>On Mon, 27 Mar 2000, Alex Bell wrote:
>> Pardon me if this is off topic for this list, but I had no success with
>> Usenet.
>> 
>> Because of mistakes I made when installing Corel Linux on my ThinkPad
>> 385XD the computer has a small swap partition and about 23Mb wasted
>> free space at the end of the hard drive right next to the swap
>> partition.
>> 
>> Is there any way I can delete the swap partition so as to merge it with
>> the free space, and then format the resulting free space as a swap
>> partition?  I've looked at linux Fdisk and FIPS but find them hard to
>> understand.  
>> 
Snipped

>  Yes.  it's safest to do this kind of thing in single user mode, but if
>you're not familiar with this, it still works in multiuser mode (i've done
>it many times).  Run swapoff on the swap device, run fdisk and delete the
>partition, recreating a new one of the proper size (assuming the swap and the
>freespace are adjacent as you said they are).  Toggle it as Linux Swap (type
>82 I think?  look it up in the list....).  then take note of the new device
>name (ie /dev/hda6 or something like that).  Exit fdisk, saving the changes. 
>You _may_ have to reboot at this point.  If you do, just log in as root and
>continue (it will tell you if you have to when you exit fdisk - saying
>something like "error writing partition").  Now run mkswap /dev/hda?
>(whatever hda device your swap partition is).  Then swapon /dev/hda?.  That's
>it!  Beware that you can toast your linux installation doing this if you
>touch the wrong partition.  Be careful and read all the documentation on the
>programs you are using.  I take no responsibility for anything you break. :) 
>Playing with partitions is always dangerous.
>
Thanks, George.  That's most helpful.  But I think I'll try to get more
information on swapoff, swapon, and mkswap before I go any further.  I
presume they have man pages?



----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html