LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-11-2016, 03:35 AM   #1
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Rep: Reputation: Disabled
Question Shrink main filesystem partition


How?

I tried PartedMagic from Hiren's Boot CD but Linux refused to boot after that telling me that "errors were found when checking the disk for /" (tried twice) I restored the partition to full size in Hiren's and it booted up fine.

Corsair Force LX 128 GB SATA SSD with a 110 GB ext4 partition and a swap partition taking up the rest.
Linux Mint 17.2

I wanted the partition to be shrunk to 45 GB to make room for a Windows partition.

Last edited by ZZII; 01-11-2016 at 03:40 AM.
 
Old 01-11-2016, 04:12 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Use gparted liveCD - it will also shrink the filesystem (first).
 
Old 01-11-2016, 06:02 AM   #3
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Use gparted liveCD - it will also shrink the filesystem (first).
Hangs at the Debian GNU/Linux information screen. (This is E2B keep in mind. Is it worth burning a CD or won't it make a difference)

I was not contiguous, maybe that makes a difference (it said it copied it to the contiguous space to use it)

Last edited by ZZII; 01-11-2016 at 06:03 AM.
 
Old 01-11-2016, 06:22 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Just dd the image to a USB.
Before you start again, let's see what the disk looks like.
Code:
parted /dev/sda "print free"
(adjust device node if necessary).
 
Old 01-11-2016, 04:37 PM   #5
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Code:
KUALUS user # parted /dev/sda "print free"
Model: ATA Corsair Force LX (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
        17.4kB  1049kB  1031kB  Free Space
 1      1049kB  12.2GB  12.2GB  linux-swap(v1)
 2      12.2GB  128GB   116GB   ext4
        128GB   128GB   335kB   Free Space
As far as I remember this was done by Mint's installer (with my choice of swap space)

I'll just try VGA mode. I remember having trouble with using the Ctrl+Alt+F1, F2, etc. consoles and getting a black screen on Mint. I had to change a boot option to use VGA.

I'll see if I can make the ISO contiguous. I don't have any free USBs they all have operating systems on them.

Last edited by ZZII; 01-11-2016 at 04:39 PM.
 
Old 01-11-2016, 04:50 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
You should be able to use either Parted Magic or GParted to do that. You would first need to boot a disk or flash drive with one on it (GParted should be on the Mint Live CD), then open GParted, unmount the Mint partition (sda2) and shrink it by moving the partition from the right to the size you want.
 
Old 01-11-2016, 04:56 PM   #7
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
You should be able to use either Parted Magic or GParted to do that. You would first need to boot a disk or flash drive with one on it (GParted should be on the Mint Live CD), then open GParted, unmount the Mint partition (sda2) and shrink it by moving the partition from the right to the size you want.
That's what I did using Parted Magic. I didn't unmount, I don't believe it was mounted. I'll try the Mint CD.

Is it normal for a Live Linux media to spam you with errors before it starts? Clonezilla, GParted and Linux Mint all do this. They throw a ton of errors when at the command line stage but normally boot correctly anyway. (Not always)

OK, 'tis done. Mint boots. I'm guessing Hiren's hack job live Linux messed something up the first time.

Thank-you all for the help.

Last edited by ZZII; 01-11-2016 at 05:10 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 20 - Expand /home partition and shrink Win8 partition lolzies Linux - Hardware 1 07-12-2014 10:40 AM
shrink an lvm partition Pedroski Linux - Hardware 4 06-05-2012 09:13 AM
shrink ext3 filesystem using e2fsprogs and fdisk m4rtin Linux - Server 13 04-22-2012 09:02 AM
[SOLVED] Partition shrink to filesystem size bratherlui Linux - Hardware 4 04-17-2010 03:08 AM
Can you shrink a partition? ericcarlson Linux - Software 1 01-22-2002 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration