Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 05-02-2007, 01:49 PM   #1
LQ Newbie
Registered: Apr 2007
Posts: 6

Rep: Reputation: 0
Talking Resizing a boot partition to free more space

Hey all

I recently reinstalled my Debian distribution due to minor problems. In my rush I forgot to set up a swap-partition! I kept wondering why I had speed problems (it's an old machine with a minimum of RAM).

Anyway, stupid as I was, I partitionized the entire drive for the debian system. Is it somehow possible to resize this? I would like to avoid using a floppy or CD if possible, since the hardware doesn't exist in that box, and I would have to move use the one from my other machine

Can this be done in any way?

Old 05-02-2007, 01:55 PM   #2
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
If you were to resize a partition, that partition can't probably be in use at the moment; that means you'll need to boot from an external media (cd, dvd, floppy, usb stick or whatever is supported) to be able to use some resizing software on the partition to be resized so that the partition is unmounted during the operation. That is, if you only have one partition (you said you "partitionized the entire drive for the debian system"). If you had two partitions, for example, you could probably/hopefully unmount the non-root partition and resize that. Operating on a mounted partition, if some program lets you do that, may result in a lot of damage to the data inside
Old 05-02-2007, 02:32 PM   #3
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
According to Linus, and others, there is no real performance difference anymore between swap-files and swap-partitions.

sudo dd if=/dev/zero of=/.swapfile bs=1M count=2048
sudo mskwap /.swapfile
echo '/.swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo swapon -av
Old 05-02-2007, 02:39 PM   #4
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
 sudo dd if=/dev/zero of=/.swapfile bs=1M count=2048
Are you recommending using 2GB? Wouldn't that be way too much for an old system with little RAM?
Old 05-06-2007, 11:00 AM   #5
LQ Newbie
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Ok so basically, you guys recommend to just set up a swap file instead of a dedicated partition?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running out of space - resizing my existing Linux partition gljubuncic Linux - Software 7 07-01-2006 09:48 PM
Getting low on Windows disk space...need partition resizing help. phekno General 12 04-03-2006 01:29 PM
resizing linux partitions to free up space for window$ - safe or clean install? dianat100 Linux - Newbie 5 03-09-2005 12:05 PM
deleting/resizing swap partition / increasing hd space saranga2000 Linux - Hardware 1 12-09-2004 10:03 AM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration