How to Use gparted Safely

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

How to Use gparted Safely

Post by axismundi »

I have a Gateway desktop PC that I set up dual-bootable for Win 10 and Linux Mint. After the last one or two Win 10 updates, they trashed my Win 10 and I can't access it due to corrupt files. I now want to remove it completely and install Win 8.1.

Using "gparted", I want to increase the Linux partition size as there's plenty of room to do so and also delete Win 10.

I've attached a screen shot of gparted and I'm not sure which partition is the Linux OS. The Gateway partition i believe is the Win 10.

Can I simply delete the Gateway partition (does that mean that it erases the contents leaving the partition as "unallocated"?), resize the Linux partition and then use the empty Gateway partition to install Win 8.1?
Gateway HDD Partitions.png
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
shawnhcorey
Level 4
Level 4
Posts: 217
Joined: Thu Jun 17, 2010 11:23 am
Location: The Great White North
Contact:

Re: How to Use gparted Safely

Post by shawnhcorey »

Resize Gateway to be smaller and resize / to be larger. Right click on the partition you want to resize and select Resize/Move from the pop-up menu.

gparted does it best to preserve the files but make a backup first, just in case.
Don't stop where the ink does.
User avatar
Reorx
Level 12
Level 12
Posts: 4044
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: How to Use gparted Safely

Post by Reorx »

axismundi wrote: Sat Jun 23, 2018 8:04 am ... Can I simply delete the Gateway partition (does that mean that it erases the contents leaving the partition as "unallocated"?), resize the Linux partition and then use the empty Gateway partition to install Win 8.1?
Yes, Win10 resides on SDA3. Your Linux installation resides in SDA4, SDA5, & SDA6.
Can I simply delete the Gateway partition (does that mean that it erases the contents leaving the partition as "unallocated"?)?
Yes.
resize the Linux partition and then use the empty Gateway partition to install Win 8.1?
You can resize the Linux partitionS into the unallocated space. SDA4 is an extended partition which is basically a container for other partitions. SDA5 is / for your Linux installation. SDA6 is your Linux Swap partition. In order to enlarge your Linux partition (SDA5), you must first enlarge SDA4 to recapture some unallocated space that resulted from removing your Win10 partition (SDA3). Once you have enlarged SDA4, you can then enlarge SDA5. Once you have resized your Linux installation to your liking, you will then have to create an NTFS partition in the remaining unallocated space to accommodate your Win8 installation.

NB: When you install Win8, it will BORK your GRUB (boot loader) and you will not be able to boot your Linux installation until you repaired (reinstall?) GRUB. Figure out what you have to do to repair GRUB BEFORE installing Win8.

NB2: You can not manipulate any partitions while they are mounted so you can not manipulate any of the Linux partitions while you are booted to Linux from your HD. You will need a Live USB and the ability to boot from it to resize the Linux partitions on your HD. :mrgreen:
Gateway HDD Partitions.png
Universal CAVEAT: ALWAYS back up your important data BEFORE manipulating partitions on your HD.
Full time Linux Mint user since 2011 - Currently running LM21C on multiple Dell laptops - mostly Vostro models.

Image Image Image
axismundi

Re: How to Use gparted Safely

Post by axismundi »

Reorx, excellent info and confirmation of my questions.

Now, I'm really concerned about how to repair or reinstall the Grub. Do I do that from the terminal with a, hopefully easy, terminal command? I'm a novice Linux user. When you say "figure out how to repair it before installing Win 8" that's really concerning. LOL

Note: The original configuration on my desktop was Windows. I later added Linux Mint to the HDD. So is it possible that the boot record doesn't use the Grub? For me to switch back and forth between Windows and Linux, I use the Restart function and then choose which OS I want to boot from. When I delete the Win 10 partition, will that kill the boot record or is that the Grub that needs fixing.

Re NB2, when you say a live USB, are you referring to a USB with the Linux Mint OS on it? And I need to use it to do all the resizing of the partitions while using the USB?

I'm at the point now wondering if I should just kill Win 10 and resize the Linux to use the entire HDD. If I did that, I would still need to use a live USB to do this?

