Linux - NewbieThis 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
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Given those sizings, it should fit pretty easily if you have been rotating logs and such. "df -h" will tell you how much free space you have/need.
Best done from a liveCD - "cp -a /media/sda4/* /media/sda3/var/" (depending on mount points) should do it if you have the space. Fix the fstab to remove the /var entry and try a reboot.
If you don't have the space, try and make it fit - clean out logs to make /var smaller, and get rid of (big) crap out of /home usually works best.
Else you'll need to delete/reduce the swap allocation and create a new partition for /var and copy it there. Then fix fstab again - potentially for / and swap as well depending if you use UUID/LABEL.
Edit: might be best to clean out the /media/sda3/var/ prior to the copy. It may well have old data in it you haven't been able to see due to the mount of sda4.
Grab a livecd, mount the var and the root partitions and copy the data from the var partition to the var folder (cp - vax *) inside your root partition. Then remove the /var line from your fstab file on the root partition. Unmount, reboot, solved.
Of course, while you are at it, you could create an extended partition, then create a new var partition and copy the data back. You may (and probably) still need to fix up your fstab.
Next time, make sure to create any partition beyond the third one a logical partition; That way you can have fourteen or fifteen rather than just four.
Edit: aargh, I need to start reading; answer already posted by syg00.
A quick way to add a distro is to use a live distro .iso image.
Some live distros are really quite complete and updatable (slax for instance, but there are others - tinycore, slitaz, zenwalk).
You can download the .iso image for these and mount it then copy it to a partition that has enough space and add the particulars to grub (root, kernel,initrd) and by adding a few parametres you can have the distro as a "live" distro entirely in RAM or as fully mounted. It's particularly handy to have a distro running in RAM in order to do work on partitions, make backup images, etc.
(A reminder - to mount .iso image: mount -o loop /path/an.iso /mount/path and to unmount: umount /path/an.iso )
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.