unix – Dual boot Mac with Ubuntu using rEFInd – removed Ubuntu by deleting partition and now Mac won’t boot

I had installed Ubuntu on Mac with rEFInd dual boot. I was able to use it until I thought to remove the Ubuntu.

I deleted the Ubuntu Partition from drive, and then thought it will just remove Ubuntu OS.

Since I was using rEFInd for dual boot, it cannot find the Mac drive and since Ubuntu also gone, I don’t have an OS on my Mac and I might loose my data.


Below are the screenshots:

enter image description here

enter image description here

enter image description here

I tried following the above link and booted Mac by installing it on Flash drive.

After verifying, I’m getting below error now:

enter image description here

Any help would be appreciated.

Especially from:

How to write a when condition when a partition exists in ansible playbook

I’m trying to write to task when /var partition exists. I used assert variable

  • name: Apply patch if /var exist and > 300MB
    name: ‘*’
    state: latest
    loop: "{{ ansible_mounts }}"
    when: item.mount == "/var" and item.size_available > 300000000

It should fail or skip if /var does not exist. Which is not happening. Please suggest how to skip if /var does not exist

there is a way to resize android_expand partition in the sd

My S7edge whit LineageOS have a 64 Gb SD But sadly this one start to fail and time to time app restart or even crash i would like to chaining it to an other 64 SD but it happens whit dd if=my/SD of=/to/new/sd to get insufficient space left and the partition get corrupted it have to be just a few megs since from SD to SD the space can be lightly different right ? then I need something to resize the original SD android_expand partition to then copy it to the new SD I’m using linux but the way !

windows – How do I switch my boot partition to a system partition

I have installed Windows 10 on an SSD drive but for some reason the boot partition was on another drive and now when I try to remove that other drive from the computer as expected the system won’t load.

I have tried making the partition active with DISKPART and after that I tried to repair the boot sector with Windows installation DVD but that didn’t help (Windows said they could not repair the startup). Then I tried BCDBOOT to make the system partition bootable but that didn’t seem to work either. I know I can always reinstall Windows and fix the problem but I’d rather try and keep existing partitioning and spare myself of a long and tedious job of reinstalling windows and forgetting to install something I should have.

What I did with BCDBOOT: I boot into command prompt from my windows DVD. The boot partition is labeled C: and the system partition is labeled D:. When I used bcdboot I used it like bcdboot d:Windows /s c: and it did not report any errors but still when I remove the other disk computer refuses to boot.

Any help is welcome no matter how trivial it may sound. I am obviously missing something here.



GPU Partition with Hyper-V on Server 2019

A bit of a back story, my county is doing digital learning for the upcoming school year. My kids (3 of them) will all be doing digital learning at home, so they will need a computer. I don’t trust my kids on a computer (they’re 7 and under) to use it without breaking it (physical or software speaking). So, I got a used Dell R720 with Dual Xeon E5-2660, 128GB DDR3 ECC RAM, 2x1TB SSD (RAID 1). My thought was to set up thin clients for the kids so that they could connect to a VM on this recently acquired server. I got everything configured with Windows Remote Desktop Services, got them an AiO Wyse Thin Client and everything works! Part of their schooling will be playing some little web-based games, Zoom Calls, watching online videos, etc. Nothing crazy, so I’ve been testing everything out. I’ve gotten the USB Redirection working so their web cameras, keyboard, mouse, headphones, etc. all work. I tested Zoom calls and it seems passable. However, when I tried playing some video content, it was a little jittery. This was less than ideal.

So, I did some research and found RemoteFX. I had a modular power supply laying around, and it just so happens that the PCI-E cable fits on to the riser card on the Dell R720. So, I installed a NVidia GTX 1060 on there and installed the drivers. It worked! (Keep this in mind as I’ve also tried all of these steps with an AMD RX 580 with the same results)

I enabled the RemoteFX adapter on the VMs via PowerShell. I also allocated 1024MB of Video Memory to each of the 3 virtual machines and then booted them. I did have to do some group policy junk to get everything working properly, (one that specially comes to mind is the WDDM disabling) but afterwards, it worked! The VM sees the RemoteFX Graphics Adapter and testing out the VM in RDP and on the Thin Client with a game (angry birds), I immediately noticed ~25% better performance of the game. However, I then tried playing a 1080p video on youtube and the results were significantly worse than with the default graphics adapter. So, this route seems like a bust. I also then read that this method will soon be disabled with an upcoming patch due to some security vulnerabilities.

My second attempt and thought would be to purchase 3 single slot width junky video cards that I could then directly assign to each virtual machine. It’s not ideal, but if it would solve my main issue of video playback, then it would be worth it. So, I tried this again with both graphics cards. Each time starting the VM, it said that the device was in use by another VM. I suppose that it is important to note that I do not have anything plugged into the display output ports on the GPU, just the onboard graphics adapter.