Sorry for all the questions. It seemed straightforward until NB1 and NB2! LOL

Cheers, Bob
gm10

Re: How to Use gparted Safely

Post by gm10 »

axismundi wrote: Sat Jun 23, 2018 8:04 am I have a Gateway desktop PC that I set up dual-bootable for Win 10 and Linux Mint. After the last one or two Win 10 updates, they trashed my Win 10 and I can't access it due to corrupt files.
Files don't corrupt themselves. Corrupt files usually point to a hardware failure, so before planning further exploits with that system you should figure out what's actually wrong with it or you'll likely run into the same problem again in the future. Could be a bad HDD, bad memory, or anything in between.
User avatar
shawnhcorey
Level 4
Level 4
Posts: 217
Joined: Thu Jun 17, 2010 11:23 am
Location: The Great White North
Contact:

Re: How to Use gparted Safely

Post by shawnhcorey »

gm10 wrote: Sat Jun 23, 2018 10:15 am
axismundi wrote: Sat Jun 23, 2018 8:04 am I have a Gateway desktop PC that I set up dual-bootable for Win 10 and Linux Mint. After the last one or two Win 10 updates, they trashed my Win 10 and I can't access it due to corrupt files.
Files don't corrupt themselves. Corrupt files usually point to a hardware failure, so before planning further exploits with that system you should figure out what's actually wrong with it or you'll likely run into the same problem again in the future. Could be a bad HDD, bad memory, or anything in between.
Corrupt files are also caused by software which ignores everything but itself, like Windows. This would not be the first time Windows updates have corrupted non-Window file systems.
Don't stop where the ink does.
axismundi

Re: How to Use gparted Safely

Post by axismundi »

I appreciate your comment, but Win 10 updates crashed Win 10. The update would run and then freeze at 30% (Win 10 was working fine before the updates). I would then have to turn off the PC which I didn't want to do knowing things could happen in order to switch to Linux. On my last try with updating Win 10, I let it run while it said "please wait until update is completed" for 9 freaking hours and then had to kill it again. An error message I got when I tried the "repair" function said I was missing the Win 10 executable file. That did it for me and Win 10. Google Win 10 problems and see the destruction the updates have caused to personal and business computers. I didn't want to go into the Win 10 crapola as this is a Linux forum. Cheers, Bob
User avatar
Reorx
Level 12
Level 12
Posts: 4044
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: How to Use gparted Safely

Post by Reorx »

When you installed Mint, the install routine replaced the Windows boot loader in the MBR on that HD with the GRUB boot loader. GRUB is the software that gives you that menu at bootup...
axismundi wrote: Sat Jun 23, 2018 9:50 am ... I'm really concerned about how to repair or reinstall the Grub. Do I do that from the terminal with a, hopefully easy, terminal command?
As crazy as it may sound, I can't tell you the steps to fix GRUB as I have never done it. I have no need/desire to install Windows on my computers and have never done it on a Linux machine after Linux was on it!!! Having said that, I know the repair is relatively easy to do. It might be as simple as booting to your Live USB stick and typing in a terminal:

Code: Select all

sudo grub-install /dev/sda
axismundi wrote: Sat Jun 23, 2018 9:50 am When I delete the Win 10 partition, will that kill the boot record?
If you delete Win10 by removing it's partition, you will not harm the boot record (MBR) but the Win10 option in the GRUB menu will be invalid. You can fix the menu by booting your Linux installation and typing this command in a terminal:

Code: Select all

sudo update-grub
axismundi wrote: Sat Jun 23, 2018 9:50 am Re NB2, when you say a live USB, are you referring to a USB with the Linux Mint OS on it? And I need to do all the resizing of the partitions while using the USB?
Yes.
axismundi wrote: Sat Jun 23, 2018 9:50 am I'm at the point now wondering if I should just kill Win 10 and resize the Linux to use the entire HDD. If I did that, I would still need to use a live USB to do this?
Yes.

