Sharing of swap partiton between linux systems?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
6
down vote
favorite
I have a laptop on which I have installed Ubuntu 12.04 and Windows
Now just for learning purposes I am going to install Backtrack OS on it.
My laptop has 4 GB of RAM so according to the recommendation I have allocated 8 GB of swap space on my hard drive.
can I share the swap space between these two OS (Backtrack and Ubuntu)
I really don't want to waste 8 GB of more space for swap (because as I have noticed it is rarely used and as far as I know OS doesn't store any data in swap space, does it?)
So is there a way with which I can share this 8 GB swap partition? If yes how?
swap
add a comment |Â
up vote
6
down vote
favorite
I have a laptop on which I have installed Ubuntu 12.04 and Windows
Now just for learning purposes I am going to install Backtrack OS on it.
My laptop has 4 GB of RAM so according to the recommendation I have allocated 8 GB of swap space on my hard drive.
can I share the swap space between these two OS (Backtrack and Ubuntu)
I really don't want to waste 8 GB of more space for swap (because as I have noticed it is rarely used and as far as I know OS doesn't store any data in swap space, does it?)
So is there a way with which I can share this 8 GB swap partition? If yes how?
swap
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
I have a laptop on which I have installed Ubuntu 12.04 and Windows
Now just for learning purposes I am going to install Backtrack OS on it.
My laptop has 4 GB of RAM so according to the recommendation I have allocated 8 GB of swap space on my hard drive.
can I share the swap space between these two OS (Backtrack and Ubuntu)
I really don't want to waste 8 GB of more space for swap (because as I have noticed it is rarely used and as far as I know OS doesn't store any data in swap space, does it?)
So is there a way with which I can share this 8 GB swap partition? If yes how?
swap
I have a laptop on which I have installed Ubuntu 12.04 and Windows
Now just for learning purposes I am going to install Backtrack OS on it.
My laptop has 4 GB of RAM so according to the recommendation I have allocated 8 GB of swap space on my hard drive.
can I share the swap space between these two OS (Backtrack and Ubuntu)
I really don't want to waste 8 GB of more space for swap (because as I have noticed it is rarely used and as far as I know OS doesn't store any data in swap space, does it?)
So is there a way with which I can share this 8 GB swap partition? If yes how?
swap
edited Mar 15 '14 at 16:52
Braiam
49.8k20130213
49.8k20130213
asked Nov 15 '13 at 16:05
![](https://i.stack.imgur.com/h1V1d.jpg?s=32&g=1)
![](https://i.stack.imgur.com/h1V1d.jpg?s=32&g=1)
Null pointer
1,29241427
1,29241427
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
9
down vote
accepted
Yes, you can share swap area with two or more operating systems. To share swap area, create the swap area when you install the first operating system and then when you install the second one, do not create a new swap area, instead just use the first OS's swap area as the mount point for swap area of the second OS.
If you have already installed both OS's, use gparted to create a common swap area and then add it to your /etc/fstab
file to automount it at boot-time.
Just in case you would like to know the drawbacks of using a shared swap area, refer this question on StackExchange:
- Ill-effects of sharing swap area
Thanks ...and can please explain the process of adding it to fstab...because I have already installed Backtrack OS and btw jobin I am from TYIT..:p
â Null pointer
Nov 15 '13 at 16:18
Found an answer explaining this verbose: askubuntu.com/questions/232790/â¦
â jobin
Nov 15 '13 at 16:32
@Nullpointer: Great! Good to know I have company here! :)
â jobin
Nov 15 '13 at 16:38
1
@Nullpointer If this answered your question, you may mark this answer as accepted, by clicking the green check mark next to it. That will indicate that your problem is solved.
â Radu RÃÂdeanu
Nov 15 '13 at 18:18
Yeah! My mistake! I usually do that! But I forgot this time! Thanks for reminding me!
â Null pointer
Nov 16 '13 at 4:08
 |Â
show 1 more comment
up vote
6
down vote
Yes, it's possible. The swap is only used while the system is running, so you can do what you want with the swap space when it isn't running, such as use it as swap space for another Linux installation. You can even share swap space between Linux and Windows, but it's a bit more work.
There is one exception: if you want to hibernate, then the swap space is in use while the system is hibernating.
If you point the installer at the existing swap space during the installation of the second distribution, it will be able to make use of it.
With today's disk sizes, there is usually no point in saving a couple of GB with such tricks. But it's possible.
However, I question the utility in installing two Linux distributions in dual boot. Dual boot sucks âÂÂàyou can't run the two operating systems at the same time. If you want to run programs from two different Ubuntu releases, or more generally from two Linux distributions, I recommend a different approach: pick the one that has the most recent kernel and use it as your main operating system. Install the second one and run programs from it directly from your installed system, using schroot. I've written a guide on doing this which covers the installation of the second system using debootstrap and the schroot setup.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
9
down vote
accepted
Yes, you can share swap area with two or more operating systems. To share swap area, create the swap area when you install the first operating system and then when you install the second one, do not create a new swap area, instead just use the first OS's swap area as the mount point for swap area of the second OS.
If you have already installed both OS's, use gparted to create a common swap area and then add it to your /etc/fstab
file to automount it at boot-time.
Just in case you would like to know the drawbacks of using a shared swap area, refer this question on StackExchange:
- Ill-effects of sharing swap area
Thanks ...and can please explain the process of adding it to fstab...because I have already installed Backtrack OS and btw jobin I am from TYIT..:p
â Null pointer
Nov 15 '13 at 16:18
Found an answer explaining this verbose: askubuntu.com/questions/232790/â¦
â jobin
Nov 15 '13 at 16:32
@Nullpointer: Great! Good to know I have company here! :)
â jobin
Nov 15 '13 at 16:38
1
@Nullpointer If this answered your question, you may mark this answer as accepted, by clicking the green check mark next to it. That will indicate that your problem is solved.
â Radu RÃÂdeanu
Nov 15 '13 at 18:18
Yeah! My mistake! I usually do that! But I forgot this time! Thanks for reminding me!
â Null pointer
Nov 16 '13 at 4:08
 |Â
show 1 more comment
up vote
9
down vote
accepted
Yes, you can share swap area with two or more operating systems. To share swap area, create the swap area when you install the first operating system and then when you install the second one, do not create a new swap area, instead just use the first OS's swap area as the mount point for swap area of the second OS.
If you have already installed both OS's, use gparted to create a common swap area and then add it to your /etc/fstab
file to automount it at boot-time.
Just in case you would like to know the drawbacks of using a shared swap area, refer this question on StackExchange:
- Ill-effects of sharing swap area
Thanks ...and can please explain the process of adding it to fstab...because I have already installed Backtrack OS and btw jobin I am from TYIT..:p
â Null pointer
Nov 15 '13 at 16:18
Found an answer explaining this verbose: askubuntu.com/questions/232790/â¦
â jobin
Nov 15 '13 at 16:32
@Nullpointer: Great! Good to know I have company here! :)
â jobin
Nov 15 '13 at 16:38
1
@Nullpointer If this answered your question, you may mark this answer as accepted, by clicking the green check mark next to it. That will indicate that your problem is solved.
â Radu RÃÂdeanu
Nov 15 '13 at 18:18
Yeah! My mistake! I usually do that! But I forgot this time! Thanks for reminding me!
â Null pointer
Nov 16 '13 at 4:08
 |Â
