SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-02-07 02:03:49

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

[Resolved] Redistribute free space to system partition

While I was testing out CrunchBang, I left an xubuntu partition on the HD. I find #! superior in every way to xubuntu and have deleted the xubuntu partition. I would now like to redistribute the free space to my CrunchBang partition. I tried do this via GParted (System>Disk Partitioner), but I don't seem to be able to resize the partition. How can I accomplish this task? Thanks.

I found these instructions http://www.howtoforge.com/linux_resizin … itions_p2, but they seem a bit complicated. Any easy way to do this?

Last edited by nabilalk (2009-02-13 10:29:18)


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

Help fund CrunchBang, donate to the project!

#2 2009-02-07 15:28:24

arpinux
#! Die Hard
From: Montréal, France
Registered: 2009-01-15
Posts: 685
Website

Re: [Resolved] Redistribute free space to system partition

hi,
you can't resize partition you're using, you have to do it from 'outside'.
the easiest way to do that, is using a live cd ( ubuntu, crunchbang, gparted livecd, system rescue cd...)
you will be abble to move/resize/configure your old partitions.

Offline

#3 2009-02-07 18:41:10

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

arpinux wrote:

hi,
you can't resize partition you're using, you have to do it from 'outside'.
the easiest way to do that, is using a live cd ( ubuntu, crunchbang, gparted livecd, system rescue cd...)
you will be abble to move/resize/configure your old partitions.

Would you mind walking me through the process with the CrunchBang Live cd?


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#4 2009-02-07 19:01:03

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: [Resolved] Redistribute free space to system partition

Boot into a liveCD, open gparted. It should show you your HDD and the partitions on it If you have already delete the xubuntu one, you should see free or unallocated space. So you should be able to just rezise the #! partition to take that up. you should be able to just drag the edge of it, to take up the free space from the xubuntu partition. then apply the changes.
note: Anytime you are playing with partitions it is a good idea to backup all crucial data.

Offline

#5 2009-02-07 19:16:46

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

Boot into a liveCD, open gparted. It should show you your HDD and the partitions on it If you have already delete the xubuntu one, you should see free or unallocated space. So you should be able to just rezise the #! partition to take that up. you should be able to just drag the edge of it, to take up the free space from the xubuntu partition. then apply the changes.
note: Anytime you are playing with partitions it is a good idea to backup all crucial data.

Cool, thanks for the walkthrough. Question, I seem to have two swap files. Is this normal for #! or is one of those swap files left over from the xubuntu install? I selected auto configure when I installed #!, so it set the swap size and system partition side for me.


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#6 2009-02-07 19:27:40

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: [Resolved] Redistribute free space to system partition

I would have thought #! would have used the existing swap. Maybe not. Anyway, if you check your /etc/fstab it should tell you which partition is being used. The other should be able to be done away with.

Offline

#7 2009-02-07 19:43:16

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

I would have thought #! would have used the existing swap. Maybe not. Anyway, if you check your /etc/fstab it should tell you which partition is being used. The other should be able to be done away with.

ty for the clarification.


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#8 2009-02-07 23:55:31

ggarron
#! Member
From: Bolivia
Registered: 2009-02-07
Posts: 86
Website

Re: [Resolved] Redistribute free space to system partition

nabilalk wrote:
wmdiem wrote:

I would have thought #! would have used the existing swap. Maybe not. Anyway, if you check your /etc/fstab it should tell you which partition is being used. The other should be able to be done away with.

ty for the clarification.

Anyway, to recover disk space, you may erase one of the swap partition and add that space to any other partitions where you may need it, and make xubuntu and crunchbang use the same swap partition.

You may read this http://www.go2linux.org/dual-boot-two-l … d-mandriva it is actually mandriva and Debian, but may help you.

Remember that if you hibernate or suspend (do not remember wich of them) will put all ram in swap, so if you then boot with the other Linux you will loose that data.

In that case, it is better to have two partitions.


Guillermo Garron
Linux is user-friendly... It is just selective about who its friends are.
http://garron.me

Offline

#9 2009-02-08 00:09:14

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: [Resolved] Redistribute free space to system partition

ggarron wrote:

You may read this http://www.go2linux.org/dual-boot-two-l … d-mandriva it is actually mandriva and Debian, but may help you.

Remember that if you hibernate or suspend (do not remember wich of them) will put all ram in swap, so if you then boot with the other Linux you will loose that data.

In that case, it is better to have two partitions.

