English

# Shrink Fedora to install Windows 10 (dual-boot)

Hi guys,

I currently have a Fedora-only setup on my Sony Vaio E15 laptop but I'm gonna need to resize the Fedora installation in order to allow space to install Windows 10 and configure a dual-boot.

I've been looking for info on how to correctly do this using a LiveCD but I'm not 100% sure of the steps I should follow, since it looks like it could be very easy to end up screwing my partitions/grub and not being able to boot at all afterwards.

Could you please give me some guidance?

This is my current partitioning setup:

Model: ATA TOSHIBA MQ01ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size   File system  Name                  Flags
1      1049kB  211MB   210MB  fat16        EFI System Partition  boot, esp
2      211MB   735MB   524MB  ext4                               msftdata
3      735MB   1000GB  999GB                                     lvm


Thanks.

edit retag close merge delete

Sort by » oldest newest most voted

I'll be glad to provide more specific advice if you need it, but ArchWiki has a pretty good section on these matters. Basically, you'll need to do the following (I'm assuming your LVM partition has but one volume group):

0) Back up everything completely. This is one of the least palatable administrative procedures to have to undertake when it comes to managing storage.

1) Boot into a rescue environment so that you may manipulate your file systems, logical volumes, and disk partitions while they are unmounted and not in use.

2) Determine the total amount of space you intend to reclaim for Windows 10. If you don't need to reduce any logical volumes in order to reduce the volume group to reclaim the amount of space decided upon above, proceed directly to step 6. If you need to reduce logical volumes to ready the volume group for a reduction in its size, proceed to step 3.

3) Identify logical volumes whose file systems (I'm assuming your logical volumes contain single file systems which consume the entire volume) can be reduced so that the logical volumes can be reduced in order to ready the volume group for reduction.

4) Reduce in size those file systems targeted for reduction using the appropriate tools (e.g. resize2fs for EXT4; if you're using XFS, you're going to have to simply back up all data, destroy the XFS file system, reduce the logical volume, and create a new XFS file system, since there is no way to reduce the size of an XFS file system).

5) Using lvreduce, reduce in size the logical volumes which have been prepared for reduction by having their contents (file systems) readied appropriately. I would work only in terms of extents rather than specifying absolute data sizes (e.g. MB, GB) so as to ensure precision in the operation. Let me know if you need more details regarding that information.

6) Reduce your volume group using vgreduce. Again, specify the reduction in terms of physical extents for maximum precision.

7) Resize your physical volume using pvresize, as described in the ArchWiki page linked above. As a precaution, I recommend resizing your physical volume to a size significantly beneath that to which the partition will be reduced (i.e. if your Windows 10 partition is going to be 200 GB, so you decide to reduce your lvm partition to 800 GB, make sure your physical volume is 790 GB or so to ensure no data is accidentally destroyed when you remove the 200 GB from the end of the lvm partition in step 10 below).

8) Use a disk partitioning tool (I like cfdisk for anything it's capable of doing, and this is one of those things) to chop off the end of the partition, freeing the space necessary for Windows 10.

Let me know if you need any further information; you should ensure that you thoroughly understand this procedure before attempting it.

more

Hi,

I'll check the article on Archwiki out. Looks like a tricky procedure but I'll definitely try it after fully backing my system up.

Many thanks for your help bitwiseoperator!

( 2015-10-12 22:41:21 +0000 )edit

Sure thing - if you consider this a full answer to your question, feel free to mark it as such!

( 2015-10-13 13:31:07 +0000 )edit

[hide preview]