If you want to do a whole disk installation, you might just back up all your data and do one of 2 types of installation:
1) Using the install routine, select a "whole disk" installation and the install routine will do everything for you - it will remove all existing partitions and create the partitions necessary for the installation. ... OR...
2) Boot the installation USB and manually remove all the partitions and create the partition scheme that YOU want. Then when you do the actual installation, when given the choice, choose "something else" and manually configure the partitions and mount points.

NOTE: SDA1 (18GB) is probably a "recovery" partition and probably contains an image of your Win 10 installation (day0). You might consider leaving that there in case you need or want to revert the machine back to Windows at some point in the future. If you choose to do it this way, you would not choose "whole disk" installation as it will wipe SDA1.

Side note: My usual routine is to never actually boot Win but to boot to the USB and shrink the Win partition to about 100 GB and leave it. I never actually boot it but leave it there in case I might need it some day or if the computer (usually a laptop) ends up in the possession of someone who might want to use Windows - several of my laptops have ended up handed down to folks (family) that needs a computer because their's crashed and burned. I usually have several "back up" laptops that are not actively in service so I am the "logical" donor in times of urgent need...

Alternative plan to keep Win10: BACK UP ALL DATA...
1) You could restore your Win10 to day 0 and then shut down the machine without actually booting Win10. You may have to consult your computer documentation or call the manufacturer to get exact steps necessary to do this.
2) Boot the Mint USB and resize the Win10 partition to whatever size you like - on that HD, 200 GB is probably a reasonable size.
3) Shut down the Live Mint session and remove the USB stick.
4) Reboot the computer and let Win 10 boot. Do all the first boot nonsense and then update Win 10 and let it just do whatever it or you want...
5) Reboot to make sure the update worked and is stable. If so, shut down and...
6) Install mint to the unallocated space that you created when you shrank the Win10 partition.
7) Restore your backed up data and have fun.

Cheers!... and, as always, Enjoy the Mint
Last edited by Reorx on Sat Jun 23, 2018 11:40 am, edited 8 times in total.
Full time Linux Mint user since 2011 - Currently running LM21C on multiple Dell laptops - mostly Vostro models.

Image Image Image
gm10

Re: How to Use gparted Safely

Post by gm10 »

axismundi wrote: Sat Jun 23, 2018 10:47 am I appreciate your comment, but Win 10 updates crashed Win 10. The update would run and then freeze at 30% (Win 10 was working fine before the updates). I would then have to turn off the PC which I didn't want to do knowing things could happen in order to switch to Linux. On my last try with updating Win 10, I let it run while it said "please wait until update is completed" for 9 freaking hours and then had to kill it again. An error message I got when I tried the "repair" function said I was missing the Win 10 executable file. That did it for me and Win 10. Google Win 10 problems and see the destruction the updates have caused to personal and business computers. I didn't want to go into the Win 10 crapola as this is a Linux forum. Cheers, Bob
Fair enough, if you canceled an update then some missing files are not surprising. Personally I'm generally quite happy with where they've taken Win10 but I'm running the Pro version so I can defer updates. They certainly do seem to have serious quality control issues with their updates.

As to restoring the boot loader, I'll just point you to the Ubuntu documentation, which is fairly comprehensive: https://help.ubuntu.com/community/Recov ... ingWindows. Note the graphical Boot-Repair tool that's linked there in case you want to avoid the terminal.
axismundi

Re: How to Use gparted Safely

Post by axismundi »

gm10 wrote: Sat Jun 23, 2018 11:07 am
axismundi wrote: Sat Jun 23, 2018 10:47 am I appreciate your comment, but Win 10 updates crashed Win 10. The update would run and then freeze at 30% (Win 10 was working fine before the updates). I would then have to turn off the PC which I didn't want to do knowing things could happen in order to switch to Linux. On my last try with updating Win 10, I let it run while it said "please wait until update is completed" for 9 freaking hours and then had to kill it again. An error message I got when I tried the "repair" function said I was missing the Win 10 executable file. That did it for me and Win 10. Google Win 10 problems and see the destruction the updates have caused to personal and business computers. I didn't want to go into the Win 10 crapola as this is a Linux forum. Cheers, Bob
Fair enough, if you canceled an update then some missing files are not surprising. Personally I'm generally quite happy with where they've taken Win10 but I'm running the Pro version so I can defer updates. They certainly do seem to have serious quality control issues with their updates.

