Convert MBR Partitioned Drives to GPT

KB ID 0001407

Problem

I got asked if I’d ever had to do this today, I vaguely remember having this problem in the past, but I can’t remember how I solved it. You set the ‘Partition Table Type‘ on a  disk in Windows, when the drive is first initialised, like so;

And the default is MBR, so that usually gets ticked, the problem is MBR only supports disks up to 2TB in size. Now if it’s just a new disk, with no partitions on it, you can simply change it;

But if it’s got a partition on it, (and probably some live data) you cant!

Previously, (before Windows 10, and Server 2016,) The Microsoft solution was to delete the partitions and create a new one, which can be a little time consuming, especially if you have live data on it! So can you convert it to GPT Live with no data loss? 

Solution

Yes! As usual, make sure you have a decent backup first, and if you are using a virtual environment, you can snapshot the virtual machine before hand, (I tested this in the lab, by taking a snapshot, converting a drive from MBR to GPT, then reverting to the snapshot, and it flipped back to MBR with no loss of data). 

You need to know what disk number Windows has assigned to the drive, in disk management right click the drive, and select properties.

Windows 10 and Windows Server 2016

Using this method will require (after you have finished) you machine. is set to UEFI boot, otherwise it will work fine until you try and reboot, then the machine won’t boot! So if you are doing this on a Virtual Machine in Hyper-V MAKE SURE it’s a generations 2 VM!

You will find MBR2GPT.exe in C:\Windows\System32, if it’s not there do a full round of Windows updates! Simply open an Administrative command window and run the following commands;

[box]

cd c:\windows\system32
mbr2gpt /convert /disk:1 /allowfullOS

[/box]

Take note of the warning the machine should now be set to UEFI boot mode, so if its a VMware VM, then change this value;

For OLDER Vesions of Windows

Download and extract gptgen-1.1 then run the following command;

[box]gptgen.exe -w \\.\\physicaldrive1[/box]

Note: Where ‘1‘ is the disk number you took note of above.

Note: If you see “Block read failed, check permissions!” Then you might want to use MBR2GPT {above} instead.

That’s it done! In ‘disk management’ you will need to ‘Rescan Disks’ to see the change.

In the unlikely event that something exploded, you can ‘roll-back‘ to your snapshot.

Related Articles, References, Credits, or External Links

NA

Resizing Windows Volumes / Drives in VMware vSphere / ESX

KB ID 0000381 

Problem

This article is primarily geared towards making your guest virtual machines hard drives LARGER, If you want to SHRINK or make the drive smaller then see the following article.

Resizing Guest Hard Drives using the VMware Converter

Solution

Re sizing a Guests Hard Drive (Make it larger)

1. On the properties of the VM select the hard disk in question and locate its size.

2. Enter the new size and hit OK. Note: Making the drive size smaller, will have no affect, if you want to do that clone the drive. If the option is “Greyed out” then make sure you DO NOT have any snapshots for this machine.

Re-sizing the guests “Volume” Option 1 – Graphically

Note: To do this using diskpart skip forward to number 10.

3. On the guest > Right click “My Computer” > Manage > Locate “Disk Management”. You will see there’s some free space that’s appeared on the end of the drive, (Click action > Re-scan if you can’t see it).

4. Simply right click the existing volume and select “Extend Volume”.

5. Next.

6. Copy in the extra space you want to assign (all of it probably) > Next.

7. Finish.

8. All the physical drive should now be committed.

9. And just to be sure, look in “My Computer” the drive is now 300 GB.

Re-sizing the guests “Volume” Option 2 – From Command Line with diskpart

10. Start > run > cmd{enter}

[box]diskpart list volume&lt select volume x –Where x is the volume number of the volume to be re sized[/box]

11. The final command is simply extend (This uses ALL the available free space.) Note the volume size in the picture below has jumped up by 40 GB.

Resizing a System (boot) Partition.

Server 2008 R2 and Windows 7 can do this quite happily. Older versions of Windows do not like having their system drive re sized, you see the following error if you try,

Error: The volume you have selected may not be extended. Please select another volume and try again.

Option 1 (Connect this drive to another machine)

