Need help expanding partition

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Need help expanding partition

Post by HotTunaCartel » Thu Sep 20, 2018 8:21 pm

I installed mint 19 about a month ago or so. Had used it before but some programs I needed in windows ehh at the time it was just easier.
So I reinstalled mint again, I'm starting to run out of room, I've googled info about it but don't feel comfortable doing this with out "some" instruction.
I'm running a dual boot, and honestly the windows partitoin is so messed up I'd like to just take the data and store it externally but that will be for another time. Right now I just need some more room.

Satellite-S55-B Kernel: 4.15.0-34-generic x86_64 bits: 64 gcc: 7.3.0
Desktop: Cinnamon 3.8.9 (Gtk 3.22.30) dm: lightdm Distro: Linux Mint 19 Tara

Thank you in advance
Screenshot from 2018-09-20 20-19-48.png
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

User avatar
CaptainKirksChair
Level 4
Level 4
Posts: 308
Joined: Sat Feb 18, 2017 9:29 pm

Re: Need help expanding partition

Post by CaptainKirksChair » Thu Sep 20, 2018 9:32 pm

To start with, your Mint root partition is only 20GB. But you've got a /media/root... partition of 130GB. What's on that partition?

The optimal answer is to save everything on both of the Mint partitions (/sda5 and /sda6), repartition them into one 150GB partition and reinstall Mint there. Just letting you know what would be the best. Since you have almost 700GB free on the NTFS partition, resizing that to about 500GB free and merging that free space with the 150GB would give you 350GB of space and that is more than enough for Mint. The HD on this iMac of mine is only 320GB.

To resize a partition using Gparted is pretty straightforward. You will need to boot into a Mint LiveUSB and run Gparted from there. Make sure you are selecting the correct partition, right click it, and choose Resize from the menu. Just drag the slider back and forth until it's the size you want. Save your changes.

The advantage of taking some of the NTFS partition and merging that with the two Mint partitions is that you can reinstall Mint onto a nice size HD. If you do this, remember that /sda2 is where the boot loader goes during Mint installation.

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Thu Sep 20, 2018 9:58 pm

Hey thanks so much for the reply. Before I start researching on how to do that. How would I go and see what is on the 130gb partition?
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Thu Sep 20, 2018 10:27 pm

OH! I just remembered, the 130gig is the original partition I made several years ago for linux. I don't think I ever removed it when I went back to using windows. The new one is (currently that I'm using) is the 20 gig partition
CaptainKirksChair wrote:
Thu Sep 20, 2018 9:32 pm
To start with, your Mint root partition is only 20GB. But you've got a /media/root... partition of 130GB. What's on that partition?

The optimal answer is to save everything on both of the Mint partitions (/sda5 and /sda6), repartition them into one 150GB partition and reinstall Mint there. Just letting you know what would be the best. Since you have almost 700GB free on the NTFS partition, resizing that to about 500GB free and merging that free space with the 150GB would give you 350GB of space and that is more than enough for Mint. The HD on this iMac of mine is only 320GB.

To resize a partition using Gparted is pretty straightforward. You will need to boot into a Mint LiveUSB and run Gparted from there. Make sure you are selecting the correct partition, right click it, and choose Resize from the menu. Just drag the slider back and forth until it's the size you want. Save your changes.

The advantage of taking some of the NTFS partition and merging that with the two Mint partitions is that you can reinstall Mint onto a nice size HD. If you do this, remember that /sda2 is where the boot loader goes during Mint installation.
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

pgmer6809
Level 3
Level 3
Posts: 157
Joined: Sun Mar 04, 2012 9:06 pm

Re: Need help expanding partition

Post by pgmer6809 » Fri Sep 21, 2018 1:15 am

Two Things:
1) Resizing an NTFS partition is tricky and sometimes impossible. The recommendation is to use the Windows tools to do it, not Gparted. I am not sure if Windows will let you resize the C: drive while it is running so you may need to boot windows from a recovery partition if there is one. Failing that GPARTED from a "Live CD or Live/USB is about your only hope.

I have found it is sometimes impossible to resize an NTFS partition if there is an immovalble file/directory twords the end of the partition. The windows tools will not let you shrink the partition smaller than where that immovable directory is.
The time to resize an NTFS partition is immediately after (or even before) the windows install before Windows has a chance to put any immovable directories on it.

