[NTLUG:Discuss] parted, win dual boot & linux

Christopher Cox cjcox at acm.org
Sat Jan 24 10:42:36 CST 2015


On 01/24/2015 09:55 AM, Fred wrote:
> I have a 1TB drive split between Win7 and opensuse 13.1. 
> The Win7 no longer will boot, don't know why, don't care.
> I want to add the space allocated to Win7 to Linux but am not
> sure how to proceed due to the way this drive is partitioned.
> 
> Here is the output from gparted:
> http://s166.photobucket.com/user/fredstevens/media/gparted/gparted-01_zpsed7wgi5q.png.html?sort=2&o=0
> 
> Any suggestions would be appreciated.
> Thanks,
> Fred

Well.... the sad fact is that it takes space to manipulate space.

If you had used LVM for your /home, there would have been no problem btw in
adding the NTFS area to it (for the future).

So, one thing you could do is create a filesytem over the NTFS /dev/sda2 and
mount it somewhere.

You could certainly attempt to rebuild / because it's small, but rebuilding / as
an LVM can be difficult.  You'd boot into a recovery shell then copy all your /
stuff into a root LVM you create using /dev/sda2 space.  But then you need to
alter grub2 to know how to boot that.  Depending on options you may have to
create a separate /boot in order to find the new LVM root.  Needless to say,
it's going to get complicated at this point.

Rather than put all the risk into the equation, I'd slap on a cheap USB drive so
you can effectively manipulate /home as mentioned above.   Preserve the /home
data onto the USB drive.  Then blow away /home (take it out of /etc/fstab).
Place /dev/sda2 and /dev/sda7 under LVM control (pvcreate /dev/sda2 /dev/sda7).
 Put those PVs into a VG (vcreate homevg /dev/sda2 /dev/sda7).  Carve out a home
LV (lvcreate -n homelv -l 100%VG homevg).... oh you don't have to use the whole
VG, you could use -L 700G or something like that....  Put your file system on
homelv (mkfs.ext4 -m0 /dev/homevg/homelv) and alter your /etc/fstab to mount
/dev/homvevg/homelv as /home.  Then copy your data back off the USB drive into
your new /home.

LVM and devmapper support will have to be pulled in to do this.. for openSUSE
13.1 they should be there.

I'm pretty sure there a lots of people at NTLUG that could help you with this
procedure at their meeting.








More information about the Discuss mailing list