As to restoring the boot loader, I'll just point you to the Ubuntu documentation, which is fairly comprehensive: https://help.ubuntu.com/community/Recov ... ingWindows. Note the graphical Boot-Repair tool that's linked there in case you want to avoid the terminal.
Hey, thanks for the boot loader link. I'll give it a try.
axismundi

Re: How to Use gparted Safely

Post by axismundi »

Reorx wrote: Sat Jun 23, 2018 10:51 am When you installed Mint, the install routine replaced the Windows boot loader in the MBR on that HD with the GRUB boot loader. GRUB is the software that gives you that menu at bootup...
axismundi wrote: Sat Jun 23, 2018 9:50 am ... I'm really concerned about how to repair or reinstall the Grub. Do I do that from the terminal with a, hopefully easy, terminal command?
As crazy as it may sound, I can't tell you the steps to fix GRUB as I have never done it. I have no need/desire to install Windows on my computers and have never done it on a Linux machine after Linux was on it!!! Having said that, I know the repair is relatively easy to do. It might be as simple as booting to your Live USB stick and typing in a terminal:

Code: Select all

sudo grub-install /dev/sda
axismundi wrote: Sat Jun 23, 2018 9:50 am When I delete the Win 10 partition, will that kill the boot record?
If you delete Win10 by removing it's partition, you will not harm the boot record (MBR) but the Win10 option in the GRUB menu will be invalid. You can fix the menu by booting your Linux installation and typing this command in a terminal:

Code: Select all

sudo update-grub
axismundi wrote: Sat Jun 23, 2018 9:50 am Re NB2, when you say a live USB, are you referring to a USB with the Linux Mint OS on it? And I need to do all the resizing of the partitions while using the USB?
Yes.
axismundi wrote: Sat Jun 23, 2018 9:50 am I'm at the point now wondering if I should just kill Win 10 and resize the Linux to use the entire HDD. If I did that, I would still need to use a live USB to do this?
Yes.

If you want to do a whole disk installation, you might just back up all your data and do one of 2 types of installation:
1) Using the install routine, select a "whole disk" installation and the install routine will do everything for you - it will remove all existing partitions and create the partitions necessary for the installation. ... OR...
2) Boot the installation USB and manually remove all the partitions and create the partition scheme that YOU want. Then when you do the actual installation, when given the choice, choose "something else" and manually configure the partitions and mount points.

NOTE: SDA1 (18GB) is probably a "recovery" partition and probably contains an image of your Win 10 installation (day0). You might consider leaving that there in case you need or want to revert the machine back to Windows at some point in the future. If you choose to do it this way, you would not choose "whole disk" installation as it will wipe SDA1.

Side note: My usual routine is to never actually boot Win but to boot to the USB and shrink the Win partition to about 100 GB and leave it. I never actually boot it but leave it there in case I might need it some day or if the computer (usually a laptop) ends up in the possession of someone who might want to use Windows - several of my laptops have ended up handed down to folks (family) that needs a computer because their's crashed and burned. I usually have several "back up" laptops that are not actively in service so I am the "logical" donor in times of urgent need...

Alternative plan to keep Win10: BACK UP ALL DATA...
Then - You could restore your Win10 to day 0 and then shut down the machine without actually booting Win10.
Then boot the Mint USB and resize the Win10 partition to whatever size you like - on that HD, 200 GB is probably a reasonable size.
Then shut down the Live Mint session and remove the USB stick.
Then reboot the computer and let Win 10 boot. Do all the first boot nonsense and then update Win 10 and let it just do whatever it or you want...
Then reboot to make sure the update worked and is stable. If so, shut down and...
Then install mint to the unallocated space that you created when you shrank the Win10 partition.
The last step is to restore your backed up data and have fun.