show 1 more comment
up vote
9
down vote
accepted
up vote
9
down vote
accepted
Yes, you can share swap area with two or more operating systems. To share swap area, create the swap area when you install the first operating system and then when you install the second one, do not create a new swap area, instead just use the first OS's swap area as the mount point for swap area of the second OS.
If you have already installed both OS's, use gparted to create a common swap area and then add it to your /etc/fstab
file to automount it at boot-time.
Just in case you would like to know the drawbacks of using a shared swap area, refer this question on StackExchange:
- Ill-effects of sharing swap area
Yes, you can share swap area with two or more operating systems. To share swap area, create the swap area when you install the first operating system and then when you install the second one, do not create a new swap area, instead just use the first OS's swap area as the mount point for swap area of the second OS.
If you have already installed both OS's, use gparted to create a common swap area and then add it to your /etc/fstab
file to automount it at boot-time.
Just in case you would like to know the drawbacks of using a shared swap area, refer this question on StackExchange:
- Ill-effects of sharing swap area
edited Apr 13 '17 at 12:37
Communityâ¦
1
1
answered Nov 15 '13 at 16:12
jobin
18.7k1272106
18.7k1272106
Thanks ...and can please explain the process of adding it to fstab...because I have already installed Backtrack OS and btw jobin I am from TYIT..:p
â Null pointer
Nov 15 '13 at 16:18
Found an answer explaining this verbose: askubuntu.com/questions/232790/â¦
â jobin
Nov 15 '13 at 16:32
@Nullpointer: Great! Good to know I have company here! :)
â jobin
Nov 15 '13 at 16:38
1
@Nullpointer If this answered your question, you may mark this answer as accepted, by clicking the green check mark next to it. That will indicate that your problem is solved.
â Radu RÃÂdeanu
Nov 15 '13 at 18:18
Yeah! My mistake! I usually do that! But I forgot this time! Thanks for reminding me!
â Null pointer
Nov 16 '13 at 4:08
 |Â
show 1 more comment
Thanks ...and can please explain the process of adding it to fstab...because I have already installed Backtrack OS and btw jobin I am from TYIT..:p
â Null pointer
Nov 15 '13 at 16:18
Found an answer explaining this verbose: askubuntu.com/questions/232790/â¦
â jobin
Nov 15 '13 at 16:32
@Nullpointer: Great! Good to know I have company here! :)
â jobin
Nov 15 '13 at 16:38
1
@Nullpointer If this answered your question, you may mark this answer as accepted, by clicking the green check mark next to it. That will indicate that your problem is solved.
â Radu RÃÂdeanu
Nov 15 '13 at 18:18
Yeah! My mistake! I usually do that! But I forgot this time! Thanks for reminding me!
â Null pointer
Nov 16 '13 at 4:08
Thanks ...and can please explain the process of adding it to fstab...because I have already installed Backtrack OS and btw jobin I am from TYIT..:p
â Null pointer
Nov 15 '13 at 16:18
Thanks ...and can please explain the process of adding it to fstab...because I have already installed Backtrack OS and btw jobin I am from TYIT..:p
â Null pointer
Nov 15 '13 at 16:18
Found an answer explaining this verbose: askubuntu.com/questions/232790/â¦
â jobin
Nov 15 '13 at 16:32
Found an answer explaining this verbose: askubuntu.com/questions/232790/â¦
â jobin
Nov 15 '13 at 16:32
@Nullpointer: Great! Good to know I have company here! :)
â jobin
Nov 15 '13 at 16:38
@Nullpointer: Great! Good to know I have company here! :)
â jobin
Nov 15 '13 at 16:38
1
1
@Nullpointer If this answered your question, you may mark this answer as accepted, by clicking the green check mark next to it. That will indicate that your problem is solved.
â Radu RÃÂdeanu
Nov 15 '13 at 18:18
@Nullpointer If this answered your question, you may mark this answer as accepted, by clicking the green check mark next to it. That will indicate that your problem is solved.
â Radu RÃÂdeanu
Nov 15 '13 at 18:18
Yeah! My mistake! I usually do that! But I forgot this time! Thanks for reminding me!
â Null pointer
Nov 16 '13 at 4:08
Yeah! My mistake! I usually do that! But I forgot this time! Thanks for reminding me!
â Null pointer
Nov 16 '13 at 4:08
 |Â