In a virtual environment this is much simpler, but even if its a real physical hard drive, you can put it into another server and re size it. In an ESX environment simply do the following,

1. Shut down the machine that needs its drive re sizing, then go to another virtual machine’s properties and select add.

2. Hard Disk > Next.

3. Select “Use existing virtual disk” > Next.

4. Browse to the the drive we want to re size > Next.

5. Next.

6. Finish.

7. Now on the VM (Action > Re-scan disks). You will see the drive, and it’s not listed as a system drive, so you can extend it using any of the methods listed above.

8. For example, heres the drive re sized using disport.

9. when you have re sized the drive go back to the properties of the machine you have connected it to, and remove it.

10. OK.

11. Now power on the original VM and drive will be re sized.

Option 2 (Re size the Windows volume with GParted)

Note: This will work for a physical server as well.

1. Here’s our system drive with some nice shiny free space.

 

2. Make sure the server in question can boot from CD, in VMware do the following to boot to the machines BIOS, for a real server watch the screen as the server boots for instructions (Usually F10, F1 or Esc but differs depending on vendor).

3. Locate the boot order and make sure CD/DVD is at the top of the list.

4. Download GParted burn the image to CD, if you are working on a real server (use ImgBurn if your stuck). Or simply point the VM to the iso image, and boot the machine in question from it. At the welcome screen press Enter.

5. Use your arrow and tab keys to select Don’t touch the keymap > OK.

6. Pick a language.

7. We want to launch the GUI (X Windows), so select 0 (Zero).

8. Select Re size/Move > Drag the arrow to include the free space > Re size/Move.

9. Apply

10. Apply.

11. Close.

12. Click GParted > Quit.

13. Exit > Reboot/Shutdown > OK.

14. Remove the CD/ISO and press Enter.

15. The guest will run chkdsk the firs time it boots. This is normal don’t panic.

16. Once booted the volume will be re sized.

Shrink a Windows Partition with diskpart

1. To actually make the volume smaller with diskpart, the initial commands are the same.

2. If you use “shrink” on its own is will shrink the drive as much as it can (I cannot think of any situation where you would do this!). So to shrink the volume by 10 GB simply issue a “shrink minimum 10240”. (The figure in in MB).

 

Related Articles, References, Credits, or External Links

Original Article Written 24/01/11

Windows – Adding Unallocated Drive Space “From the left”

KB ID 0000678

Problem

On my Windows Dual boot machine I wanted to give some more drive space to the Windows 8 installation. After shrinking the Windows 7 volume, I found out that I could not extend the Windows 8 partition to take up the free space.

If the unallocated space was on the right of my partition it would have been fine.

Solution

This is a problem with Windows and cannot be done via ‘Disk Management’ or using Diskpart.

1. Download a copy of AOMEI Partition Assistant, and install it.

Step 1 Move the Windows Partition to the left

2. Launch the software, select the partition you want to move> Right click > Move Partition.

3. Click and drag the required partition all the way over to the left > OK.

Step 2 Resize the Partition

4. Now the partition is in the right place, you will want to add the free space > Right click > Resize Partition.

5. This time click and drag the handle on the right hand side of the drive to take up all the fee space > OK.

6. To commit the changes > Apply > OK.

7. You will be prompted to reboot, do so.

8. After the reboot the software will launch and make the partition changes (THIS CAN TAKE A LONG TIME!).

9. When complete press any key to reboot, don’t panic if either Windows Startup Repair launches, or Windows chkdisk runs, just let it do its own thing. When you are back in Windows your partitions should have resized and be in the right place.

Related Articles, References, Credits, or External Links

NA

Dual Booting Windows 8 with Windows 7

KB ID 0000653

Problem

In the next couple of months Windows 8 will go RTM. For those of you with Technet, MSDNor Open Value subscriptions you can already get your hands on it. For anyone not wanting to take the ‘plunge’ and reinstall your OS, you can simply ‘Dual Boot’. Then you can get used to Windows 8 in your own good time. If you suddenly find you need Windows 7 simplify reboot and it will still be there.

Solution

Create a Partition for Windows 8

1. From within Windows 7 > Start > Right Click ‘Computer’ > Manage.