2) If you really do have a 130GB empty partition, (or nearly empty) and it is after the 20Gb partition, then you could copy all the data from the 130GB partition to a USB stick or external USB drive. I would use the tar cmd for this. Now you can use GPARTED to delete the 130 GB partition and grow the 20 GB partition into the 130 GB partition space.
You could grow it to the full 150, or you could grow it to say 40, and then create a 110GB /home partition using the rest of the space.
GPARTED seems to have less trouble growing partitions than it does shrinking them or moving them. (Not that it doesn't work; it does, but it seems to take longer.) Afterwards you can just restore the data from your external USB stick/drive, once again using tar.
pgmer6809

gm10
Level 10
Level 10
Posts: 3393
Joined: Thu Jun 21, 2018 5:11 pm

Re: Need help expanding partition

Post by gm10 » Fri Sep 21, 2018 6:14 am

20 GB is plenty for a / root partition, simply relocate your /home folder to the other partition, no re-partitioning necessary or even advised IMHO.

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Fri Sep 21, 2018 12:11 pm

This seems much easier. Doing some googling now but can't find anything I quite understand.
gm10 wrote:
Fri Sep 21, 2018 6:14 am
20 GB is plenty for a / root partition, simply relocate your /home folder to the other partition, no re-partitioning necessary or even advised IMHO.
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

gm10
Level 10
Level 10
Posts: 3393
Joined: Thu Jun 21, 2018 5:11 pm

Re: Need help expanding partition

Post by gm10 » Fri Sep 21, 2018 12:48 pm

HotTunaCartel wrote:
Fri Sep 21, 2018 12:11 pm
This seems much easier. Doing some googling now but can't find anything I quite understand.
gm10 wrote:
Fri Sep 21, 2018 6:14 am
20 GB is plenty for a / root partition, simply relocate your /home folder to the other partition, no re-partitioning necessary or even advised IMHO.
Basically you go to your existing /home, move all the user folder(s) over to the other drive, then change the other drive's mount point to /home and reboot. Easiest done from a root console so there's no open files in /home - just mv /home/* /path/to/other/drive the folders to the other drive and then nano /etc/fstab and change that /media/whatever mount point to /home, reboot and done.

PS: Obligatory disclaimer: Always have a backup, you don't get to blame me if your system explodes. :twisted:

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Fri Sep 21, 2018 1:17 pm

lol no blaming here. Still newish to doing things this way. I did do a timeshift last night. Not quite sure how to move the /home to the new partition. If I go to the file manage and click on the 120gig partition it says its not a folder. would I move that through would the ?other/drive be the partition name?
Sorry still confused lol
gm10 wrote:
Fri Sep 21, 2018 12:48 pm
HotTunaCartel wrote:
Fri Sep 21, 2018 12:11 pm
This seems much easier. Doing some googling now but can't find anything I quite understand.
gm10 wrote:
Fri Sep 21, 2018 6:14 am
20 GB is plenty for a / root partition, simply relocate your /home folder to the other partition, no re-partitioning necessary or even advised IMHO.
Basically you go to your existing /home, move all the user folder(s) over to the other drive, then change the other drive's mount point to /home and reboot. Easiest done from a root console so there's no open files in /home - just mv /home/* /path/to/other/drive the folders to the other drive and then nano /etc/fstab and change that /media/whatever mount point to /home, reboot and done.

PS: Obligatory disclaimer: Always have a backup, you don't get to blame me if your system explodes. :twisted:
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

gm10
Level 10
Level 10
Posts: 3393
Joined: Thu Jun 21, 2018 5:11 pm

Re: Need help expanding partition

Post by gm10 » Fri Sep 21, 2018 1:36 pm

HotTunaCartel wrote:
Fri Sep 21, 2018 1:17 pm
lol no blaming here. Still newish to doing things this way. I did do a timeshift last night. Not quite sure how to move the /home to the new partition. If I go to the file manage and click on the 120gig partition it says its not a folder. would I move that through would the ?other/drive be the partition name?
Sorry still confused lol
I can be more specific if you post output of

Code: Select all

lsblk -f
and

Code: Select all

cat /etc/fstab
(please both in code tags)

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Fri Sep 21, 2018 7:41 pm

Hope this is correct

Code: Select all

larry@larry-Satellite-S55-B:~$ lsblk -f
NAME   FSTYPE LABEL    UUID                                 MOUNTPOINT
sda                                                         
├─sda1 ntfs   Recovery E0D2417DD2415944                     
├─sda2 vfat            C848-DADA                            /boot/efi
├─sda3                                                      
├─sda4 ntfs            80265005264FFB24                     
├─sda5 ext4            845b3a87-013f-402b-9460-d3198ed62604 /media/root/845b3a87
└─sda6 ext4            c16ba5ae-38f6-4752-8f57-8f26c6bef0e6 /
larry@larry-Satellite-S55-B:~$ 
gm10 wrote:
Fri Sep 21, 2018 1:36 pm


Code: Select all

larry@larry-Satellite-S55-B:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=c16ba5ae-38f6-4752-8f57-8f26c6bef0e6 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=C848-DADA  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

I can be more specific if you post output of

Code: Select all

lsblk -f
and

Code: Select all

cat /etc/fstab
(please both in code tags)
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

gm10
Level 10
Level 10
Posts: 3393
Joined: Thu Jun 21, 2018 5:11 pm

Re: Need help expanding partition

Post by gm10 » Fri Sep 21, 2018 8:33 pm

Alright, so what we'll do is move the user folder(s) in /home to that other drive of yours, which is currently at /media/root/845b3a87. After the move we'll do a switch and mount the latter location in /home instead.

Note that there's currently 64 GB of data at that location but from your posts it seemed to me that it's forgotten data, so consider just deleting everything in that location or simply formatting that partition (e.g. via GParted) before you proceed with the next steps. Or just leave things as they are, it doesn't really matter.

Anyway, what you do to move your user folders is first you run this:

Code: Select all

xed admin:///etc/fstab
and you replace the file contents with this:

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=c16ba5ae-38f6-4752-8f57-8f26c6bef0e6 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=C848-DADA  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
UUID=845b3a87-013f-402b-9460-d3198ed62604	/home	ext4	defaults	0	2
Save and exit, then log out of your graphical environment, press Ctrl+Alt+F1 to get to virtual console, log in and then you run;

Code: Select all

shopt -s dotglob
sudo mv -v /home/* /media/root/845b3a87
reboot
If you can still log in, it worked. Yes, we could test that before we reboot, but where's the fun in that?! :D

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Fri Sep 21, 2018 9:18 pm

Awesome thanks. Going to try this in the morning. New season of LivePD is on and i've been depraved for weeks!
gm10 wrote:
Fri Sep 21, 2018 8:33 pm
Alright, so what we'll do is move the user folder(s) in /home to that other drive of yours, which is currently at /media/root/845b3a87. After the move we'll do a switch and mount the latter location in /home instead.

Note that there's currently 64 GB of data at that location but from your posts it seemed to me that it's forgotten data, so consider just deleting everything in that location or simply formatting that partition (e.g. via GParted) before you proceed with the next steps. Or just leave things as they are, it doesn't really matter.

Anyway, what you do to move your user folders is first you run this:

Code: Select all

xed admin:///etc/fstab
and you replace the file contents with this:

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=c16ba5ae-38f6-4752-8f57-8f26c6bef0e6 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=C848-DADA  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
UUID=845b3a87-013f-402b-9460-d3198ed62604	/home	ext4	defaults	0	2
Save and exit, then log out of your graphical environment, press Ctrl+Alt+F1 to get to virtual console, log in and then you run;

Code: Select all

shopt -s dotglob
sudo mv -v /home/* /media/root/845b3a87
reboot
If you can still log in, it worked. Yes, we could test that before we reboot, but where's the fun in that?! :D
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Sat Sep 22, 2018 11:34 am

When I ran

Code: Select all

~$ xed admin:///etc/fstab
I got this first
** (xed:4164): WARNING **: 11:31:24.352: The specified location is not mounted
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

gm10
Level 10
Level 10
Posts: 3393
Joined: Thu Jun 21, 2018 5:11 pm

Re: Need help expanding partition

Post by gm10 » Sat Sep 22, 2018 11:41 am

HotTunaCartel wrote:
Sat Sep 22, 2018 11:34 am
When I ran

Code: Select all

~$ xed admin:///etc/fstab
I got this first
** (xed:4164): WARNING **: 11:31:24.352: The specified location is not mounted
Yeah, because most of the Mint tools are a buggy mess and xed is no exception. It still worked though, right?!

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Sat Sep 22, 2018 12:20 pm

I didnt proceed yet, was just making sure that was okay first.
gm10 wrote:
Sat Sep 22, 2018 11:41 am
HotTunaCartel wrote:
Sat Sep 22, 2018 11:34 am
When I ran

Code: Select all

~$ xed admin:///etc/fstab
I got this first
** (xed:4164): WARNING **: 11:31:24.352: The specified location is not mounted
Yeah, because most of the Mint tools are a buggy mess and xed is no exception. It still worked though, right?!
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Sat Sep 22, 2018 12:32 pm

Lol I can’t log back into my laptop. Put the password in and it just goes black and reverts back to the login screen
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Sat Sep 22, 2018 12:47 pm

I did control alt F1 and see this

No directory , logging in with HOME=/
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

gm10
Level 10
Level 10
Posts: 3393
Joined: Thu Jun 21, 2018 5:11 pm

Re: Need help expanding partition

Post by gm10 » Sat Sep 22, 2018 1:21 pm

HotTunaCartel wrote:
Sat Sep 22, 2018 12:47 pm
I did control alt F1 and see this

No directory , logging in with HOME=/
See, told you, that's the fun part for when something went wrong. ;)

Two possibilities, either the second drive didn't get mounted correctly or you didn't move the files successfully.
Run this:

Code: Select all

lsblk /dev/sda5
if the MOUNTPOINT isn't /home then that's the problem.

But if it is /home, then you didn't move the files successfully, run

Code: Select all

sudo umount /home
and you should be able to exit and log into your actual profile successfully then.

Let me know which one the problem was.

User avatar
HotTunaCartel
Level 1
Level 1
Posts: 31
Joined: Wed Jul 04, 2018 2:33 pm

Re: Need help expanding partition

Post by HotTunaCartel » Sat Sep 22, 2018 1:29 pm

Typing from my cell so it it’s messed up I’m sorry lol.
So running label /dev/sda5 I get
/home under mountpoint so I’m assuming that is correct.
But I’m getting Audi : unmount : command not found
HotTunaCartel - where cheese is king.
4.15.0-24-generic x86_64
Cinnamon 3.8.6
Linux Mint 19 Tara

Post Reply

Return to “Installation & Boot”