Cheers!... and, as always, Enjoy the Mint
I really appreciate the time you've taken to explain and offer alternatives on this issue. My first priority is not destroying my HDD. LOL
I'll report back with results and if it works for me hopefully someone else could try it.
User avatar
Reorx
Level 12
Level 12
Posts: 4044
Joined: Tue Jul 07, 2009 7:14 pm
Location: SE Florida, USA

Re: How to Use gparted Safely

Post by Reorx »

axismundi wrote: Sat Jun 23, 2018 11:39 am I really appreciate the time you've taken to explain and offer alternatives on this issue. My first priority is not destroying my HDD. LOL
I'll report back with results and if it works for me hopefully someone else could try it.
You're welcome... Before you actually do anything, what is your plan at this point?

To add one more wrinkle to the mix... Mint 19 is in late BETA development and should be approved for stable release in the next few days... You can try it out from a Live USB and if it likes your hardware set, you might want to install it - it seems that everyone wants the latest and greatest (I'm running Mint 17(.0)!) With this in mind you will want to back up your Linux data and give Mint 19 a good amount of space on your HD. I recommend keeping a running version of Win on the machine at this point as you will likely find yourself needing to use it from time to time.

With all these changes looming, I think the first thing that you should do is back up all your data (Win and Linux) - then you will have the freedom to spread your wings and fly...

Note: If you use Firefox as your browser - Your Firefox browser data (history, configuration, add-ons, etc) is stored in your FF profile which is in a hidden folder in each of your user's home folders. The folder name is .mozilla. In a file manager, you can toggle hidden folders visibility by pressing CTRL + h. You can right click copy, right click paste the folder to any external storage device (USB stick, HD, etc.) When you go to restore it in a new installation, when you open its location of a SB stick, if you don't see it, don't panic but rather press CRTL + h (remember, it's "hidden"). OBTW, the thing that makes it hidden is the dot (.) at the beginning of the name.

If you use Thunderbird as an e-mail client - all of it's data (account information, passwords, stored e-mails, attachments, etc.) is stored in its profile which is in a hidden folder in each user's home folder named .thunderbird. Copy it off to an external device if applicable... :mrgreen:
Full time Linux Mint user since 2011 - Currently running LM21C on multiple Dell laptops - mostly Vostro models.

Image Image Image
User avatar
AZgl1800
Level 20
Level 20
Posts: 11146
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: How to Use gparted Safely

Post by AZgl1800 »

Note: If you use Firefox as your browser - Your Firefox browser data (history, configuration, add-ons, etc) is stored in your FF profile which is in a hidden folder in each of your user's home folders. The folder name is .mozilla. In a file manager, you can toggle hidden folders visibility by pressing CTRL + h. You can right click copy, right click paste the folder to any external storage device (USB stick, HD, etc.) When you go to restore it in a new installation, when you open its location of a SB stick, if you don't see it, don't panic but rather press CRTL + h (remember, it's "hidden"). OBTW, the thing that makes it hidden is the dot (.) at the beginning of the name.
if you are using Firefox, please create a login for SYNC, then you can click off the tabs for the things that you want to be permanent in your Firefox installs.

I never worry about the Mozilla profiles, I just install a new Firefox, and then log into my Sync Account and set back and wait.

all of my Bookmarks and other features that I want are restored and duplicate all other Firefox installs, EVEN WINDOWS !!!!


Note!
if this is your first time using SYNC, you must allow Firefox enough time to upload all of your profile to the Mozilla Cloud.

I have over 10,000 bookmarks and it takes about 30 minutes or more with a 10 mbps link to the world.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
gm10

Re: How to Use gparted Safely

Post by gm10 »

All those personal backup strategies notwithstanding, Mint comes with an easy to use backup tool, no reason to jump through hoops here by manually copying hidden files. Just saying.
axismundi

Re: How to Use gparted Safely

Post by axismundi »

gm10 wrote: Sat Jun 23, 2018 3:16 pm All those personal backup strategies notwithstanding, Mint comes with an easy to use backup tool, no reason to jump through hoops here by manually copying hidden files. Just saying.
Are you referring to Timeshift? I tried to use the app but I don't have enough space on the HDD.

I've got my Win10 data files transferred to Mint 18.2.