2. Launch Disk Management.

3. This machine has one large C: (System Drive). I’m going to ‘Shrink’ the volume that’s on it to free up room for a Windows 8 Partition, but first I’m going to rename it so we know what it is > Right click > Properties.

4. Call it ‘Windows 7’ > Apply > OK.

5. Now Right click > Shrink Volume.

6. Pick the amount to shrink the volume by, Note: Windows 8 needs 20 GB (Minimum) > Shrink.

7. Once complete, right click the newly created ‘free space’ > New Simple Volume.

8. Accept all the defaults and name the volume ‘Windows 8’.

9. Now we have a partition to install to.

Install Windows 8

10. Note: To install from DVD the computer MUST be set to boot from CD/DVD before it’s hard drive. This is set in the computers BIOS, how this is done varies from model to model.

11. Boot the machine and when prompted press any key to boot from DVD. Select your language options > Next.

12. Enter your Windows 8 unlock code > Next.

13. Accept the EULA > Next.

14. Select CUSTOM.

15. Now you can see why I named the partitions, select Windows 8 > Next.

16. Ignore this for now and let Windows 8 install.

17. It will run setup then reboot.

18. At this point Windows 8 will be the OS that boots by default, you will probably want it to be Windows 7 so select “Change defaults or choose other options”

19. Choose the default operating system.

Note: The ‘Change the timer’ Setting changes the seconds countdown shown at boot, as illustrated in step 27 below.

20. Set it to Windows 7 > Back.

21. Now Select Windows 8 to boot into that OS.

22. Run through the ‘Personalise’ steps.

23. I don’t want to login with a Microsoft account so I’m selecting “Sign in without a Microsoft account” > Next.

24. Local account.

25. Create an account to login with > Finish.

26. There’s Windows 8!

27. When you reboot you can now choose which OS you want to use.

Note: The seconds counter below is set to the default of 30 seconds.

28. If you select nothing Windows 7 will boot by default.

Related Articles, References, Credits, or External Links

Windows 8 Shortcuts

Windows 8 -“Windows cannot read the <ProductKey> setting from the unattend answer file.”

 

ASA Upgrading and Imaging a Hardware CX Module

KB ID 0001025

Problem

Last time I had to do one of these the process was very straight forward, one command and the ASA got its new image from FTP, extracted it, and then installed it.

I had a CX module fail last week, and Cisco shipped me out a replacement. After installing it and running the setup, I needed to upgrade it (it will be managed by PRSM). It was running version 9.0.2 (probably been on the shelf a while!). And every time I tried to run a system upgrade it told me this, (regardless of what version I tried to install).

[box]This package is not applicable to release 9.0.2.[/box]

If I tried to set a boot image in the ASA, I got the following errors;

[box] Module 1 cannot be recovered.

OR

ERROR: Module in slot 1 does not support recovery

[/box]

Well there is a boot image especially for the 5585-X CX module, so how do you use it?

Solution

Remember the ASA-SSP-CX unit is basically the same hardware as the ASA, you need to boot that card to ROMMON, then install the boot image via TFTP. Once that’s loaded you can run setup and install the new software package.

1. As you can see this one’s running a very old OS.

[box] Petes-CX>show version

Cisco ASA CX Platform 9.0.2 (103)

Cisco Prime Security Manager 9.0.2 (103) for Petes-CX firewall

Petes-CX>

[/box]

2. Reload the module and as it starts to boot, send a ‘break’ keystroke.

[box] Petes-CX>system reload
Are you sure you want to reload the system? [N]: y
Broadcast message from root (console) (Mon Jan 19 14:47:09 2015):
The system is going down for reboot NOW!
INIT: SwitchingStopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 3862)
.
Stopping Advanced Configuration and Power Interface daemon: no /usr/sbin/acpid found; none killed
stopping Busybox inetd: inetd… stopped inetd (pid 3875)
done.
Stopping Vixie-cron.
Stopping ntpd: stopped process in pidfile ‘/var/run/ntp.pid’ (pid 3880)
done
Stopping syslogd/klogd: done
Deconfiguring network interfaces… done.
Stopping CGroup Rules Engine Daemon…stopped /usr/sbin/cgrulesengd (pid 3865)