Hibernate (suspend to disk) writes the memory to swap. Suspend (suspend to ram) keeps it in ram.
He already deleted the other linux installation, so there shouldn't be an issue, as long as the one he deletes isn't in the fstab of the install he is using.

Offline

#10 2009-02-08 01:49:15

ggarron
#! Member
From: Bolivia
Registered: 2009-02-07
Posts: 86
Website

Re: [Resolved] Redistribute free space to system partition

thanks for the clarification,
regards.


Guillermo Garron
Linux is user-friendly... It is just selective about who its friends are.
http://garron.me

Offline

#11 2009-02-08 02:47:16

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

Remember that if you hibernate or suspend (do not remember wich of them) will put all ram in swap, so if you then boot with the other Linux you will loose that data.

In that case, it is better to have two partitions.

Why does hibernating or suspending do that? Also, I already deleted the xubuntu partition, so will hibernating or suspending still cause a loss of data? Thanks.


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#12 2009-02-08 02:55:58

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: [Resolved] Redistribute free space to system partition

hibernating saves the system state by writing your RAM to disk (your swap partition) and then turning off the computer. When you turn it on and boot into that kernel it resumes by loading what is stored in the swap file back into RAM, so you start off back where you left off. ggarron was pointing out that if you have two instances of linux on one computer, and you use hibernate you should have each one using its own swap partition so that if you hibernate in one, you won't lose that state if you boot into the other one (since the second one would use the swap partition for swap and overwrite the saved state from the other). It shouldn't be an issue if you are only using one instance of linux on the machine.

Offline

#13 2009-02-08 05:18:14

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

hibernating saves the system state by writing your RAM to disk (your swap partition) and then turning off the computer. When you turn it on and boot into that kernel it resumes by loading what is stored in the swap file back into RAM, so you start off back where you left off. ggarron was pointing out that if you have two instances of linux on one computer, and you use hibernate you should have each one using its own swap partition so that if you hibernate in one, you won't lose that state if you boot into the other one (since the second one would use the swap partition for swap and overwrite the saved state from the other). It shouldn't be an issue if you are only using one instance of linux on the machine.

ic, thanks for the info. Now all I have to do is figure out which Swap goes with what and redistribute the free space.


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#14 2009-02-08 05:39:36

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

if you check your /etc/fstab it should tell you which partition is being used. The other should be able to be done away with.

I´m in the Live CD now and have launched GParted. Where is the /etc/fstab?

Is that a command in terminal? Also, assuming i leave things as is, with two swap files one 619.66 MB and the second 729.48 MB with 256 MB Ram built in, is it better to have a larger SWAP capacity? Does that help the system run faster, or should the SWAP file size, depend on the size of the built in RAM?

Lastly, I see an option to resize the Linux partition, but not an option to redistribute the free space. I have 4.69 GB of unallocated space that I would like to add to the system partition, how do I do that? Do I need to create a new partition with the unallocated space first and then combine the two somehow? Thanks.

Last edited by nabilalk (2009-02-08 05:46:53)


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#15 2009-02-08 11:34:59

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: [Resolved] Redistribute free space to system partition

/etc/fstab is the absolute path (starting from /) to a text file that lists the partitions that the linux knows to mount. You can just type

gedit /etc/fstab 

It is a messy tab delimited file, but just keep in mind that each line is an entry, and you are looking for the one that references sw and swap.

Either of the two swap files should be fine with that much RAM, larger swap helps the system run faster to a point and let's the computer run more apps at once, but past that point it either goes unused by the system or if it is used (because you keep opening apps that keep asking for more memory) your computer will start to become very very slow. Basically swap is a poor replacement for real RAM, a bit of it will let the system use the real RAM better, but you don't want to push your computer so it is usings several times your actual RAM in swap. Swap doesn't hurt, but there is a serious limit to what it can do.
You do not want to make the allocated space into a partition. You want to move or resize the existing partitions. If the unallocated space and the Linux partition are next to each other you should be able to resize the linux partition to include the unallocated. If something is in betweent them, (e.g. Linux then swap then unallocated space) you need to move the thing in the middle (e.g., the swap) all the way to one end, so the unallocated space and the linux partition are next to each other, then resize the linux. BTW, if you are making multiple changes try to apply each change before making the next one.

Offline

#16 2009-02-08 20:44:20

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

/etc/fstab is the absolute path (starting from /) to a text file that lists the partitions that the linux knows to mount. You can just type

