[solved] making mint partition bigger

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
willpiam

[solved] making mint partition bigger

Post by willpiam »

I have been using mint for some mouths now and have realized I did not give a big enough partition to it. I now find myself using mint as my primary operating system. So today I cut out a chunk of my windows (10) partition and I've downloaded GParted. The chunk I cut out is now being seen as 'unallocated'. This should be viable in the following image attachment.

[img]mintPartitions.png[/img]

I want to expand my mint partition to take advantage of the newly available space. I've spent the afternoon searching different sites but haven't found a clear answer. I did see a similar post to this but it seems their problem was that their partition was inside another. Even still it didn't seem like they got quite the result I'm looking for.

I'm working on Linux Mint 18.1 with a Cinnamon desktop (64 bit). I'm also using an SSD. My mint partition is sda5

It would be really nice to just graphically pull the side of my mint partition into the free space and press apply. Unfortunately it seems thats not an option.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: making mint partition bigger

Post by WharfRat »

willpiam,

If you expand the partition to the left, you will break grub and be unable to boot.

That can be fixed, but there are a number of steps that would be required from a chroot from the live media.

If your space is being used mostly by the /home folder, a better solution would be to use that unallocated space for /home.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: making mint partition bigger

Post by Flemur »

willpiam wrote:It would be really nice to just graphically pull the side of my mint partition into the free space and press apply
Yeah, that would be nice!

+1 on WharfRat, but rather than moving $HOME (/home/username) you could make a 'data' partition and make links to it and leave /home as a regular directory (that's what I do). You can do this from the running linux OS, you don't need to unmount "/" and run the LiveMedia. If just regular data (mp3,jpg, etc. but NOT home config files), you could make the partition be NTFS and share it with windows (though ext4 is a lot better for linux).

If you expand the "/" partition fixing grub afterwards is a bit tedious, but not too terrifying. (AFAIK, the MBR has a pointer to the /boot location, which movies if you expand the "/" partition. Unless /boot is a separate partition...sigh)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
willpiam

Re: making mint partition bigger

Post by willpiam »

WharfRat,

Which partition would break grub if expanded? Were you talking about sda4?

I should probably document which partition is which for the sake of clarity.

sda4 is windows. This was the first operating system on my computer.

sda6 is xubuntu. This was the second OS on my computer. (first linux)

sda5 is my mint partition. I want to give this partition more space because it has become the main OS I use.
If your space is being used mostly by the /home folder, a better solution would be to use that unallocated space for /home.
Yes. I keep almost everything in my home partition. While I have been using Linux in some form for a few years now I'm not entirely knowledgeable in how all the system stuff works. Are you saying rather than giving the unallocated space directly to mint it would be better to have my system go looking there for my home directory? If so I'm not sure if that would work well for me as in the future I hope to carve some more space from windows and give that to mint as well.

In the time it took to write this somebody else has also commented. From what I gather, and correct me if I'm wrong, directly expanding my mint partition would really mess up grub. Would that still be true considering mint was not the first Linux partition I made on here. That was xubuntu with /dev/sda6.

Thanks for taking your time to read this.
WharfRat

Re: making mint partition bigger

Post by WharfRat »

Which partition would break grub if expanded? Were you talking about sda4?
I was referring to the highlighted one on your screen shot /dev/sda5
Yes. I keep almost everything in my home partition. While I have been using Linux in some form for a few years now I'm not entirely knowledgeable in how all the system stuff works. Are you saying rather than giving the unallocated space directly to mint it would be better to have my system go looking there for my home directory? If so I'm not sure if that would work well for me as in the future I hope to carve some more space from windows and give that to mint as well.
Expanding a /home partition in either direction will not cause any problems.
In the time it took to write this somebody else has also commented. From what I gather, and correct me if I'm wrong, directly expanding my mint partition would really mess up grub. Would that still be true considering mint was not the first Linux partition I made on here. That was xubuntu with /dev/sda6.
Doesn't matter if mint was first or last :!:
willpiam

Re: making mint partition bigger

Post by willpiam »

Thanks for your help.

I only thought the installation order might matter because I thought the first linux operating system set up, and took responsibility for, grub.

In that case I'll look into using the unallocated space as a 'home' partition. I'll do my own research but does anyone know of a guide, post, or previous topic on this site where they explain the steps to follow when creating a separate home partition?

Thanks again
WharfRat

Re: making mint partition bigger

Post by WharfRat »

In that case I'll look into using the unallocated space as a 'home' partition. I'll do my own research but does anyone know of a guide, post, or previous topic on this site where they explain the steps to follow when creating a separate home partition?
This is what I used to place home on its own partition

You will have to partition and format the unallocated space, then use the partition designation to set PART. If you format it ext4 than leave FMT the way it is.

Code: Select all

PART=sda6

FMT=ext4

sudo cp -a /etc/fstab /etc/fstab.old

sudo mkdir /mnt/newhome

sudo mount -t $FMT /dev/$PART /mnt/newhome

sudo chown $USER:$USER /mnt/newhome

cd /home

find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/

sudo umount /mnt/newhome

sudo mv /home /old_home

sudo mkdir /home

sudo mount /dev/$PART /home

sudo rm -r /old_home

echo -e "# /dev/$PART \n$(blkid|grep $PART|grep -wo "UUID=\"[^\"]*\""|tr -d '"')  /home   $FMT   errors=remount-ro,noatime  0 2" |sudo tee -a /etc/fstab

User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: making mint partition bigger

Post by Flemur »

WharfRat wrote:

Code: Select all

...
cd /home
find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/
...
I got a question for ya! Why do that rather than

Code: Select all

sudo cp -ax /home/* /mnt/newhome/.
??
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
WharfRat

Re: making mint partition bigger

Post by WharfRat »

Rather than copying files verbatim, cpio will create sparse files with the -sparse option which is supposed to be more efficient.

The operation is pretty fast too.
willpiam

Re: making mint partition bigger

Post by willpiam »

Okay... its done.

I'll mark this post as solved after I post this.

I followed this "guide" and it worked sort off.

I booted into mint and signed in to see a message saying my session only lasted 10 seconds and that there was a problem with my system. It mentioned that there was no space available. I hit okay and was brought back to the sign in. In the end I signed into mint from the command line and deleted a bunch of files. I had to delete files in "home_old" because I had successfully made a separate home partition.

Making space on my mint partition fixed the issue. This wasn't the first thing I tried but it seems to be what worked.

I now have a separate home partition and I'm successfully logged in to mint which seems to be working fine.

https://www.howtogeek.com/116742/how-to ... ng-ubuntu/
Locked

Return to “Storage”