Success
CGRE[3865]: Stopped CGroup Rules Engine Daemon at Mon Jan 19 14:47:13 2015
Stopping cgconfig service: Success
Sending all processes the TERM signal…
Sending all processes the KILL signal…
Unmounting remote filesystems…
Deactivating swap…
Unmounting local filesystems…
umount2: Device or resource busy

——————————————
–Output Removed for the Sake of Brevity–
——————————————

The system is restarting…

CISCO SYSTEMS

Embedded BIOS Version 2.0(13)0 20:40:45 10/21/11

USB storage device found … SMART eUSB USB Device

Total memory : 12 GB

Total number of CPU cores : 8

CPLD revision 0008h
Cisco Systems ROMMON Version (2.0(13)0) #0: Fri Oct 21 20:01:34 CDT 2011

Use BREAK or ESC to interrupt boot.Use SPACE to begin boot immediately.Boot in 10 seconds.

Boot interrupted.

Management0/0
Link is UP
MAC Address: 6c20.5658.928c

Use ? for help.
rommon #0>

[/box]

3. Remember in ROMMON mode you need to set up all the network settings to copy in the boot image (where 192.168.1.10 will be the CX,and .101 is the TFTP server).

Note: This is the BOOT image, it will have a .img file extension.

[box] rommon #0> ADDRESS=192.168.1.10
rommon #1> SERVER=192.168.1.101
rommon #2> GATEWAY=192.168.1.1
rommon #3> IMAGE=asacx-boot-9.3.2.1-9.img
rommon #4> [/box]

4. Make sure you can ping the TFTP server.

[box]rommon #4> ping 192.168.1.101
Sending 20, 100-byte ICMP Echoes to 192.168.1.101, timeout is 4 seconds:
!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (20/20)[/box]

5. Issue a sync command, then start the transfer.

[box]

rommon #5> sync

Updating NVRAM Parameters…

rommon #6> tftp
ROMMON Variable Settings:
ADDRESS=192.168.1.10
SERVER=192.168.1.101
GATEWAY=192.168.1.1
PORT=Management0/0
VLAN=untagged
IMAGE=asacx-boot-9.3.2.1-9.img
CONFIG=
LINKTIMEOUT=20
PKTTIMEOUT=4
RETRY=20

tftp asacx-boot-9.3.2.1-9.img@192.168.1.010 via 192.168.1.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

——————————————
–Output Removed for the Sake of Brevity–
——————————————

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Received 65605385 bytes

Launching TFTP Image…

Execute image at 0x14000
[STUB]
Boot protocol version 0x209

——————————————
–Output Removed for the Sake of Brevity–
——————————————

Starting syslogd/klogd: done
Cisco ASA CX Boot Image 9.3.2.1

Petes-CX login: admin
Password: ************

Cisco ASA CX Boot 9.3.2.1 (9)
Type ? for list of commands
Petes-CX-boot>

[/box]

WARNING the following procedure will erase all the settings from your CX module

6. Partition the CX module drive. (This takes a long time, good time to put the kettle on!)

[box]

Petes-CX-boot>partition
WARNING: You are about to erase all policy configurations and data.
You cannot undo this action.
Are you sure you want to proceed? [y/n]:y
Logical volume “data” successfully removed
Logical volume “var” successfully removed
Logical volume “packages” successfully removed

——————————————
–Output Removed for the Sake of Brevity–
——————————————

Persistent partition is there so create symbolic link /etc/ntp.conf
Persistent partition is there so create symbolic link /etc/hosts
Petes-CX-boot>

[/box]

7. Run the basic setup.

[box]

Petes-CX-boot>setup

Welcome to Cisco Prime Security Manager Setup
[hit Ctrl-C to abort]
Default values are inside []

