Go Back   AnandTech Forums > Software > *nix Software

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2013
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 11-23-2012, 04:33 PM   #1
Jeff7181
Lifer
 
Jeff7181's Avatar
 
Join Date: Aug 2002
Location: SE Michigan
Posts: 18,126
Default Want to resize a Linux partition via CLI

I have Ubuntu Server 12.04 running in a VM. /dev/sda1 is mounted on / and is running out of free space. I've already resized the disk in VMware to a much larger size, but I'm having some trouble figuring out how to resize the partition. In Windows, I'd just go to disk management and extend the partition into the free space on the disk. I'm just not sure how to do that via command line in Linux. Can anyone help?
__________________
"The Universe is huge and old and rare things happen all the time, including life." - Lawrence Krauss
Authorized Amsoil Dealer
Jeff7181 is online now   Reply With Quote
Old 11-23-2012, 07:06 PM   #2
lxskllr
Lifer
 
lxskllr's Avatar
 
Join Date: Nov 2004
Location: Somewhere over the rainbow
Posts: 37,277
Default

I can't help with the cli resize, but perhaps you can delete your apt cache to free up some space on /. All your downloaded packages get kept, and it can take a tremendous amount of room. sudo apt-get clean will delete those packages. apt-get autoclean is a bit more conservative, as it only removes packages that aren't available anymore. Your choice, but I always use clean.
lxskllr is online now   Reply With Quote
Old 11-23-2012, 08:18 PM   #3
Red Squirrel
Lifer
 
Red Squirrel's Avatar
 
Join Date: May 2003
Location: Canada
Posts: 26,526
Default

Does it have to be CLI? There is a GUI boot CD tool you can use (gparted) that is like Partition Magic and works great. I think in the back end it does use CLI so there may be a way you can see the command it issued. You can probably open a console and do ps aux while it's running.
__________________
~Red Squirrel~
486dx2 @66Mhz turbo, 8MB ram, 512MB HDD, sound blaster 16 + 2x cdrom, Trident 1MB video card @ 640*480, 56k high speed modem.
Red Squirrel is offline   Reply With Quote
Old 11-23-2012, 10:12 PM   #4
Jeff7181
Lifer
 
Jeff7181's Avatar
 
Join Date: Aug 2002
Location: SE Michigan
Posts: 18,126
Default

I guess it doesn't have to be. But I figured there should be a way to do it at the command line rather than use a boot CD. If not, then I guess I'll use a boot CD... but even Windows is capable of the same task via command line. I'd be shocked if there wasn't a way to do it in Linux without a boot CD.
__________________
"The Universe is huge and old and rare things happen all the time, including life." - Lawrence Krauss
Authorized Amsoil Dealer
Jeff7181 is online now   Reply With Quote
Old 11-23-2012, 11:01 PM   #5
Jeff7181
Lifer
 
Jeff7181's Avatar
 
Join Date: Aug 2002
Location: SE Michigan
Posts: 18,126
Default

I booted to the Ubuntu Live CD and was able to extend the partitions. Thanks for the suggestion.
__________________
"The Universe is huge and old and rare things happen all the time, including life." - Lawrence Krauss
Authorized Amsoil Dealer
Jeff7181 is online now   Reply With Quote
Old 11-24-2012, 10:15 AM   #6
Nothinman
Elite Member
 
Nothinman's Avatar
 
Join Date: Sep 2001
Posts: 30,672
Default

Either parted or a combination of fdisk and a filesystem resize tool should work from a live system as long as the filesystem supports online resizing.
__________________
http://www.debian.org
Nothinman is offline   Reply With Quote
Old 11-24-2012, 02:03 PM   #7
LumbergTech
Diamond Member
 
Join Date: Sep 2005
Posts: 3,622
Default

This method is better than the original one I posted:
http://ubuntuforums.org/showthread.php?t=35087

Just make sure you follow ALL of the instructions..works like a charm

Last edited by LumbergTech; 12-05-2012 at 03:22 AM.
LumbergTech is offline   Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.