disk utility – Can’t reclaim empty space on main macOS partition [macOS Mojave]

A while ago I made a linux partition on my MBP (2017), but it didn’t work so well so I needed to delete the partition. After a lot of trouble trying to delete it, I found this answer; I used the second part to free the space on the old linux partition, and then I resized it to 0. Only, it didn’t actually resize. The partition is still there (though it is no longer showing up in Disk Utility):

$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         500.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         276.5 GB   disk0s2
   3:                        EFI NO NAME                 629.1 MB   disk0s3

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +276.5 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            246.9 GB   disk1s1
   2:                APFS Volume Preboot                 45.9 MB    disk1s2
   3:                APFS Volume Recovery                510.8 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4

I think it is this line that is the culprit, though I am not sure:

   2:                 Apple_APFS Container disk1         276.5 GB   disk0s2

As I say, I have run

diskutil apfs resizeContainer disk0s2 0

As per the linked answer, but nothing changed. Even in recovery mode, Disk Utility will only show the ~277 GB I have available on the main partition.

How can I reclaim this space, which is no longer actually showing up?


P.S., this is what I had before I ran those commands:

$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         500.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         276.5 GB   disk0s2
   3:                        EFI NO NAME                 629.1 MB   disk0s3
   4:                  Apple_HFS Untitled                222.7 GB   disk0s4
   5:                 Apple_Boot Boot OS X               134.2 MB   disk0s5

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +276.5 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            249.7 GB   disk1s1
   2:                APFS Volume Preboot                 45.9 MB    disk1s2
   3:                APFS Volume Recovery                510.8 MB   disk1s3
   4:                APFS Volume VM                      6.4 GB     disk1s4

/dev/disk3 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            NO NAME                +10.7 GB    disk3

NO NAME was just a USB drive, by the way.

hard drive – ExFat usb hdd do not appear in disk utility or in /dev/disk*

I have to MacBooks (both on 10.15.7):

  1. MacBook Air 2015 year
  2. MackBook Pro 2018 year

And two HDD drivers:

  1. ExFat
  2. Mac Journaled

And Mac Journaled works perfectly with both MacBooks(which means that USB ports working fine on Air). However, ExFat one can only be seen on Pro (Which means that ExFat drive is not corrupted)

When I plug ExFat into Air — nothing happens. I can’t see it in /dev/disk* and in Disk utility. But disk is working (led is on and it is vibrating)
I tried restarting and resetting NVRAM it hasn’t helped

Can someone suggest a possible solution, please?

json – Command line utility for user data migration from MUBI.com to letterboxd.com

Please make code review for command line utility for user data migration from MUBI.com to letterboxd.com.
Utility makes Get HTTP request downloads json-data, parses it and saves as CSV-file.

Can be found at github

// mubi2letterboxd is a simple command line utility for user data migration from MUBI to letterboxd.
// With the utility, you can create a .csv file suitable for manual import to Letterboxd.
//
// inspired by the reddit entry by jcunews1
// https://www.reddit.com/r/learnjavascript/comments/auwynr/export_mubi_data/ehcx2zf/

package main

import (
    "bufio"
    "encoding/csv"
    "encoding/json"
    "errors"
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
    "os"
    "path/filepath"
    "strconv"
    "strings"
    "time"
)

type MovieRecord struct {
    Id        int    `json:"id"`
    Review    string `json:"body"`
    WatchedAt int64  `json:"updated_at"`
    Rating    int    `json:"overall"`
    Film      struct {
        Title     string `json:"title"`
        Year      int    `json:"year"`
        Directors ()struct {
            Name string `json:"name"`
        } `json:"directors"`
    } `json:"film"`
}

const (
    url                   = "https://mubi.com/services/api/ratings"
    perPage               = "1000"
    letterboxdCsvFileName = "letterboxd.csv"
)

func main() {
    fmt.Print("Input MUBI userID and press Enter: ")
    var mubiUserId string
    if _, err := fmt.Scanf("%s", &mubiUserId); err == nil {
        if _, err := strconv.ParseUint(mubiUserId, 10, 64); err == nil {
            if err := process(mubiUserId); err != nil {
                fmt.Fprintf(os.Stderr, "Error occurred: %sn", err)
            }
        } else {
            fmt.Fprintf(os.Stderr,"%q is not a valid UserIdn", mubiUserId)
        }
    } else {
        fmt.Fprintf(os.Stderr, "Error reading UserID: %sn", err)
    }

    fmt.Print("Press Enter to exit")
    bufio.NewReader(os.Stdin).ReadBytes('n')
}

func process(mubiUserId string) error {

    var movieRecords ()MovieRecord
    var csvRows ()()string

    client := &http.Client{}
    req, err := http.NewRequest("GET", url, nil)
    if err != nil {
        return err
    }
    query := req.URL.Query()
    query.Set("user_id", mubiUserId)
    query.Set("per_page", perPage)

    fmt.Printf("Data for UserID %s will be requested from MUBI servern", mubiUserId)
    for i := 1; ; i++ {
        fmt.Printf("Requesting for chunk #%d... ", i)
        query.Set("page", strconv.Itoa(i))
        req.URL.RawQuery = query.Encode()

        response, err := client.Do(req)
        if err != nil {
            return err
        }

        if response.StatusCode != http.StatusOK {
            return errors.New(fmt.Sprintf("Server returned status code %d", response.StatusCode))
        }

        jsonFile, err := ioutil.ReadAll(response.Body)
        if err != nil {
            return err
        }

        if err := json.Unmarshal(jsonFile, &movieRecords); err != nil {
            return err
        }
        fmt.Printf("downloaded %d recordsn", len(movieRecords))

        if len(movieRecords) == 0 {
            break
        }

        for _, item := range movieRecords {
            csvRows = append(csvRows, generateCsvRow(item))
        }
    }

    if len(csvRows) == 0 {
        fmt.Printf("nNo records found at MUBI server for UserID %sn", mubiUserId)
        return nil
    }

    outFile, err := os.Create(letterboxdCsvFileName)
    if err != nil {
        return err
    }
    defer func() {
        err := outFile.Close()
        if err != nil {
            log.Fatal(err)
        }
    }()

    csvwriter := csv.NewWriter(outFile)
    defer csvwriter.Flush()
    if err := csvwriter.Write(()string{"tmdbID", "Title", "Year", "Directors", "Rating", "WatchedDate", "Review"}); err != nil {
        return err
    }
    if err := csvwriter.WriteAll(csvRows); err != nil {
        return err
    }

    absPath, err := filepath.Abs(outFile.Name())
    if err != nil {
        return err
    }
    fmt.Printf("n%d records are saved to %qn", len(csvRows), absPath)

    return outFile.Sync()
}

func generateCsvRow(r MovieRecord) ()string {
    idOut := strconv.Itoa(r.Id)
    titleOut := r.Film.Title
    yearOut := strconv.Itoa(r.Film.Year)

    directors := make(()string, len(r.Film.Directors))
    for i, director := range r.Film.Directors {
        directors(i) = director.Name
    }
    directorsOut := strings.Join(directors, ", ")

    ratingOut := strconv.Itoa(r.Rating)
    timeOut := time.Unix(r.WatchedAt, 0).Format("2006-01-02")
    reviewOut := r.Review

    return ()string{idOut, titleOut, yearOut, directorsOut, ratingOut, timeOut, reviewOut}
}

disk utility – Merge “free space” with Mac OS Volume

Let me tell the story from the beginning: I installed Big Sur on an unsupported Mac using guidelines at Medium. In the guide it was stated that I should create a separate partition for Big Sur, and shouldn’t install it on my current one. I had my SSD Called “Macintosh SSD” and later I created a partition named “Macintosh SSD Big Sur” of size 40GBs. After installation I wanted to clear the “Macintosh SSD” of size 80GBs(with old MacOS) and merge it with the new “Macintosh SSD Big Sur”.

This is what I initially had after formatting partition with the old MacOS
enter image description here

So, I used the command sudo diskutil apfs deleteContainer disk3 after which I had (free space) in /dev/disk1

enter image description here