Enter a hostname [asacx]: Petes-CX
Do you want to configure IPv4 address on management interface?(y/n) [Y]: Y
Do you want to enable DHCP for IPv4 address assignment on management interface?(y/n) [N]: N
Enter an IPv4 address [192.168.8.8]: 192.168.1.10
Enter the netmask [255.255.255.0]: 255.255.255.0
Enter the gateway [192.168.8.1]: 192.168.1.1
Do you want to configure static IPv6 address on management interface?(y/n) [N]: N
Stateless autoconfiguration will be enabled for IPv6 addresses.
Enter the primary DNS server IP address: 192.168.1.20
Do you want to configure Secondary DNS Server? (y/n) [n]: Y
Enter the secondary DNS server IP address: 192.168.1.21
Do you want to configure Local Domain Name? (y/n) [n]: Y
Enter the local domain name: petenetlive.com
Do you want to configure Search domains? (y/n) [n]: Y
Enter the comma separated list for search domains: petenetlive.com
Do you want to enable the NTP service? [Y]: Y
Enter the NTP servers separated by commas: 192.168.1.31,192.168.1.32
Do you want to enable the NTP symmetric key authentication? [N]: N
Please review the final configuration:
Hostname:Petes-CX
Management Interface Configuration

IPv4 Configuration:static
IP Address:192.168.1.10
Netmask:255.255.255.0
Gateway:192.168.1.1

IPv6 Configuration:Stateless autoconfiguration

DNS Configuration:
Domain:petenetlive.com
Search:
petenetlive.com
DNS Server:
192.168.1.20
192.168.1.21

NTP configuration:
192.168.1.31,192.168.1.32
CAUTION:
You have selected IPv6 stateless autoconfiguration, which assigns a global address based on network prefix and a device identifier. Although this address is unlikely to change, if it does change, the system will stop functioning correctly.
We suggest you use static addressing instead.

Apply the changes?(y,n) [Y]: Y
Configuration saved successfully!
Applying…
Restarting network services…
Restarting NTP service…
Done.
Press ENTER to continue…
Petes-CX-boot>

[/box]

8. You can now upgrade the CX module from FTP.

Note: This is the SYSTEM image, it will have a .pkg extension.

[box]

Petes-CX-boot>system install ftp://192.168.1.101/asacx-sys-9.3.2.1-9.pkg
Verifying..
Downloading..
Extracting..
Package Detail
Description:Cisco ASA-CX 9.3.2.1-9 System Upgrade
Requires reboot:Yes

Do you want to continue with upgrade? [y]: y

Warning: Please do not interrupt the process or turn off the system.
Doing so might leave system in unusable state.

Upgrading..
Starting upgrade process ..
Populating new system image..
Copying over new application components..
Cleaning up old application components..
Reboot is required to complete the upgrade. Press ‘Enter’ to reboot the system.

PRESS ENTER

Broadcast message from root (consoStopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 2883)

[/box]

9. After the module has reloaded, log in and make sure every thing is working.

[box]

Petes-CX login: admin
Password:***********


    Cisco Prime Security Manager 9.3.2.1 (9) for Petes-CX firewall
  Type ? for list of commands

Petes-CX>show services status
============================================================
Process           | PID   | Up    | Up Time
============================================================
HTTP Server       | 6139  | True  | 00:02:00
Data Plane        | 6665  | True  | 00:01:35
Opdata Helper     | 6299  | True  | 00:01:59
AD Interface      | 6674  | True  | 00:01:35
HW Regex Server   | 6572  | True  | 00:01:43
Message Nameserver| 6279  | True  | 00:01:59
HTTP Auth Daemon  | 6469  | True  | 00:01:57
Management Plane  | 6481  | True  | 00:01:57
signup            | 6347  | True  | 00:01:59
PDTS              | 6442  | True  | 00:01:59
Predictive Defense| 6679  | True  | 00:01:35
HTTP Inspector    | 6689  | True  | 00:01:35
HPM Monitor       | 6684  | True  | 00:01:35
Updater           | 7772  | True  | 00:00:19
Card Manager      | 6071  | True  | 00:02:00
ARP Daemon        | 6458  | True  | 00:01:58
Event Server      | 6512  | True  | 00:01:52
TLS Proxy         | 6719  | True  | 00:01:35
============================================================
Petes-CX>

[/box]

 

Related Articles, References, Credits, or External Links

Special thanks to Veronika Klauzova from Cisco TAC