LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [Ubuntu] Help on creating Swap (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bubuntu%5D-help-on-creating-swap-849156/)

Ramesh922 12-08-2010 06:08 PM

[Ubuntu] Help on creating Swap
 
1 Attachment(s)
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

rbees 12-08-2010 06:14 PM

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.

fbsduser 12-08-2010 06:27 PM

You seem to have a swap partition in /dev/sda5. Can't you use that partition.

Ramesh922 12-08-2010 06:27 PM

Quote:

Originally Posted by rbees (Post 4185274)
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 (Post 4185282)
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)

gd2shoe 12-08-2010 06:56 PM

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.

gd2shoe 12-08-2010 06:59 PM

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.

rbees 12-08-2010 07:19 PM

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.

Ramesh922 12-08-2010 10:17 PM

Quote:

Originally Posted by gd2shoe (Post 4185309)
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 (Post 4185314)
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 (Post 4185336)
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 ,

chrism01 12-08-2010 11:36 PM

For online manuals, try
http://rute.2038bug.com/index.html.gz (tutorial)
http://linux.die.net/man/ (manual pages/cmds)

rbees 12-09-2010 05:27 AM

Quote:

Originally Posted by Ramesh922 (Post 4185464)
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.

Ramesh922 12-10-2010 12:23 AM

Quote:

Originally Posted by rbees (Post 4185756)
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

rbees 12-10-2010 05:48 AM

OK, I'm confused. Is the xp the vm or the ubuntu?

Ramesh922 12-10-2010 12:39 PM

Quote:

Originally Posted by rbees (Post 4186895)
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]

rbees 12-10-2010 02:47 PM

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.


All times are GMT -5. The time now is 10:50 PM.