Start-VM : 'kids1' failed to start.
Virtual Pci Express Port (Instance ID 861E008E-F6E8-457B-97E3-6BC24156D6E1): Failed to Power on with Error 'Element not found.'.
'kids1' failed to start. (Virtual machine ID 2983DA7A-A4F6-48E9-80AE-F13FCDD06C2E)
'kids1' Virtual Pci Express Port (Instance ID 861E008E-F6E8-457B-97E3-6BC24156D6E1): Failed to Power on with Error 'Element not found.' (0x80070490). (Virtual machine ID 2983DA7A-A4F6-48E9-80AE-F13FCDD06C2E)
Could not allocate the PCI Express device with the Plug and Play Device Instance path 'PCIPVEN_1002&DEV_67DF&SUBSYS_2378148C&REV_E74&310D03E2&0&0010' because it is already in use by another VM.
At line:1 char:1
+ Start-VM $vm
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) (Start-VM), VirtualizationException
    + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.StartVM

So, the other option I came across, and to the point of this whole thread, is GPU Partitioning. Keep in mind that I’ve tried this with both of my graphics cards; the 1060 and the RX 580. So, I ran Get-VMPartitionableGpu to see if anything was listed. And I got one result. From what I understand, this means that my graphics card is capable of GPU Partitioning.

Name                    : \?PCI#VEN_1002&DEV_67DF&SUBSYS_2378148C&REV_E7#4&310d03e2&0&0010#{064092b3-625e-43bf-9eb5-dc845897dd59}GPUPARAV
ValidPartitionCounts    : {32}
PartitionCount          : 32
TotalVRAM               : 1000000000
AvailableVRAM           : 1000000000
MinPartitionVRAM        : 0
MaxPartitionVRAM        : 1000000000
OptimalPartitionVRAM    : 1000000000
TotalEncode             : 18446744073709551615
AvailableEncode         : 18446744073709551615
MinPartitionEncode      : 0
MaxPartitionEncode      : 18446744073709551615
OptimalPartitionEncode  : 18446744073709551615
TotalDecode             : 1000000000
AvailableDecode         : 1000000000
MinPartitionDecode      : 0
MaxPartitionDecode      : 1000000000
OptimalPartitionDecode  : 1000000000
TotalCompute            : 1000000000
AvailableCompute        : 1000000000
MinPartitionCompute     : 0
MaxPartitionCompute     : 1000000000
OptimalPartitionCompute : 1000000000
CimSession              : CimSession: .
ComputerName            : KIRDS
IsDeleted               : False

So, I then try to apply it to one of the virtual machines and tried a few different options.

$vm = "kids1"
$gpup = Get-VMPartitionableGpu
Remove-VMGpuPartitionAdapter -VMName $vm
Set-VMPartitionableGpu -Name $gpup.Name -PartitionCount 1
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 3GB -VMName $vm
Set-VM -HighMemoryMappedIoSpace 32GB -VMName $vm
Add-VMGpuPartitionAdapter -VMName $vm
Start-VM -Name $vm

And I also tried…

$vm = "kids1"
Remove-VMGpuPartitionAdapter -VMName $vm
Add-VMGpuPartitionAdapter -VMName $vm
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionVRAM 11
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionVRAM 10
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionEncode 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionEncode 11
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionEncode 10
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionDecode 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionDecode 11
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionDecode 10
Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionCompute 1
Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionCompute 11
Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionCompute 10
Set-VM -GuestControlledCacheTypes $true -VMName $vm
Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm
Set-VM –HighMemoryMappedIoSpace 32GB –VMName $vm
Start-VM -Name $vm

However, the virtual machine would then not boot. I tried booting it within Hyper-V and still had the same error below.

Start-VM : 'kids1' failed to start.
GPU Partition (Instance ID 5DAF5FF5-F91A-4E94-A276-00244C4EC8A3): Failed to Power on with Error 'Insufficient system resources exist to complete the requested service.'.
'kids1' failed to start. (Virtual machine ID 4FBA092F-E711-48C8-BB28-47363D8FB03F)
'kids1' GPU Partition (Instance ID 5DAF5FF5-F91A-4E94-A276-00244C4EC8A3): Failed to Power on with Error 'Insufficient system resources exist to complete the requested service.' (0x800705AA). (Virtual machine ID 4FBA092F-E711-48C8-BB28-47363D8FB03F)
At line:1 char:1
+ Start-VM -Name $vm
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) (Start-VM), VirtualizationException
    + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.StartVM

I am hoping to get smooth video playback. That’s my main goal and what I would like to achieve. Is there anything else I could try? Do I need a different graphics card like a NVidia GRID? Thanks in advanced!

Some resources for the commands that I found on RemoteFX and GPU Partitioning

HyperV “GPU RemoteFX 3D Video adapter” gone in Windows 2019 Hyper V


bitlocker – Why Windows 10 always automatically encrypt the C: partition and other partition?

Every time when I reinstall Windows 10, it keeps encrypting all of my partitions. Not only the C: partition, but also my other partition. It’s keeps annoying me because if I have to recovering my file but my OS can’t boot up then I have to find the recovery key of my C partition. So why Windows 10 always automatically encrypt my C: partition and other partition? Also, is there a way to stop this from happening right at the installer itself?

