LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-28-2010, 08:02 AM   #1
tradet
LQ Newbie
 
Registered: May 2010
Posts: 20

Rep: Reputation: 0
Increase home to fill free space gap after resizing windows


Hello,

After trying out Slackware a while I've now decided to extend my /home partition as I just made a small one for testing purposes and now I have freed up space from my windows partition and I need some help to make this work.

Here the free space is between sda1 (windows) and sda2 (swap) but I would like to increase sda4 (home).

Code:
# fdisk -l

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10199    81920000    7  HPFS/NTFS
/dev/sda2           32636       33400     6136832+  82  Linux swap
/dev/sda3           33400       35949    20474880+  83  Linux
/dev/sda4           35949       38913    23811935+  83  Linux
Code:
# cat /etc/fstab
/dev/sda2        swap             swap        defaults         0   0
/dev/sda3        /                ext4        defaults         1   1
/dev/sda4        /home            ext4        defaults         1   2
/dev/sda1        /mnt/win         ntfs-3g     umask=022        1   0
Code:
shortened lilo.conf
image = /boot/vmlinuz-custom-2.6.34.1
  label = Slackware
  root = /dev/sda3
  read-only

other = /dev/sda1
  label = Windows
  table = /dev/sda

image = /boot/vmlinuz
  root = /dev/root
  label = Fallback
  read-only
Hopefully I got the most important info right.

Thx in advance

Last edited by tradet; 07-28-2010 at 08:09 AM.
 
Old 07-28-2010, 08:43 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
The easiest way is to use gparted which is on the Parted Magic cd:

http://partedmagic.com/

Essentially, you move sda2 then sda3 to the left to put the unallocated space next to sda4 and then enlarge sda4 to take up all the available space. You should back up your drive to an external hard drive beforehand since moving and resizing partitions carries some risk of data loss.

You shouldn't have to change fstab or liloconf since the partition layout order is not changing and each partition will have the same device file designation when you are done. However, that fact notwithstanding, moving partitions around like you will be doing can cause lilo to no longer function. If that happens, you have to boot with a live cd, mount your root partition and run lilo -v from a change root environment:

# chroot <root mount point>
# lilo -v

That usually corrects the problem.
 
1 members found this post helpful.
Old 07-29-2010, 02:47 AM   #3
tradet
LQ Newbie
 
Registered: May 2010
Posts: 20

Original Poster
Rep: Reputation: 0
Thx, I'll create a backup and then I report back to you.
 
Old 08-10-2010, 03:48 PM   #4
tradet
LQ Newbie
 
Registered: May 2010
Posts: 20

Original Poster
Rep: Reputation: 0
I managed to fix it on the first try without anything failing. Although I was kinda slow with the backup your reply was great, thx.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to increase the disk space of /home peddip Linux - Server 5 06-12-2009 01:59 AM
Deleting files does not increase amount of free space? frznchckn Linux - General 6 12-19-2008 06:23 AM
LXer: GNU PDF to fill missing gap in functionality LXer Syndicated Linux News 0 11-30-2007 01:00 AM
Resizing a boot partition to free more space harlikoen Linux - Hardware 4 05-06-2007 11:00 AM
increase space on /home partition v1nc3nt Linux - Newbie 1 10-11-2006 03:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:48 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