show 1 more comment
up vote
6
down vote
Yes, it's possible. The swap is only used while the system is running, so you can do what you want with the swap space when it isn't running, such as use it as swap space for another Linux installation. You can even share swap space between Linux and Windows, but it's a bit more work.
There is one exception: if you want to hibernate, then the swap space is in use while the system is hibernating.
If you point the installer at the existing swap space during the installation of the second distribution, it will be able to make use of it.
With today's disk sizes, there is usually no point in saving a couple of GB with such tricks. But it's possible.
However, I question the utility in installing two Linux distributions in dual boot. Dual boot sucks âÂÂàyou can't run the two operating systems at the same time. If you want to run programs from two different Ubuntu releases, or more generally from two Linux distributions, I recommend a different approach: pick the one that has the most recent kernel and use it as your main operating system. Install the second one and run programs from it directly from your installed system, using schroot. I've written a guide on doing this which covers the installation of the second system using debootstrap and the schroot setup.
add a comment |Â
up vote
6
down vote
Yes, it's possible. The swap is only used while the system is running, so you can do what you want with the swap space when it isn't running, such as use it as swap space for another Linux installation. You can even share swap space between Linux and Windows, but it's a bit more work.
There is one exception: if you want to hibernate, then the swap space is in use while the system is hibernating.
If you point the installer at the existing swap space during the installation of the second distribution, it will be able to make use of it.
With today's disk sizes, there is usually no point in saving a couple of GB with such tricks. But it's possible.
However, I question the utility in installing two Linux distributions in dual boot. Dual boot sucks âÂÂàyou can't run the two operating systems at the same time. If you want to run programs from two different Ubuntu releases, or more generally from two Linux distributions, I recommend a different approach: pick the one that has the most recent kernel and use it as your main operating system. Install the second one and run programs from it directly from your installed system, using schroot. I've written a guide on doing this which covers the installation of the second system using debootstrap and the schroot setup.
add a comment |Â
up vote
6
down vote
up vote
6
down vote
Yes, it's possible. The swap is only used while the system is running, so you can do what you want with the swap space when it isn't running, such as use it as swap space for another Linux installation. You can even share swap space between Linux and Windows, but it's a bit more work.
There is one exception: if you want to hibernate, then the swap space is in use while the system is hibernating.
If you point the installer at the existing swap space during the installation of the second distribution, it will be able to make use of it.
With today's disk sizes, there is usually no point in saving a couple of GB with such tricks. But it's possible.
However, I question the utility in installing two Linux distributions in dual boot. Dual boot sucks âÂÂàyou can't run the two operating systems at the same time. If you want to run programs from two different Ubuntu releases, or more generally from two Linux distributions, I recommend a different approach: pick the one that has the most recent kernel and use it as your main operating system. Install the second one and run programs from it directly from your installed system, using schroot. I've written a guide on doing this which covers the installation of the second system using debootstrap and the schroot setup.
Yes, it's possible. The swap is only used while the system is running, so you can do what you want with the swap space when it isn't running, such as use it as swap space for another Linux installation. You can even share swap space between Linux and Windows, but it's a bit more work.
There is one exception: if you want to hibernate, then the swap space is in use while the system is hibernating.
If you point the installer at the existing swap space during the installation of the second distribution, it will be able to make use of it.
With today's disk sizes, there is usually no point in saving a couple of GB with such tricks. But it's possible.
However, I question the utility in installing two Linux distributions in dual boot. Dual boot sucks âÂÂàyou can't run the two operating systems at the same time. If you want to run programs from two different Ubuntu releases, or more generally from two Linux distributions, I recommend a different approach: pick the one that has the most recent kernel and use it as your main operating system. Install the second one and run programs from it directly from your installed system, using schroot. I've written a guide on doing this which covers the installation of the second system using debootstrap and the schroot setup.
edited Apr 13 '17 at 12:37
Communityâ¦
1
1
answered Mar 15 '14 at 13:22
![](https://i.stack.imgur.com/cFyP6.jpg?s=32&g=1)
![](https://i.stack.imgur.com/cFyP6.jpg?s=32&g=1)
Gilles
43.3k1398137
43.3k1398137
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f377516%2fsharing-of-swap-partiton-between-linux-systems%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password