gedit /etc/fstab 

It is a messy tab delimited file, but just keep in mind that each line is an entry, and you are looking for the one that references sw and swap.

I could really use some help interpreting the

gedit /etc/fstab

file

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda6
UUID=e951b95e-74b1-4679-9136-5cd1c99c8574 /               ext3    relatime,errors=remount-ro 0       1
# /dev/sda7
UUID=690c11b0-2a63-45e4-ac7f-28161472340f none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0

I have included a screenshot of my partitions list from GParted. I don't see an option for shifting the order of the partitions in the list. I also don't know which swap is for the  Linux system partition. I suppose since /dev/sda5 isn't listed in the gpedit etc/fstab file, that it is Not the swap file that the Linux partition is using. Am I correct in this assumption?

2009020812341255061024xxf5.th.png

Last edited by nabilalk (2009-02-08 21:06:55)


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#17 2009-02-08 22:01:00

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: [Resolved] Redistribute free space to system partition

# /dev/sda7
UUID=690c11b0-2a63-45e4-ac7f-28161472340f none            swap    sw              0       0

^that's the swap that its using, i.e., the one you want to keep
so you can get rid of the other one, i.e., /dev/sda5

so delete sda5, apply changes
move sda7, to the end of the disk, apply
expand sda6 to the right to take up the newly freed space, apply
expand sda2 to the left to take up the xubuntu space, apply
if necessary expand sda6 to the left to take up all the space, apply

Offline

#18 2009-02-08 22:03:28

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

# /dev/sda7
UUID=690c11b0-2a63-45e4-ac7f-28161472340f none            swap    sw              0       0

^that's the swap that its using, i.e., the one you want to keep
so you can get rid of the other one, i.e., /dev/sda5

so delete sda5, apply changes
move sda7, to the end of the disk, apply
expand sda6 to the right to take up the newly freed space, apply
expand sda2 to the left to take up the xubuntu space, apply
if necessary expand sda6 to the left to take up all the space, apply

When you say move and expand to left/right, I don't see the options for that in Gparted.  There is no drag and drop that I can see, and I can't right click to shift the order. Sorry for my ignorance. Can you walk me through each of the steps in a bit more detail? Thanks so much for the continued help.

-nka


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#19 2009-02-08 22:11:35

wmdiem
#! Member
Registered: 2008-12-26
Posts: 70

Re: [Resolved] Redistribute free space to system partition

to move you can right click the partition you are changing, then select resize/move, to move it all the way to the left set space before to 0, to move all the way to the right set space after to 0. You can do the same thing by dragging each side (one at a time) one way or the other.
Does this help?

Offline

#20 2009-02-08 22:21:16

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

wmdiem wrote:

to move you can right click the partition you are changing, then select resize/move, to move it all the way to the left set space before to 0, to move all the way to the right set space after to 0. You can do the same thing by dragging each side (one at a time) one way or the other.
Does this help?

lol, I figured that out just before your latest post. I'm currently working on it. Will post back if I have more Q's

Ok, I am unable to expand sda2 to the left. Resize/Move is not an available option and is greyed out. I have gotten rid of the extra swap file, but I am still left with the 4.69 of unallocated space. All options to resize/move the unallocated space are greyed out as well. What should I do next?

Here is a new screen of the partitions:

2009020912341458911024xmd3.th.png

thx.

Last edited by nabilalk (2009-02-09 02:22:10)


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#21 2009-02-13 04:24:39

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: [Resolved] Redistribute free space to system partition

nabilalk wrote:
wmdiem wrote:

to move you can right click the partition you are changing, then select resize/move, to move it all the way to the left set space before to 0, to move all the way to the right set space after to 0. You can do the same thing by dragging each side (one at a time) one way or the other.
Does this help?

lol, I figured that out just before your latest post. I'm currently working on it. Will post back if I have more Q's

Ok, I am unable to expand sda2 to the left. Resize/Move is not an available option and is greyed out. I have gotten rid of the extra swap file, but I am still left with the 4.69 of unallocated space. All options to resize/move the unallocated space are greyed out as well. What should I do next?

Here is a new screen of the partitions:

2009020912341458911024xmd3.th.png

thx.

After changing the partitions and restarting, I can't boot into CB. I get a Error 17 saying that GRUB won't load. How can I reconfigure the /etc/fstab if I can't boot into CB?

Update: Resolved

Last edited by nabilalk (2009-02-13 10:29:02)


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo