1

I am using arch-linux dual-boot windows currently on Asus ZenBook UX305 Laptop with 256 GB memory. I have approximately 70GB given to linux and rest to windows. I need to install a software which needs 17GB memory free and I prefer installing it in my linux os, but as you would have guessed I dont have enough space. My root has ~13 GB free while my home has ~16 GB free and Windows has enough free space.

Here is screenshot of GParted partition window.

Device--------Size----Used---Unused--% Used---Mount Point

/dev/sda5----42G----28G----12G-------70%-------/

/dev/sda6----26G----8.8G---16G-------36%-------/home

/dev/sda4----162M--49M----114M-----30%-------/boot

/dev/sda3----167G--148G---19G------ 89%-------/run/media/naman/OS

Is it possible to resize my root partition for the partition table to install the big software in linux partition (even bit unsafe method?!).

  • there's no need for a remotely hosted image when text will do (for reasons why, see meta.unix.stackexchange.com/questions/4086/…). copy and paste the output of fdisk into your question. – cas Jan 6 '18 at 14:27
  • please add the fdisk output even though i've answered your question already. the question (and answer) is useless to anyone else without that information. someone may come up with a better answer than mine anyway. – cas Jan 6 '18 at 14:39
  • thanks, but that's incomplete. try fdisk -l /dev/sda. – cas Jan 6 '18 at 15:55
2

Your main windows partition (/dev/sda3) has ~18GB free, but it's a primary partition while your linux partitions are in extended partitions. Without a complete backup, repartition, reformat and restore, the only way to do it with your current disk layout is to:

  • Move your /home directory into the / partition (there's more than enough space for it). This should be done in single-user mode (or, at least, while only root is logged in and nothing is writing to any file under /home).

    For example:

    umount /home
    mkdir /home.old
    mount /dev/sda6 /home.old
    mv /home /home.old
    rsync -a /home.old/ /home/
    umount /home.old
    
  • Edit /etc/fstab and comment-out or delete the line for /home.

  • Delete the /home partition (/dev/sda6)
  • Extend the / partition (/dev/sda5) so that it takes up all the free space that used to be /dev/sda6.
  • Grow the / filesystem with resize2fs

If you use gparted, the final three steps can be done in one easy operation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.