LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2010, 07:08 PM   #1
Ramesh922
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Rep: Reputation: 0
[Ubuntu] Help on creating Swap


http://img812.imageshack.us/img812/5830/swap.jpg

using Ubuntu on Virtual Box

can any1 help creating SWAP partition on /dev/sdb1


i tried this guide and getting error
Code:
http://ubuntuforums.org/archive/index.php/t-1396206.html
COMMAND LINE only pls

thank u
Attached Thumbnails
Click image for larger version

Name:	swap.JPG
Views:	13
Size:	56.4 KB
ID:	5424  

Last edited by Ramesh922; 12-08-2010 at 07:31 PM.
 
Old 12-08-2010, 07:14 PM   #2
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 882

Rep: Reputation: 45
Did you enable a swap partition when you installed Ubuntu in Virtual Box?

When you set up your diskdrive in Virtual Box did you make it a fixed size or dynamic size?

You have the option of creating a second diskdrive for your Virtual Ubuntu install and making a swap out of it.

We need more info to be able to help you any further.
 
Old 12-08-2010, 07:27 PM   #3
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 267

Rep: Reputation: 30
You seem to have a swap partition in /dev/sda5. Can't you use that partition.
 
Old 12-08-2010, 07:27 PM   #4
Ramesh922
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rbees View Post
Did you enable a swap partition when you installed Ubuntu in Virtual Box?

When you set up your diskdrive in Virtual Box did you make it a fixed size or dynamic size?

You have the option of creating a second diskdrive for your Virtual Ubuntu install and making a swap out of it.

We need more info to be able to help you any further.
error pic

#http://img683.imageshack.us/img683/2606/24650247.jpg

#2nd partiton as FIXED 5gb <---sdb1
ty 4 fast rply


Quote:
Originally Posted by fbsduser View Post
You seem to have a swap partition in /dev/sda5. Can't you use that partition.
can u tell me how to add extra swap partion (Sdb1)

ty

edit :sdb2 to sdb1(wr i nd my new swap)

Last edited by Ramesh922; 12-08-2010 at 07:31 PM.
 
Old 12-08-2010, 07:56 PM   #5
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
You seem to have discovered "mkswap" which formats a device as swap space. "swapon /dev/sdb1" Will tell your system to use it as swap until you restart. You'll need to edit /etc/fstab to make it persistent. Just copy and edit the line you have for /dev/sda5.

You don't really need to change the partition type to swap, but you can if you want. "fdisk" can do it, but I think "cfdisk" is much easier.
 
1 members found this post helpful.
Old 12-08-2010, 07:59 PM   #6
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
addendum: "cat /proc/swaps" will tell you which partitions are actively being used for swapspace.

If you need to you can also create a swapfile. It's slightly less efficient, but would be preferable to adding new drives just to avoid repartitioning.
 
Old 12-08-2010, 08:19 PM   #7
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 882

Rep: Reputation: 45
hmmm, the thumbnails are a new thing here since the last time I logged on. Sorry for looking ignorant. I am however curious as to why you want to add a second swap partition. Wouldn't be easier to just increase the amount of memory for the vm? Assuming that is that you have enough to do so without shorting the host.

I have not tried it but it would seem to me that you could assign your drive to a different vm (even one run straight from the iso) and use gparted to resize/repartition your drive.

Last edited by rbees; 12-08-2010 at 08:20 PM.
 
Old 12-08-2010, 11:17 PM   #8
Ramesh922
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by gd2shoe View Post
You seem to have discovered "mkswap" which formats a device as swap space. "swapon /dev/sdb1" Will tell your system to use it as swap until you restart. You'll need to edit /etc/fstab to make it persistent. Just copy and edit the line you have for /dev/sda5.

You don't really need to change the partition type to swap, but you can if you want. "fdisk" can do it, but I think "cfdisk" is much easier.
Quote:
Originally Posted by gd2shoe View Post
addendum: "cat /proc/swaps" will tell you which partitions are actively being used for swapspace.

If you need to you can also create a swapfile. It's slightly less efficient, but would be preferable to adding new drives just to avoid repartitioning.


