dual boot – rEFInd broke macOS after removing the partition

I have a problem, help if you can …

I wanted to install Linux, what I did is, I installed rEFInd then I installed Linux on a separate partition of 21 GB. Now I wanted to delete it, so I deleted the Linux partition in Disk Utility. After a reboot, the message "error: no such partition" was received. I have followed several tutorials to find out how to restore it like this one.

However, that did not change anything. After pressing alt on startup, I do not have a boot drive to select, neither Linux nor MacOS.

Then I came across forums suggesting to do fdisk -u /dev/disk0 in the recovery mode terminal. I tried it and I had the following error:

fdisk could not open mbr file /usr/standalone/i386/boot0 no such file or directory

It seems that my partitioning table is messed up. I have also found this. While I was able to run fdisk -e /dev/disk0, I could not find the Partition Inspector because I can not boot to MacOS or Linux.

I should also mention that I use MacOS Catalina (official version), which could have caused problems.

If someone has a clue, that would be really useful …

If I delete all partitions when installing Ubuntu and create an efi partition, will I need to update the firmware?

I install Ubuntu 19.04 on a laptop (it is equipped with an SSD drive) supplied with Free DOS preinstalled. I put the BIOS at boot as uefi and I will delete all the current partitions and create efi (with boot flag), root and home. Is everything ok or, I will have to update the firmware. Thank you in advance.

algorithms – greedy heuristic with modified subset / sum partition problem

Suppose we have a constant time function that accepts a set of integers. The function returns True if we can split the integers into two subsets of an equal sum. If we can not partition the given integers, the function generates False.

Suppose we can use this function at any time, with any set of integers. Can we make a greedy algorithm using this function that will produce one of the specific subsets that total half of a particular positive whole set?

The heart of the matter:
If we know at any time the boolean result of canPartition () on a set of integers, can we use it avidly to display the specific values ​​of a partition?

visualization – Generating ensemble partition diagrams

I recently came across a very nice illustration of game scores on wikipedia (Partition of a game article)

I need something similar but suited to my case (I need game scores of 4, but use different styles for the balls two and down), someone who was there a good start code for this?

enter the description of the image here

partitioning – How to add unallocated space to an encrypted partition (with Gparted help)

Sorry if it's a duplicate, but I think I have not seen this exact situation on askubuntu yet. I have an encrypted partition on a VPS running Ubuntu 18.04 that I would like to enlarge. I also have an unallocated space. However, using Gparted, I can not resize the partition. What can I do to solve this problem?


enter the description of the image here

Amazon Web Services – How do I know which partition / volume corresponds to which EBS volume?

On an EC2 instance, I have some partitions that look like these:

/dev/nvme1n1     15G   48M   15G   1% /data/mongo2
/dev/nvme2n1     15G  4.7G   11G  32% /data/docker
/dev/nvme3n1     15G  3.4G   12G  23% /data/mongo

And then the corresponding EBS volumes, one of which looks like this:

enter the description of the image here

I'm trying to determine the mounts that correspond to the EBS volumes. Previously, the "attachment information" matched or was similar to the device, but this does not seem to be the case with nve anymore.

Is there a way to match them and follow the mountains myself? Thank you

algorithms – partition of binary strings

You receive a binary string of 0 and 1.

Your task is to calculate the number of ways to partition a string by satisfying the following constraints:

  1. The length of each partition must be in non-descending format. Therefore,
    the length of the previous partition must be less than or equal to the
    length of the current partition.

  2. The number of bits defined in each partition must be in non-decreasing format.
    Therefore, the number of 1 available in the previous partition
    must be less than or equal to the number of 1 available in the
    current score.

  3. There should be no leading zeros in each partition.

string = 101110
The three valid partitions are 101110, 10 | 1110, 101 | 110.

Note: The number of 0 does not need to be in descending order

// I want to know how to deal with this type of problem.

I've tried bruteforce methods by running loop for 2 groups, 3 groups, and so on. But

they take a lot of time.//

I want to calculate it in achievable time.

please: try to explain the methods and suggestions in simpler terms.

algorithms – How to partition unpleasant people into compatible groups

We have a number of people who need to be divided into groups, but some people may hate other people. Divide people into a minimum number of groups, so no one is grouped with someone they do not like. (If A does not like B, then A can not be in a group with B. Each person must belong to one group.)

Incompatibilities between people are explicitly given as pairs of unordered people who can not be in a group.

Consider a possible scenario involving 10 people where the incompatibility pairs are given as follows:

(1,2) (1,6) (1,7) (2,3) (2,6) (2,7) (2,8) (3,4) (3,7) (3,8) (3,9)
(4,5) (4,8) (4,9) (4,10) (5,9) (5,10) (6,7) (7,8) (8,9) (9,10)

In this scenario, it is unacceptable to form a group made up of people (1, 4, 5) because of the incompatibility couple (4,5), which means that people 4 and 5 are incompatible and can not not belong to the same group.

For the scenario presented above, we can divide people optimally into groups that all hear, using no less than 4 groups. Here is a way to organize people into 4 groups.

GROUP #1 : ( 1, 3, 5 )
GROUP #2 : ( 2, 4 )
GROUP #3 : ( 6, 8, 10 )
GROUP #4 : ( 7, 9 )

Note that groups do not necessarily have the same number of members and that it is acceptable to have a group consisting of only one individual if necessary. But each person must be assigned to a group.

Describe an algorithm from an arbitrary incompatibility matrix among N people in the form of zero or more pairs of incompatibilities to determine a compatible group using as few groups as possible.

partition – container disk1 – Ask Different

I know how I did that and it was a big mistake on my part. So, how can I recover that? I've included a terminal image.
/ dev / disk0 (internal, physical):
0: GUID_partition_scheme * 1.0 To disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 1000.0 GB disk0s2

/ dev / disk1 (synthesized):
0: APFS container schema – +1000.0 GB disk1
Physical store disk0s2
1: Untitled APFS Volume 394.7 GB disk1s1
2: APFS volume pre-boot 20.7 MB disk1s2
3: APFS Volume Recovery 516.7 MB disk1s3
4: APFS VM Volume 8.6 GB disk1s4

dual boot – The safest option to resize / home and merge the freed space with the existing free space to form a shared partition

Ubuntu 18.04.2 is installed in dual boot mode with Windows 10, and here is the current configuration of my partition.

What I would like to do is install Ubuntu 18.04.4 again by resizing my / home partition to, for example, 4 GB (is this a reasonable size? I do not plan to store any files bulky such as audio / video files) and then combining the freed space with the currently unallocated 2.36 GB to create a shared NTFS partition.

What is my best action plan (the safest)? Should I perform the resizing and partition creation steps before installing Ubuntu 18.04.4? I think I can do it by starting with a USB key gparted. Then I could just install 18.0.4 on the / existing partition while formatting it as well as the newly resized / home partition. Is this the right way to do it?

Or will I have the opportunity to make these changes at the time of installation of the operating system? I did not click beyond this screen during the installation process and I do not know if the above will be an option.