Find the answer to your Linux question:
Results 1 to 9 of 9
I just installed Debian Squeeze on a 250 Gb drive. After much hair pulling, I let the distro put the OS on one partition (Partition 1 + logic 5). The ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Location
    Houston, Texas.
    Posts
    57

    Too Much Swap...


    I just installed Debian Squeeze on a 250 Gb drive. After much hair pulling, I let the distro put the OS on one partition (Partition 1 + logic 5). The default set up gave Swap 10 Gb of space. Too damn much in my opinion.

    Try as I might, I just could not reduce the swap. Well, I could but I was left with the extra space (9Gb) not associated with the main partition. So I ended up with the / and logic and 9 Gb just hanging out there not being used. I worked on this for sometime before I popped in Gparted. Set up the HD with two partitions. One for the OS and the second for swap. I had them sized the way I wanted. But as soon as I booted up the Debian CD it took over and partition the HD as it wanted.

    I tried 'Guided', and every other way available to me. Never could reclaim that space. I finally gave up and accepted the default options.

    Whew! So, how can I reduce my swap and put it in the main partition without reinstalling? Debian Squeeze is working like a champ. Got it tweaked like I want it. But that 10Gb of swap bothers the hell out of me. What's the solution for reducing the swap to a more realistic 1GB (I have 3 Gb of RAM) and reclaim that lost space?

    Of course if it would be easier to reinstall, I'm all for that. I just don't want to give my swap so much space.

    Thanks

  2. #2
    Just Joined!
    Join Date
    Mar 2010
    Posts
    79
    If i recall it correct the default-setup by the installer makes the swap partition extented. The first partition (with the OS) is primary.
    That is the problem.
    Moving the space from an extented to a primary and vice versa is not that easy (at least for me).
    You may try to click on the list in the bottom-window of gparted (not the upper window with the ) and then move the free space to the primary partition. Click on the entry for the extented partition, not on one of the partitions of it.
    Bit of try and error.

    If you re-install choose manual partitioning and that should work fine.

    I for one would just leave it the way it is. (yes, 10GB for swap is "odd", but you got enough space anyway)

  3. #3
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I think you could get specific advice for your situation if you gave us more specific information. What exactly is your partition setup. Run the command: fdisk -l as root user and post it here.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Aug 2005
    Location
    Houston, Texas.
    Posts
    57
    fdisk-l results:
    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 29266 235071488 83 Linux
    /dev/sda2 29266 30402 9124865 5 Extended
    /dev/sda5 29266 30402 9124864 82 Linux swap / Solaris


    True I do have lots of space. And as I get older I'm less willing to mess with it. It's not like I am going to put it all to good use. And it's working.

    Yes, the default set is primary/extended.

    Anyway, I just might leave well enough alone. I'd still like to know how to manuplate my install for future use.

  6. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Boot up from GParted or PartedMagic LiveCD and delete SWAP partition (/dev/sda5). Delete /dev/sda2 partition after that.
    Resize /dev/sda1 partition and assign 9GB of free space to it. Create new SWAP partition using rest of free space ( 1GB ). There is no need to create any Extended Partition unless you are planning to create more that 4 partitions in future.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #6
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    With 3 GB of RAM I wouldn't waste disk space for swap.
    If there is some sort of emegency need for swap one can always create and use swap file(s).

  8. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    I forgot to mention that you will have to edit /etc/fstab file if you create /dev/sda2 partition as SWAP.

    I agree with Segfault. If you have 3GB RAM, there is no need of SWAP Partition.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Just Joined!
    Join Date
    Aug 2005
    Location
    Houston, Texas.
    Posts
    57
    Quote Originally Posted by devils casper View Post
    I forgot to mention that you will have to edit /etc/fstab file if you create /dev/sda2 partition as SWAP.

    I agree with Segfault. If you have 3GB RAM, there is no need of SWAP Partition.
    I started out using Linux in '98 or so. Some time around there. Gee it was rough back then. And while I feel comfortable opening a terminal and using an editor to manipulate a file, I've, over the years, gotten lazy. Of course Linux has advanced and made things easier as well. I rarely open a terminal to do things any more.

    It was fun back then to hop distros and jack around with config files to make things work. At that point in Linux's life it was necessary. It's not so any more.

    Still, a little control is not a bad thing. Thus my post. Thanks to all for your input. I think I just might get back into the dark side ( CLI/Terninal/editor) and see what I can do. If for no other reason than to say I can do it. God, I need to get a life! Or a woman.

    I have a laptop with Linux so it's not like I won't have access to the internet and you kind folks for assistance. Yes, I think I just might jump into it feet first. It's been a while since I have. Why the hell not? I'm going to work on this.

    Thanks to one and all.

  10. #9
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    i also agree with swap file over partition when you have much memory, just create swap file to meet your needs if necessary, can always increase its size later if you need it and doesn't take up a precious partition

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •