LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-16-2011, 02:47 AM   #1
warrior23
LQ Newbie
 
Registered: Jun 2010
Posts: 17

Rep: Reputation: 0
Re-size Partition.


How do i re size my Slackware partition without deleting it and starting over, I'm new to Slackware and the work i have done i don't feel like doing again.

I have set my swap and my actual HDD partition for Slackware to +8048M, I am correct in saying that fdisk can only delete and start fresh, I was a Ubuntu/Fedora user if i could get something like Gparted up that would be great but i don't mind some reading and learning some more terminal based stuff.

Planning on working out the kinks and dealing with the learning curve, Love to learn.
 
Old 01-16-2011, 03:25 AM   #2
mutexe
Member
 
Registered: May 2009
Location: Malvern, UK
Distribution: Slackware 14.1
Posts: 240

Rep: Reputation: 32
Could you not boot from a live ubuntu cd and use gparted from there? The bonus of that is none of your partition on your machine will be mounted if you're on a live cd.
 
Old 01-16-2011, 04:15 AM   #3
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,179

Rep: Reputation: 236Reputation: 236Reputation: 236
Why use Ubuntu? There are LiveCD/USB images from the GParted official website.
 
1 members found this post helpful.
Old 01-16-2011, 05:35 AM   #4
disturbed1
Senior Member
 
Registered: Mar 2005
Location: USA
Distribution: Slackware
Posts: 1,133
Blog Entries: 6

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Originally Posted by guanx View Post
Why use Ubuntu? There are LiveCD/USB images from the GParted official website.
That will boot and run much quicker than Ubuntu. As they are geared towards system rescue and maintance. Personally I like Slitaz, CDlinux, and RIPLinuX (short review) if I need a GUI based rescue CD.

There are plenty of command line tools to resize as well. If you boot with the Slackware installation medium, you can use resize2fs if your partitions are formatted to ext3/4, reiser fs and xfs have their own resize tools. I believe you might be SOL if you chose JFS and need to shrink the partition. JFS can be enlarged, but not shrunk.

man resize2fs
 
Old 01-16-2011, 09:04 AM   #5
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
Gparted is definitely the answer if you're unfamiliar with the command-line tools. Personally, I swear by the SystemRescueCD distribution which includes gparted. I just this past week used it to resize and move a 2TB partition without incident.
 
Old 01-17-2011, 01:25 AM   #6
warrior23
LQ Newbie
 
Registered: Jun 2010
Posts: 17

Original Poster
Rep: Reputation: 0
This is what fdisk says my lay out is now, Can anyone give me any pointers on what exactly i should change?, I just want to be able to use my whole HDD in slackware, I've already run out of space so i can't download anything else to poke around and learn, I know besides the Swap there should be one for "/" One for "/Home" And another for "/usr/local" or something, I followed the tutorial but now i think of it when i set the partitions i did not specify what was for what at anytime in the install, Besides the "Swap" of course.



Device Boot Start End Blocks Id System
/dev/sda1 1 1027 8249346 82 Linux swap
/dev/sda2 1028 2054 8249377+ 83 Linux
/dev/sda3 2055 3081 8249377+ 83 Linux
/dev/sda4 3082 19457 131540220 83 Linux

EDIT:

I have the systemrescuecd now too so any tools on that i can work with.

Last edited by warrior23; 01-17-2011 at 01:26 AM.
 
Old 01-17-2011, 05:48 AM   #7
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
/etc/fstab will tell you what's mounted where at boot.
 
Old 01-17-2011, 09:02 PM   #8
warrior23
LQ Newbie
 
Registered: Jun 2010
Posts: 17

Original Poster
Rep: Reputation: 0
/dev/sda1 swap swap defaults 0 0
/dev/sda2 / ext4 defaults 1 1
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0

My Fstab.
 
Old 01-17-2011, 09:25 PM   #9
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
Without fancy software, you can resize any one partition without loosing data as long as it starts in exactly the same place as it was. -EXACTLY- the same place.

That being said, if you want to shrink the partition, you first shrink the filesystem to just under the final size. Then use fdisk to delete and recreate the partition. Then expand the filesystem to fill the extra space on the partition.

If you want to go larger, you have to move any data that would be on the partition you're expanding into. Fdisk to delete the partition in the way, then resize the first partition over the empty space. Then expand the filesystem to fill the void.

However, because none of this is low level data manipulation, you can not move partitions only linearly expand and contract from the same starting point. It's also extremely risky.
 
Old 01-17-2011, 10:11 PM   #10
DonnieP
Member
 
Registered: Jan 2008
Location: Richmond, VA USA
Distribution: Slackware
Posts: 144

Rep: Reputation: 29
Given that you "just want to be able to use my whole HDD in slackware" and also given that per /etc/fstab your /dev/sda3 and /dev/sda4 are not being used at all (despite your thinking 'there should be one for "/" One for "/Home" And another for "/usr/local" or something'), I would consider doing this:
1. Get a good backup of your system (/dev/sda2)
2. Using gparted:
a. Delete partitions 3 and 4
b. Grow /dev/sda2 to take up the resulting empty space

Before doing this you might want to mount partitions 3 and 4 just to see what's there before you wipe them.
 
Old 01-19-2011, 08:47 AM   #11
hughetorrance
Member
 
Registered: Aug 2009
Location: London North West
Distribution: x86_64 Slack 13.37 current : +others
Posts: 459

Rep: Reputation: 59
You can only expand into an adjacent partition... !
 
Old 01-23-2011, 08:18 PM   #12
BILLYKANE
Member
 
Registered: Feb 2008
Location: Hefei,Anhui,China
Distribution: Slackware;chakra
Posts: 96

Rep: Reputation: 22
I have used WINPM(partition magic) to resize two non-linux partitions, and all work fine. hope you can use it to adjust your linux patition without data lost.
 
Old 01-23-2011, 10:40 PM   #13
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552
Quote:
Originally Posted by warrior23 View Post
Code:
  Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1027     8249346   82  Linux swap
/dev/sda2            1028        2054     8249377+  83  Linux
/dev/sda3            2055        3081     8249377+  83  Linux
/dev/sda4            3082       19457   131540220   83  Linux
Quote:
Originally Posted by warrior23 View Post
Code:
/dev/sda1        swap             swap        defaults         0   0
/dev/sda2        /                ext4        defaults         1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
My Fstab.
Looking at your "fdisk -l" out put and your fstab I am wondering about /dev/sda3 and /dev/sda4. They not being mounted in fstab.

Perhaps that is where all of your disk space is?

What is the output of "df -hT"? Of "mount"?

Edit: OK, reread the thread, I guess you have other Linux systems running on those.

Last edited by chrisretusn; 01-23-2011 at 10:48 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
Size in superblock is different from the physical size of the partition cyberfishee Linux - Hardware 18 09-11-2016 08:48 AM
Solaris 8 - file size and partition size discrepancy noir911 Solaris / OpenSolaris 1 02-10-2009 04:43 PM
file system size larger than fysical size:superblock or partition table corrupt klizon Linux - General 0 06-18-2004 04:18 PM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
fdisk partition size differs from mounted partition size jimieee Linux - General 3 10-15-2003 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:10 AM.

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