Will moving linux root folder's Subfolders (/tmp, /lib, /etc) to another location will effect the system? [closed]

StackOverflow https://stackoverflow.com/questions/19375253

  •  30-06-2022
  •  | 
  •  

Question

I have installed ubuntu in dual boot with windows7, windows 7 (C drive) disk size is 420GB, Linux drive size is 50GB. Now I'm facing space problem on ubuntu. I cannot reinstall any on them and also cannot resize (shrink) the window partition.

I am thinking to move some big folders like /opt, /bin, /sbin, /etc, /usr, /lib /tmp, /home/user/Desktop to some other folder of the Windows drive and create a link for the same in / . Will this effect the linux system in any way like booting, executing commands, starting terminal, running installed apps like java, ruby etc? If yes, then what are the other solutions for the same?

Was it helpful?

Solution

First of all, sorry for my English (if I seem a bit rude, it's not my intention).

Usually you can move folders like /etc, /bin, /opt (and similar) into other partitions, even on different HDDs, you just have to copy the content of the folder into the new location and modify accordingly the fstab (pay attention during this step); BUT in this case there are some problems due to the type of the file-system used by Windows. If you move one of these folders into a NTSF-formatted file-system, you'll lose some features and you may have some security and stability issues. For this reason, I hardly discourage you to do so.

You can create a folder on the windows partition in which you can put all your big files that don't have to be executed (for ex. torrents, music, videos, pdf archive,...), create an empty folder in /home/YOUR_USER/WHERE_YOU_WANT, link this folder with the real one in windows and modify fstab to automatically mount the windows partition.

I suggest you to see this Arch-linux wiki on FSTAB: it's well written and quite exhaustive.

OTHER TIPS

Definitely if you move the boot folders or any important folders that would create problem in booting so best thing is to search for logs which might be accumulated in /var/log directories and empty them. Another way is to remove unwanted packages which you don't need in ubuntu using apt-get remove,apt-get purge commands or synaptic package manager. You can also check any files which are being in size and not being used.

You can also try attaching and mounting the usb drive where you can take the backup of your important folders in linux and then remove them too instead of filesystem in linux.

Thanks & Regards,
Alok Thaker

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top