thanks , it worked, and cat /proc/swaps is showing my swap

is there any good online manual/pdf which lists all linux commands and usage ?


thanks again



Quote:
Originally Posted by rbees View Post
hmmm, the thumbnails are a new thing here since the last time I logged on. Sorry for looking ignorant. I am however curious as to why you want to add a second swap partition. Wouldn't be easier to just increase the amount of memory for the vm? Assuming that is that you have enough to do so without shorting the host.

I have not tried it but it would seem to me that you could assign your drive to a different vm (even one run straight from the iso) and use gparted to resize/repartition your drive.

yup adding memory to vm is easy but VM alrdy using 75% of system memory

vm mem usage at 90-95%+
sys memory 4gb ,

Last edited by Ramesh922; 12-08-2010 at 11:20 PM.
 
Old 12-09-2010, 12:36 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
For online manuals, try
http://rute.2038bug.com/index.html.gz (tutorial)
http://linux.die.net/man/ (manual pages/cmds)
 
1 members found this post helpful.
Old 12-09-2010, 06:27 AM   #10
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 882

Rep: Reputation: 45
Quote:
Originally Posted by Ramesh922 View Post
yup adding memory to vm is easy but VM alrdy using 75% of system memory

vm mem usage at 90-95%+
sys memory 4gb ,
Why is your vm using that much memory? I don't know what you are using it for but that seems a little extreme. Are there some services in the vm, like a dhcp server that can be disabled?

Htop is a great little program that will sort processes by cpu,mem, alot of different ways. May help show you what is running that you can turn off. Also going to one of the lightweight desktops can help reduce your vm's footprint.
 
Old 12-10-2010, 01:23 AM   #11
Ramesh922
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rbees View Post
Why is your vm using that much memory? I don't know what you are using it for but that seems a little extreme. Are there some services in the vm, like a dhcp server that can be disabled?

Htop is a great little program that will sort processes by cpu,mem, alot of different ways. May help show you what is running that you can turn off. Also going to one of the lightweight desktops can help reduce your vm's footprint.

its kinda a Lan test game server(personal use only ) , Mem usage depends on how many game feature i allowed ,

currently have only command mode installed (no gfx)[i got this image as Vbox Export image ] . i cant install any programs there cause >.> cause unable to FIX net connection on Bridge mode , but that isnt a gr8 problem for me cause using it on my Lan only atm , but getting net fixed on it would b good if possible

i installed XP on Vbox in bridge mode (for testing bridge mode net )it was having no net problem only this Lan server(ubuntu(cmd mode only))(yes when testing i chged to Bridge mode for Ubuntu Lan servr ) but not working

wished ubuntu auto detected my net

Last edited by Ramesh922; 12-10-2010 at 01:27 AM.
 
Old 12-10-2010, 06:48 AM   #12
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 882

Rep: Reputation: 45
OK, I'm confused. Is the xp the vm or the ubuntu?
 
Old 12-10-2010, 01:39 PM   #13
Ramesh922
LQ Newbie
 
Registered: Jun 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rbees View Post
OK, I'm confused. Is the xp the vm or the ubuntu?

HOST = XP 32 bit , have win7 64 bit also[i use on both os]

Guest = Ubuntu server ver minimal install i think [no gfx]

Virtulization software= Virtual Box [Latest ver]
 
Old 12-10-2010, 03:47 PM   #14
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 882

Rep: Reputation: 45
OK, as for the network connection if you change the setting in virtual box for the network card on your vm to a 'nat' connection you should be able to install apps in the the vm. As I remember it there is only one of the virtual box nic's that will bridge correctly. I don't remember which one it is, but there was a lot of discussion about it some time ago. I have always found that a nat connection works well for the vm.

Start a new thread for that.
 
  


Reply


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
Need Help Increasing Swap by creating a swap file froggo Red Hat 3 06-13-2006 09:04 AM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 01:57 PM
creating swap lynos Linux - General 6 03-27-2004 08:07 AM
Creating a swap partition thejackal13 Linux - Newbie 6 10-30-2003 08:03 PM
Creating a swap partition dsuniln Linux - Newbie 9 06-30-2003 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:30 PM.

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