macos – Mac fails to boot – Partition map check failed because no slices were found on main drive

So my girlfriend’s Mac Pro (Mid 2012, Catalina, SANDISK Ultra 3D SSD 512GB as boot drive) suddenly gave in today. On boot it would only display the directory symbol with a question mark within.

Rebooted in recovery mode, diskutils told me the disk had to be repaired, but repair would fail with “Partition map check failed because no slices were found”.

Some googling later stuff like this How to fix broken GPT, GUID and unmountable, no type volumes? and Apple forum: disk0s2 can’t mount – Partition shows as “MBR part 255” pointed me to gpt and fdisk.

gpt output:

-bash-3.2# gpt -r show /dev/disk0
     start      size index contents
         0         1       PMBR
         1         1       Pri GPT Header
         2        32       Pri GPT Table
        34    409606
    409640 999805536     1 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
1000215176         7  
1000215183        32       Sec GPT table
1000215215         1       Sec GPT header

fdsk output:

-bash-3.2# fdsk /dev/disk0
Disk: /dev/disk0 geometry: 62260/255/63 (1000215216 sectors)
Signature: 0xAA55

#: id  cyl  hd sec -  cyl  hd sec ( start -       size)
1: EE 1023 255  63 - 1023 255  63 (     1 - 1000215215) <Unknown ID>
2: 00    0   0   0 -    0   0   0 (     0 -          0) unused
3: 00    0   0   0 -    0   0   0 (     0 -          0) unused
4: 00    0   0   0 -    0   0   0 (     0 -          0) unused

Comparing my gpt output with others I noticed the first partition (start at 40, length of 4090600, probably the partition table?) is missing. So I followed aforementioned links and tried destroying and re-adding the existing part, followed by diskutil:

gpt destroy disk0
gpt add -i 2 -b 409640 -s 999805536 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0
diskutil repairDisk disk0

Which only changed the directory symbol with question mark on startup to a stop sign (did I do a whoopsie?).

Afterwards I tried adding the first partition as well:

gpt destroy disk0
gpt add -i 1 -b 40 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk0
gpt add -i 2 -b 409640 -s 999805536 -t 7C3457EF-0000-11AA-AA11-00306543ECAC /dev/disk0
with and without: diskutil repairDisk disk0

But same result. Now I’m out of ideas. Anyone got some?

high sierra – After Disk Utility crashing while adding a new partition, main APFS container (macOS + user data) became unbootable

I’m running macOS High Sierra on early-2015 Macbook Pro.

I used to have two more partitions: one with Bootcamp, and the other one as a shared FAT32 folder.

As far as I remember, at some point I made the mistake of using something other than Disk Utility to manage my partitions. I messed up GUIDs but I fixed them manually later, and deleted the bootcamp drive.

I tried formatting the FAT32 drive as APFS and Disk Utility crashed and I ended up with the small “VM”-named drive (I named it that way, and it was intended to be around 25GB). While I was running with no problems afterwards, after a reboot my main APFS drive (Macintosh HD, 387GB) no longer boots. (and does not show up on the boot menu) and shows up as unformatted on all disk tools I could test. (doesn’t show up on DiskUtil at all). I have tried changing the GUID but it still doesn’t boot.

I currently don’t have a Linux stick, but I’ll create one if you need more info. (and if the solution requires one)

overview disk partition

PS: I’m very sorry for the image quality and size, but I don’t have my computer at hand to fix them.

linux – Deleted Ubuntu Partition, now stuck

I am a new Linux user. I started a few weeks ago with Ubuntu and have been teaching myself.

I have Windows 10 and then dual booted Ubuntu. I wanted to increase the size of the Ubuntu partition so booted from a USB and used gparted. I couldn’t seem to increase the size of the Ubuntu partition so thought I would just delete it and reinstall it, starting again and giving it more space.

So after deleting the Ubuntu partition in gparted I restarted the PC, with the USB drive in to reinstall ubuntu from scratch. But the menu never appeared and instead it’s gone straight to grub rescue>.

After using the ls command it displays (hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

I just want to get Ubuntu up and running again. Any help would be most appreciated. As I say I am very new to Linux, I just passed the LPI Essentials exam and wanted to experiment so am seeing this all as a learning curve.

Thanks very much for your time,

boot – EFI System Partition (ESP) Not Usable After Hackintosh Attempt

I recently installed Hackintosh onto my drive which I share with my Ubuntu and Windows Operating Systems. After that, I tried to move the opencore bootloader onto my pc. I used the mountEFI application on mac to move EFI to my hackintosh partition. I then turned off my computer and tried to boot onto ubuntu to no success. When I go into recovery mode and run terminal, I try sudo mount /boot/efi. This returns mount: /boot/efi: can't find UUID=02AC-AD51 How do I restore things back to how they were? I want to keep MacOS on my drive but will be willing to leave the bootloader on the USB.