Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a 250gb, seagate sata disk. I have dedicated 25gb to ubuntu. While partitioning for ubuntu mistakenly i gave only 600mb of space to /var partition. Now when i am going to install a new software the system is not letting me to install by giving an error message like "Not enough disk pace, cannot continue the installation" or "not enough space in /var".
Can i repartition the /var partition giving more space. Acually i hav /usr3 partition of 1.3gb. I dont need this can i merge /var and /usr3 as /var? Then i can get more space for /var Guide me..thank you in advance
But i am new to the ubuntu and i know very little of shell commands. I am good at using the regular commands like cut,paste,join etc. I dont know the usage of mounting commands. I am confused at new_var, rsync and mkdir /mnt{old_var,new_var} command. I have live ubuntu8.1DVD. Can you please giv me the command list according to my system requirements to increase /var partition?
mkdir will create a dir rsync is a powerful way to copy files. mount allows you to mount a partition to a location. You must understand how Unix mounts partitions, it's very important.
The idea is to move your '/var data' to your '/' directory.
Thank you lot for all your support.... I am not in station...on the tour to enjoy the year end. I will try this in the new year. I wish you all Happy New Year.
You said you don't need /usr3. So wipe out all the data there:
(1) sudo rm -rf /usr3/*
Note: The above command is simple enough, but a single extra space typo'ed in between the slash and the asterick will really screw you! It is probably better to do it this way to be safe:
(1a) cd /usr3
(1b) pwd (verify that you are REALLY in /usr3)
(1c) pwd (yes, verify that you are really in /usr3 a SECOND TIME)
(1d) sudo rm -rf *
Next, clean up uneeded stuff currently under /var
(2) sudo apt-get clean
(3) rm -rf /var/tmp/*
Note: ... or ... for safety from typos, do the remove like (1a) - (1d) above
Next, copy /var to /usr3
(4) sudo cp -r /var/* /usr3/.
Note: Watch them spaces again! I keep pointing this out to you because you said you weren't terribly good with the command line. It's powerful. So powerful in fact, that you can nuke yourself in short order with a simple typo.
Next, unmount /var and /usr3
(5) umount /var
(6) umount /usr3
Note: You may have trouble unmounting /var on a running system because processes may be holding files open there. If you can't identify and nuke these processes (use "lsof /var" to find them), you may have to do this filesystem switch-a-roo using a LiveCD.
Next, mount the OLD /usr3 as /var, and the OLD /var as /usr3
(7) mount /dev/sda15 /var
(8) mount /dev/sda12 /usr3
Next, edit /etc/fstab to permanently switch the /usr3 and /var mountpoints
(9) sudo vi /etc/fstab (make appropriate changes)
Note: You need to research and learn what these fstab changes are yourself, so you know what you are doing before you start editing. They're simple, but if you mess them up you might end up with a non-bootable system. This is why you make backup copies of important files before editing AND always have a LiveCD handy that you can boot from to fix errors. I recommend SystemRescueCD.
Next, learn about LVM ("Logical Volume Management") so you can avoid these hard-partition problems in the future.
Don't know about others, I still prefer to just define / for
my linux system (of course, a separate SWAP partition to be shared
by all other linux distros). I don't want to be bothered by how much to give for /var, /home.. (the partition table will look very messy, not really ideal for multiboot). Actually I find migrating would be easier if I have everything under one roof, but well, that's just me.
Sorry friends(especially eco and haetig).... i could follow to create folders...unmounting the /var and /usr3 but unable to edit my fstab. Then i did following experiments without any experiance(lol)
1. Using gparted i deleted /usr3 and using later using live cd of gparted i deleted /var also(ofcourse the /var contents i copied into some other directory).
2. Then i tried to create a new /var using gparted....when i selected <new> option in gparted i could not found any mount point option in it(i could only create a logical partition as /dev/sda)
3 Then i tried to boot into ubuntu......thats...all..... it failed to boot...it went into cli mode....by telling that there is know /var partition. Here i failed to repair it.
4 After then i loaded ubuntu again. Here i created partitions like this on 25gb space located to ubuntu
Here i did not select / partition to be formatted. So luckily i got back all my data which are saved in /home/varun, but i lost the installed 3rd party softwares(like mysql, php, vim-full, gawk3.1.6 etc.,)
NOW I AM FACING ONE MORE PROBLEM. Here i started to install the above softwares thru apt-get command, but the system is not letting me to do so....the following is the error..at command line..
root@varun-varsha:/home/varun# sudo apt-get install mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package mysql
root@varun-varsha:/home/varun# apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package php5
Can anybody solve my problem. Thank you in advance.
Well, I can't *solve* your problem - but I can hopefully help YOU to solve it!
You do NOT need to reinstall all your software! It's all there - the problem is the ubuntu file or database (I'm ubuntu-ignorant) which tells the system about those installed packages, is (well, *was*...) on /var.
IF I correctly understand all you've done, you're 5 minutes from home. Boot using your live CD, then:
# mkdir /mnt/old_var
# mkdir /mnt/new_var
# mount /dev/sda10 /mnt/old_var
# mount /dev/sda14 /mnt/new_var
# rsync -av /mnt/old_var/varun/ /mnt/new_var/var/
# vi /mnt/new_var/etc/fstab # disable former /var (see below)
# umount /dev/sda14
# umount /dev/sda10
# reboot
The umount's should work just fine - you're running from the CD, not from the hard drive.
If you didn't figure out how to disable /var in fstab, you simply need to put a "#" at the start of the line containing the /var entry - or simply delete the entire line; either works. Linux geeks consider the former way (commenting out the line) to be "safer" - if you need any of the parameters later, the line is still there.
HTH...and this was also off the top of my head; basically it's just finishing what eco and the others were having you do. This just picks up where you ran into problems earlier (and be VERY glad you backed up /var! ).
FWIW:
1. If/when you DO reinstall, take centguy's advice. You're MUCH better off with fewer partitions. Less wasted space, fewer filesystems to fsck, less room for "partition full" errors. My installation has /boot, swap (both "global"), and then a / and a /home for each distro. I have a couple of others that aren't relevant here.
2. Take haertig's advice, also. LVM is *very* nice. No need to *ever* worry about running out of disk space that way. I use it exclusively.
Last edited by grndrush; 01-04-2009 at 12:45 PM.
Reason: add partition example
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.