Ask Your Question
0

Can I safely delete another Linux partition and expand my Windows partition?

asked 2014-05-15 03:14:08 -0500

kdelwat gravatar image

updated 2014-05-15 09:40:15 -0500

mether gravatar image

After a load of messing around with different operating systems, I have been left with an enormous mess of partitions. Currently I have Fedora 20 installed alongside Windows and Ubuntu. I want to delete the sda1 Ubuntu partition and expand the sda4 Windows partition into the newly freed space. However, I'm worried that deleting Ubuntu may mess up my GRUB bootloader. Is it safe to delete?

The output of sudo fdisk -l is:

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xe8816e73
Partition 3 does not start on physical sector boundary.

Device    Boot     Start       End    Blocks  Id System
/dev/sda1           2048 319989759 159993856  83 Linux
/dev/sda2      319989760 720283695 200146968   7 HPFS/NTFS/exFAT
/dev/sda3      720285694 894255103  86984705   f W95 Ext'd (LBA)
/dev/sda4 *    894255104 976773119  41259008   7 HPFS/NTFS/exFAT
/dev/sda5      884492288 894255103   4881408  82 Linux swap / Solaris
/dev/sda6      720289792 721313791    512000  83 Linux
/dev/sda7      721315840 884490239  81587200  8e Linux LVM

Partition table entries are not in disk order.

Disk /dev/mapper/fedora-root: 49.8 GiB, 53406072832 bytes, 104308736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/fedora-swap: 3.8 GiB, 4060086272 bytes, 7929856 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/fedora-home: 24.3 GiB, 26075987968 bytes, 50929664 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

If you need any more information I will happily provide it. Thanks in advance.

edit retag flag offensive close merge delete

Comments

what's the result of lsblk, sfdisk -l and parted -l ?

yanglifu90 gravatar imageyanglifu90 ( 2014-05-15 03:32:28 -0500 )edit

@yanglifu90 parted -l:

Model: ATA Hitachi HTS54505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  164GB  164GB   primary   ext4
 2      164GB   369GB  205GB   primary   ntfs
 3      369GB   458GB  89.1GB  extended                  lba
 6      369GB   369GB  524MB   logical   ext4
 7      369GB   453GB  83.5GB  logical                   lvm
 5      453GB   458GB  4999MB  logical   linux-swap(v1)
 4      458GB   500GB  42.2GB  primary   ntfs            boot


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/fedora-home: 26.1GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  26.1GB  26.1GB  ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/fedora-root: 53.4GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  53.4GB  53 ...
(more)
kdelwat gravatar imagekdelwat ( 2014-05-15 03:51:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-05-15 16:06:24 -0500

NickTux gravatar image

updated 2014-05-15 16:12:27 -0500

If you want to delete Ubuntu and keep Fedora and Windows

Boot from Fedora and install Fedora's Grub bootloader on Disk's MBR.

sudo grub2-install --recheck /dev/sda

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot to confirm that everything running smooth. Grub should load and list Windows, Ubuntu and Fedora (as the first option).

Then boot into Windows and use any tool available to delete the Ubuntu partition and expand Windows partition. You can use either Windows disk management or better (imo) use Partition Wizard (free/home edition). Just be careful what partition you will delete (don't delete Fedora partitions).

If you want to delete everything but Windows

First you must restore Windows bootloader. This is mandatory in order to keep your PC booting, after Linux removal. You can do that either by boot from a Windows DVD or by using Windows boot options (press F8 before Windows logo) , then choose options as below:

1) Repair your computer

2) Language English

3) Login with your username and password

4) Start up repair. This option should restore Windows bootloader. Reboot to confirm. The PC should boot now directly on Windows.

Then, by using either Windows Disk Management or an external tool you can delete any Linux partition and expand the Windows C:\ partition.

Tip (in any case):

In order to expand Windows C:\ partition you should leave the deleted one unallocated. That is, without any filesystem. The unallocated partition should be next to one you want to expand (or you can move it there).

edit flag offensive delete link more

Comments

Thank you!

kdelwat gravatar imagekdelwat ( 2014-05-16 18:15:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-05-15 03:14:08 -0500

Seen: 2,389 times

Last updated: May 15 '14