Showing posts with label Windows OS. Show all posts
Showing posts with label Windows OS. Show all posts

Tuesday, July 23, 2024

Extend the C drive for Windows Server 2022 if Recovery partition blocks

When you try to extend unallocated space of C drive of Windows 2022 Virtual Machine (VM), Recovery partition will lie between both C and unallocated space and it blocks the extend of the drive.

So please follow the below steps to fix it.

 1. Check backup status of the server. If we don't have backup take full backup

2. Disable the recovery Partition using below command

Note: Please make sure you are not disabling recovery partion if we didn't disable it we can't able to re-create recovery partition after disk expansion

3.Open command prompt with elevation mode.
C:\Windows\system32>reagentc /disable
C:\Windows\system32>reagentc /info


4. Backup the files which is in the Folder "C:\Windows\System32\Recovery" 
Note: Check show hidden files and uncheck the hide protected Operating system files option to view the folder /files

5. Go to diskpart in command prompt
Diskpart> lis dis ( It will list the disks)

Note down whether disk is GPT or MBR.


Diskpart> Sel dis 0 (It will select the disk 0)
Diskpart> lis par ( It will show the partitions available on disk)

Note down the size of the recovery partition in my device it is 600MB)

Diskpart> Sel par 3 (Here select which disk (Recovery disk) you want change id)
Diskpart> delete partition override

6. Extend the unlocated partition without drive letter
7. After deleting recovery partition expand the drive with free space keeping 600 MB space for recovery partition
8. After expanding drive with free space we need to re-create recovery partition in 600 MB space, Right click unallocated volume and create new simple volume without assigning drive letter (Format : NTFS, Volume label : System reserved )
9 . MBR partition table has id's integer (ID should be 27)
Diskpart> det par ( It will show the details of partition)

Diskpart> lis dis ( It will list the disks)
Diskpart> Sel dis 0 ( It will select the disk 0)
Diskpart> Sel par 3 ( Here select which disk (Recovery disk) you want change id)
Diskpart> set id=27 ( It will change Type to 27) //Note : if the disk format is GPT, SET ID=de94bba4-06d1-4d40-a16a-bfd50179d6ac
Diskpart> det par ( it will show the details of the Partition now type should be 27)
Diskpart> Exit

10. Check if backed up files are available in "C:\Windows\System32\Recovery" if not restore it.

11. Enable the recovery Partition using below command

C:\Windows\system32>reagentc /enable (It will enable the recovery Partition)

12. Open view files and uncheck show hidden files and check the hide protected Operating system files and click OK.

Friday, July 1, 2022

Fixing the Windows Booting Issue (MBR) - An operating system wasn’t found. Try disconnecting any drives that don’t contain an operating.

 Error:

When I reboot a server after long back, I got below error and tried to restore from Veeam server and restore server also got same error.

An operating system wasn’t found. Try disconnecting any drives that don’t contain an operating.

Press Ctrl+Alt+Del to restart




 

Causes:

This error is caused by various reasons, the most common causes are as below

1. HDD with the installed OS is not connected

2. Corrupted boot configuration data (BCD)

3. Damaged system partition, missing or damaged MBR (master boot record), no active partition (or an incorrect disk partition is marked as active)

Solution1: No active partition

Attach the ISO file and go to the Repair option

Then, click Repair your computer


Then, click on "Troubleshoot" > "Advanced options" > Open Command Prompt
Now we are going to point the partition which contains the System Boot Files.
We will use the Diskpart command
User below CMDs to make the windows partition active (BIOS transfers control to the OS bootloader on the active MBR partition). 
  • diskpart
  • list disk
  • sel disk 0
  • list vol
  • select volume 2
  • active
  • assign
  • exit
Note: Assign command is optional here. We can use assign cmd, if the active command does not throw and output.


Restart your computer then windows will load successfully. If this did not resolve the issue and go for Solution2


Solution2: Repair the Windows Bootloader on the MBR

First, we need detect the type of the partition table on the disk: GPT or MBR. The method for restoring the Windows bootloader depends on it.

Identify Disk Partition Table & Windows Partition:
Attach the ISO file and go to Repair option. Open command Prompt
Run the below commands
  • diskpart
  • list disk


If there is an asterisk (*) in the Gpt column for the disk, then the GPT partition table is used, otherwise it is MBR.

In our case it is MBR

Repair the Windows Bootloader on the MBR Disk:

Create bootloader configuration files on the system drive (C: drive)

BCD = Boot Configuration Data

bcdboot C:\Windows /S C:
The "Boot files successfully created" message will appear.

Re-create a Master Boot Record (MBR):

Run the following commands for recreating the MBR
  • Rename the existing BCD store by running ren c:\boot\bcd bcd.old
  • bootrec.exe /FixMbr
  • bootrec.exe /FixBoot -> Mostly we will get "Access Denied" but its fine
  • bootrec.exe /RebuildBcd --> (The bootrec command will search for Windows installations not included in the BCD and then ask you if you would like to add one or more to it)


Enter Y or Yes to the Add installation to boot list
Now exit and enter in to OS again.


Gratitude section:

This issue was fixed by one of my colleague Balumahendran Chinna Muniyandi, also helped for writing this KB.







Monday, February 14, 2022

Error 0xC1900101 – 0x20017, The installation failed in SAFE_OS phase with an error during BOOT operation

We  had a request from customer that, upgrade their server from Windows 2012 R2 to 2019 (in place upgrade) and we were facing this below error when performing OS upgrade.  


The installation failed in the Safe_OS phase with an error during boot operation. Error Code: 0xC1900101 (This indicates an issue in driver package)

We found that issue is caused y windows driver packages and tried online toturial and unable to fix this issue and finally fixed the issue using below stuffs,

 --

To check which driver caused the issue, we checked in the CompatData.xml file present under the path "C:\Windows\Panther".

 In this file, in the DriverPackages section, we can see the driver which is blocking the upgrade. We need to check the BlockMigration entry whether it is either True or False.


If the values are, 

True = Indicates the problematic driver

False = No issues.

---

For example,

<DriverPAckage Inf="oem0.inf" BlockMigration="True" HasSignedBinaries="False" />

<DriverPAckage Inf="oem6.inf" BlockMigration="True" HasSignedBinaries="False" />

 


To get the driver's name, run the below command in CMD Prompt as elevated permission,

 

dism /Online /get-drivers /format:table


 
and go to "C:\Windows\INF" open the respective INF file to get the name of the exact faulty drivers.

 (in our server we found the below drivers are faulty)

For example, we found below from oem6.inf



1) oem0.inf = prnms001.inf (The Microsoft XPS Document Writer)

2) oem6.inf = vm3d.inf (VMware SVGA 3D)

 

To fix the issue we can try the following.

 

1) Remove Microsoft XPS Document Writer in the printer section.

2) Disable VMware SVGA 3D driver (Do not uninstall, we may receive black screen, cause this is the display related drivers)

Once performing the above fix, restart the server and initiate the upgrade again.

Note:

After the upgrade, both the drivers SVGA driver and Microsoft XPS document writer gets enabled automatically.


Gratitude section:

This issue was identified and fixed by one of my colleague Balumahendran Chinna Muniyandi. Thanks for his help to writing this article.

Email sent from a shared mailbox are not saved to the Sent Items

  Issue : When a user sends an Email from his delegated (shared) mailbox the Email which sent from the delegated mailbox are stored in user...