I have Windows 7 and Debian dual-booted on my laptop. I'm getting cramped for space on the Debian side, so I want to remove the Windows partition and use the whole computer for Debian. I'm currently using a single partition for Debian (plus a swap partition), but would like to split /home into its own partition in the new arrangement.

Since the Windows partition is larger than all the Debian partitions, there's space enough for the whole linux installation in the current windows partition. So I'm thinking what I'd do is:

reformat the 60GB windows 7 partition /sda2 to an extended partition with two two ext4 partitions, one 15 GB for /, the other 45 GB for /home

move/clone my current / and /home directories to the new partitions

reformat the partitions where the debian install was, freeing up 50GB of space

resizing the new extended partition, and the /home partition in it, to incorporate the 50GB freed in step 3

leave a 2 GB at the end for swap

I've posted my fdisk -l below.

My questions:

Is this a sensible approach?

How do I do step 2? Can I move the / directory without having to reinstall it?

I'm assuming that 4 will be straightforward, since I'll be resizing by moving the end of the partition, not the beginning - is that correct?

I don't really. I just wasn't sure about updating the bootloader, so I figured I'd leave the working one in place. Assuming I'd have to reconfigure it at some point to point to the new / directory.
–
TylerOct 3 '12 at 15:20

Do you have the opportunity to download LiveCD image?
–
SergeOct 3 '12 at 15:22

Yes. I'm not in a hurry, and my current system works fine and is connected to the internet.
–
TylerOct 3 '12 at 15:28

Ok, then download liveCD image of your choice here: debian.org/CD/live; make a bootable CD so you may boot the desktop from it to fix the problems if something goes wrong. Then proceed as described in answer you just get.
–
SergeOct 3 '12 at 15:31

If you're not already booted from a rescue disc, boot from one (you could use the Debian install disc, just switch to a terminal at the appropriate point, or alternatively a Ubuntu disc)

mount the new logical volumes (or just one, if you decide not to split). If you mount both, make sure to mount home inside the new root (e.g., as /new-root/ and /new-root/home) Mount your old rootfs somewhere, too.

This is the point of no return. The next steps destroy your old partitions.

You can now pvcreate your old partitions, then add them to your volume group (vgextend)

You can now resize your / and /home logical volumes using lvextend followed by resize2fs (or whichever tool for your filesystem). This can be done online, with your system running.

Once you're on LVM, any future disk changes are much easier. You can use the LVM commands to do pretty much any disk change, with the system running even.

(Note: I haven't done this for a bit, I may have missed a step or two, but I'm pretty sure I haven't missed anything catastrophic. And of course, your original install & data is still around until after you've confirmed you're booted onto the new rootfs)

Thanks, that's great. The reason I want to split the / and /home is that, currently, I've run into a few problems when /home fills up with data, and causes system-wide problems because / is then full too. This will be less of an issue with the expanded capacity, but still a possibility.
–
TylerOct 3 '12 at 16:00

Done! I managed to screw up my bootloader (again), which required reinstalling from the Live CD. I was a little cloudy on some of the steps in #8. In any case, all done now!
–
TylerOct 3 '12 at 21:13