I want to extend that 39.6GB partition which free space of 80,1GB but all the commands I googled do not work:((
Could you please guide me on what I should do now?
Thank you in advance!

hard drive – Cannot erase disc in disc utility before trade in

Looking for some help please.

I am preparing my 2014 MacBook for a trade in. I followed the instructions that Apple sent but failed on the ‘turn FileVault off’ stage. I did this, but my prediction now is that at some point during the process my battery went flat as everything I’m reading implies that my disc is still encrypted.

I booted up into recovery mode to complete the Erase Hard drive and reinstall MacOS process.
Using Disc Utility I then erased the top disc it showed me – 251 GB Apple SSD SM0256F Media.

I then went to erase the 2nd disc it showed Mac OS X Base System (which shows 1.15GB used)
However I am unable to erase this in Disc Recovery. In the Erase tab the ‘erase free space’ / security options / erase buttons are all greyed out.

How can I erase this disc? Presumably this is what I need to reinstall MacOS as currently when I try to run reinstallation from disc recovery no disc shows in the installation dialog

Thanks so much

macos – Disk not formatted for GUID Partition. Use Disk Utility to change the partition scheme

I have a 16GB USB flash drive and I am trying to Reinstall macOS Sierra onto to it.

It keeps telling me it is partitioned for GUID, when I go select GUID Partition Map Scheme. On a hunch I use Mac OS Extended (Journaled) as Format. Then I click on Erase and the process fails with nothing in details except couldnt open device, operation failed.

When I go into my terminal and type: diskutil list:

/dev/disk2 (external, physical):
#:   TYPE NAME    SIZE  IDENTIFIER
0:   FDisk_partition_scheme  *15.4 GB disk2
1:   Apple_HFS Untitled       15.4 GB disk2s1

Anybody know how to get past this roadblock and get Sierra installed on my USB drive?

hard drive – Disk Utility says Bootcamp partition has storage left but in Windows, the C: disk says there is no volume left?

Very likely pagefile &/or hiberfile, each of which can be the same size, or even larger than, your total RAM size. You can remove/disable the hiberfile but not the pagefile.

How-to-Geek has an article on how to disable hiberfile – What Is hiberfil.sys and How Do I Delete It? which I won’t précis here as it’s really a Windows issue not Mac. Basically, you stop Windows from allowing Hibernate then you can delete the file.

There are many disk/map/storage apps for Windows so you can see what may be using more space than you’d like – I don’t use Windows enough to know which might be best suited. This site lists several of them. Hongkiat – 10 Best Disk Space Analyzer for Windows 10

It is possible to customise your pagefile size, but I would recommend against this, & certainly against reducing it below your RAM size, as it can cause crashing/memory issues.

Can not access PowerEdge Expandable RAID Controller Configuration Utility

I’ve looked online but can’t find a solution. On post it says press ctrl+r to enter configuration utility and i do that. it then says

1 virtual drives found on the host adapter
1 virtual drives offline

1 virtual drives handled by bios
Initializing HA - 0 (Bus 1 Dev 0). Please Wait...

I’ve let it run for about an hour now and nothing has changed!

It is a dell power edge 2950. I really don’t know that much about raid and stuff.
The reason I want to reconfigure it is because I’ve added drives. (I just got this server a while ago and this is the first time ive been able to work on it) and they are not reconized on gparted or any linux installation. Please dumb it down because I’m only 14 and im just getting into making a home lab. (note: i paid for these servers with my own money and they were only 75 bucks but it was a really good deal)

disk utility – 60Gb missing after deleting Bootcamp partition

I recently uninstalled Bootcamp on my MacbookPro 256gb.I had granted 60Gb to Windows but unfortunately, I can’t recover those gigs in my main Apple container.

I tried to find solutions on the forum, but not having quite the same structure as me, I didn’t want to make mistakes.

Here is a screenshot of my “diskutil list”.I know I have to do a command to delete one of its partitions but which one ?
I know I have to do a command to delete one of its partitions but which one?

Many thanks for your help.

enter image description here

windows 10 – win10 utility file copy multiple directories from search result

My computer has been infested with a redirect a string in 100s of files. Using file locator string search shows many many directories with files in various path.
I intend to move these invested files – using copy-all inside the search result window – to an empty external hard disk with the full structure intact, except the drive letter.
If after this process the computer screams “file not found / missing” I know where to look and eliminate the redirect part – I hope, then place the cleaned file to the needed location on C: .
At a later date I intend to erase the external data.

The following information should help to avoid duplication of ideas what else to do, I did:

Browser: Clear cache, history. Install No Redirect extension to FF 83.0. Add cybercriminal’s internet address to Win10 HOSTS.
TOOLS: CCleaner, Search & Destroy (not used $$$), Malwarebytes, MS Defender.

SYSTEM: sfc /verifyonly , Dism /Online /Cleanup-Image /CheckHealth , Dism /Online /Cleanup-Image /ScanHealth , DISM /Online /Cleanup-Image /RestoreHealth (error free)