I've finally decided to delete Win10 and then install Mint 19 when Beta is done. Then at that point I'm assuming that I make a live USB with the ISO Mint 19 OS and choose Whole Disk installation and I will then dedicate my entire HDD to Linux. I've been using it 99.9% of the time anyway.

When installing Mint 19, I also assume it will preserve my Mint 18 bookmarks, etc?
gm10

Re: How to Use gparted Safely

Post by gm10 »

axismundi wrote: Thu Jul 05, 2018 11:49 am
gm10 wrote: Sat Jun 23, 2018 3:16 pm All those personal backup strategies notwithstanding, Mint comes with an easy to use backup tool, no reason to jump through hoops here by manually copying hidden files. Just saying.
Are you referring to Timeshift?
No, I meant the actual "Backup Tool" and its function to backup your "Personal Data".
User avatar
AZgl1800
Level 20
Level 20
Posts: 11146
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: How to Use gparted Safely

Post by AZgl1800 »

axismundi wrote: Thu Jul 05, 2018 11:49 am I've finally decided to delete Win10 and then install Mint 19 when Beta is done. Then at that point I'm assuming that I make a live USB with the ISO Mint 19 OS and choose Whole Disk installation and I will then dedicate my entire HDD to Linux. I've been using it 99.9% of the time anyway.

When installing Mint 19, I also assume it will preserve my Mint 18 bookmarks, etc?
Not if you do a new fresh install, your bookmarks will be lost.

If you are a Firefox user, please sign up for Firefox Sync.
That has been a huge blessing to me. I use nearly a dozen computers scattered all over the world.
and every one of them has Firefox Sync logged in.
Sync will keep all of your Bookmarks and more, depends on how many of the checkboxes you click on.

For me, all I want is the Bookmarks, and it does a perfect job of keeping my list of 10,000 plus bookmarks.

Since you are upgrading from a Mint install now, download Aptik and backup all of your current apps and preferences.
That also will restore all of your bookmarks regardless of what browser you have installed.



Main app:

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install aptik


the GUI frontend

apt install aptik-gtk


Don't get in a hurry thinking Aptik has stopped, or crashed.

it runs very fast gathering up all of the names of the apps you have.

then it slows way down, as it starts backing up the meat and potatoes....
just leave it alone for an hour or so, depends on how fast your HDD is....

it will give a message that it is done, when it finishes.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Clivooo
Level 1
Level 1
Posts: 24
Joined: Tue May 31, 2016 12:56 pm
Location: UK
Contact:

Re: How to Use gparted Safely

Post by Clivooo »

Advice needed re shrinking main Linux Mint install partition!!!

I installed my LM Mate as a new delete everything install (replacing a Windows install). So, (as I wanted) my drive was wiped and LM was installed. So, I've LM on a 320GB partition. Now in reading more I realise that I need to create a data partition and also a backup partition (for 'timeslip'?) too.

NOTE: the only thing I've installed is Firefox so far.

So, using terminal and gparted I get access to my disc space, which apart from bits and pieces at the start is one big partition. As my LM install is 8.6GB I expect to be able to reduce the main Linux package installation partition (say to 100GB) to create a data partition (30gb) and a backup/restore partition from the rest.

However, in trying to select the right end of the big partition slider, it absolutely won't let me shrink the massive partition. It's taken me ages to figure out that it's likely because I selected the 'encrypt the installation' option.

So, my question is, is it possible to get around this problem within the current installation? Is it possible to disengage 'timeslip' so I can get access to and resize my partitions or am I going to have to do a re-installation and start again? If I do reinstall, what should I select to be able to define various partitions?

Wow, I managed to get all my passwords etc into Firefox 3 or 4 days ago (what an insane effort that took), today however everything within Firfox has disappeared (password/bookmarks!!!). So, I'm back to my windows install to write this?!?!?!
cliffcoggin
Level 8
Level 8
Posts: 2300
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: How to Use gparted Safely

Post by cliffcoggin »

Clivoo.
This thread is three years old and your situation is rather different. It would be better to start your own thread to pose your own question to avoid confusion.
Cliff Coggin
Locked

Return to “Storage”