Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Ok, I have Ubuntu installed but I want to install Windows also (dual-boot). Problem is, I don't have a free partition. I have my root partition (15 GB), and my /home partition (300 GB). The home partition has about 50 GB free space, and it's formatted reiserfs. I've heard about tools like resize_reiserfs, and I even tried it yesterday - I shrunk my /home partition (it's on /dev/sda6) with the command:

resize_reiserfs -s -20G /dev/sda6

After that gparted showed that the partition itself was 280 GB, but there was no way to create a new partition from the 20 GB. I ended up running

resize_reiserfs -s +20G /dev/sda6

to restore my /home partition to its previous size.

share|improve this question
1  
What have you tried and how did it fail? –  Philomath Jul 20 '11 at 6:30
    
I went to the resize/move dialog in gparted, but it was showing the partition already as 280 GB size. However there was no unallocated space following it (which I could have used to make a new partition). It's as if those 20 GB became 'lost'. I eventually ran resize_reiserfs again so I could at least regain that lost space. –  sashoalm Jul 20 '11 at 10:15
add comment

2 Answers 2

up vote 2 down vote accepted

resize_reiserfs shrinks the file-system only, not the partition itself. Quoting from here:

However shrinking a partition is probably more complicated: you should first use resize_reiserfs to shrink the filesystem (the on-disk data-structure) and then only use fdisk to shrink the partition (the space allocated on the disk).

See here for an explanation.

You can use gparted to combine both steps into one.

share|improve this answer
add comment

You should be able to do everything you want entirely within gparted. It can resize the reiserfs partition, create the NTFS partition, and possibly even format it for you.

You don't actually need to format it from Linux, since the Windows installer will do that, but it will help avoid errors if you concentrate such destructive operations all within a single program run.

share|improve this answer
    
So I don't need to run resize_reiserfs before that? Would gparted make sure that files or file fragments (if any) that are in the last 20 GB get moved to the first 280 GB, so I don't lose any data? –  sashoalm Jul 20 '11 at 9:00
    
Quoting the parted user manual on the resize command: "...Parted does not require a file system to be "defragged" (Parted can safely move data around if necessary)." GParted is just a GUI on top of command line parted, so this applies. –  Warren Young Jul 20 '11 at 10:20
    
Great, I'll try this then. –  sashoalm Jul 20 '11 at 10:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.