One of my colleagues uses Docker Desktop on MacOS. One day, it reported that all of the 200GiB of reserved space were full.
The docker daemon did not think so:
$ docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 68 18 36GB 26.9GB (74%)
Containers 20 20 111.7MB 0B (0%)
Local Volumes 56 12 7.947GB 4.992GB (62%)
Build Cache 365 0 0B 0B
This are no 200 GiB.
On Linux we can simply inspect /var/lib/docker, but Docker on MacOS is running inside a virtual machine (VM). We got access to that VM with the help of justincormack/nsenter1:
$ docker run -it --rm --privileged --pid=host justincormack/nsenter1
# cd /var/lib/docker/
# du -h -d 1
44.5G ./overlay2
95.6M ./image
7.7G ./volumes
114.4G ./containers
336.0K ./network
166.7G ./var/lib/docker
So containers is very full although docker said it should contain only 111 MiB :)
# cd /var/lib/docker/containers/
# du -h -d 1
56.0K ./e239e861c2a9097f79d3c0c0f98fce7b20ab899674ea7772356d0355d9f688f4
44.0K ./962a1795b5440e9b9900a4743d86f9c18452675a43c379a88aaac2b16b5bd275
[...]
114G ./2f9867b08a714fcfd83b85d5cf7f883be05394970e7e0058747b399f06bd269d
[...]
# cd /var/lib/docker/containers/2f9867b08a714fcfd83b85d5cf7f883be05394970e7e0058747b399f06bd269d
# ls -lah
total 114G
[...]
-rw-r----- 1 root root 114.3G Oct 11 07:01 2f9867b08a714fcfd83b85d5cf7f883be05394970e7e0058747b399f06bd269d-json.log
[...]
And there we have it: A log file of 114 GiB.
But which container is that?
$ docker inspect 2f9867b08a714fcfd83b85d5cf7f883be05394970e7e0058747b399f06bd269d | jq '.[].Config.Image'
"gitlab-docker.company.com/customer/customer-wordpress-docker/mysql:latest"
This particular MySQL container seems to be very badly configured.
I bought a Macbook Air 13" in 2011 (Model A1369) and used it as Linux laptop until 2018. Then the upper letter row on the keyboard would take up to 5 minutes to be usable after opening the lid. Since my password contains at least one of the letters in that row, the laptop became unusable for me and I replaced it with a Purism Librem 13.
When Corona struck my older child got it for school work, and it got used until mid of 2022.
One day it showed strange colors on the screen and turned off. When turning it back on, the screen stays black and three consecutive sounds play every 5 seconds:
Apple says that "the memory in your Mac didn't pass an integrity check", which basically means the RAM is broken. Others had the same problem and they found a (now available) support document that said "3 beeps = no good banks".
But because the RAM is soldered onto the logic board I can't simply replace it.
We got an old 2015 Macbook Pro (A1398) and I let Munin check if it is connected to the Wi-Fi network. When looking at the graphs I saw it was responding to ping packets even though it was sleeping!
A setting in the preferences application is responsible for this:
System Preferences > Energy Saver > Power Adapter > Wake for Wi-Fi network access
(German: Systemeinstellungen > Energie sparen > Netzteil > Ruhezustand bei WLAN-Netzwerkzugriff beenden )
When it is enabled and the Macbook is attached to the power cord, it will respond to pings in the network.
When the setting is disabled, it stops responding to pings 16-40s after closing the lid.
Ein Familienmitglied nutzt einen Mac Mini, und auf dem zeigte die Programmleiste am unteren Bildschirm über dem Symbol der Systemeinstellungen seit neuestem immer ein rotes Benachrichtigungsicon mit einer "2" an. Zwei dringende Dinge, die behoben werden müssen.
Öffnet man die Systemeinstellungen, so ist bei "Apple ID" und bei "Softwareupdate" ein rotes Benachrichtigungssymbol zu sehen. Weiterhin wird unter dem Namen noch "iCloud verwenden .. Details" angezeigt:
Bei "AppleID" ist dann ein gelbes Warn-Icon, daß man doch iCloud benutzen soll. Es gibt keinen "normalen" Weg, diese Warnung abzuschalten:
Andere Leute im deutschsprachigen Raum stört diese unnötige und nicht abschaltbare Werbung auch, hatten aber keine Lösung.
Im englischsprachigem Raum ab es im Apple-Forum eine Lösung: Ein Terminal aufmachen und folgenden Befehl ausführen:
$ defaults delete com.apple.systempreferences AttentionPrefBundleIDs
Wer möchte, kann sich den Eintellungswert vorher auch ausgeben lassen:
$ defaults read com.apple.systempreferences AttentionPrefBundleIDs
In unserem Fall war die iCloud-Benachrichtung nach dem Reboot weg. Leider tauchte die OSX-Update-Benachrichtigung automatisch nach 30 Sekunden wieder auf :/
So möchte ich als zahlender Kunde nicht behandelt werden.
I'm using a Macbook Air because of the nice hardware and run Ubuntu Linux on it since OSX isn't really usable for me.
Being a Linux guy, I wanted to get rid of the glowing apple on the front for quite some time now. There was of course a catch: The apple should be replaced with something nice that integrates the glow in a cool way.
The first stickers I found were on Etsy, search word here is macbook decal. Unfortunately, most of the badges keep the apple logo and only some integrate it at least partly, but nothing was nice enough for me.
After a while I found macstix.net which exclusively have labels that cover the apple and let other symbols glow instead - see their gallery. I contacted them, sending a SVG file along how I imagined the sticker could be. Unfortunately they had to decline but told me the address of their competitor: iDiffer.
The iDiffer guys answered quickly, measured, tested and finally made the sticker for me. It costed 19€ in total, and today it arrived:
iDiffer has a separate page for the tux sticker now, and it costs 8€.
Now it happened the second time: After a Ubuntu Linux system crash I had to reboot my Macbook Air and, instead of seeing GRUB, a black screen with a lonely blinking cursor illuminated my face. The mac did not boot Ubuntu anymore - rEFIt still worked, but loading grub completely failed.
I tried booting with the official boot loader (holding alt/option during boot) and selecting the (wrongly labeled) "windows" installation there, re-installing rEFIt, re-blessing the linux boot partition and re-setting the boot partition bootable in MBR - nothing helped. The cursor flashed and flashed for minutes, not doing anything.
In the end, I had to reinstall GRUB to make my linux partition bootable again.
The beginning of the procedure was the same as the installation process:
On OSX, copy that onto the 4th partition (my linux boot partition that somehow got damaged):
$ sudo dd if=/dev/disk2s1 of=/dev/disk1s4 bs=1m
Now when that's done, GRUB needs to be re-installed. We need to chroot into the old system to do that, but before we have to make the partition writable. Since we booted from it, we cannot change it by default, but since we have enough RAM it's easy:
$ sudo bash
$ cp -r /cdrom /cdrom2
$ umount -lfr /cdrom
$ rmdir /cdrom
$ mv /cdrom2 /cdrom
Now chroot into the old system:
$ sudo bash
$ mount /dev/sda5 /mnt
$ mount -o bind /proc /mnt/proc
$ mount -o bind /dev /mnt/dev
$ mount -o bind /dev/pts /mnt/dev/pts
$ mount -o bind /sys /mnt/sys
$ chroot /mnt /bin/bash
And finally reinstall GRUB:
$ sudo grub-install --force /dev/sda4
Shutdown the live cd and boot your mac. It will start the old Linux system now without problems.
I bought a Macbook Air 4,2 (= mid 2011) last week. Despite that my last laptop was a Macbook, I really wanted to buy no Mac again since setup is always a hassle. Unfortunately, no other notebook vendor has similar hardware for the same or lower price.
So the first thing after I got the Macbook Air and trying out the multi touch gestures in OSX was to install Ubuntu and move the profile from my old laptop on it so I could continue working. Unfortunately, it was not easy. Installing really sucked - the apple engineers and programmers did their best to make it as hard as possible to get Linux running on it.
The Macbook Air has no CD/DVD drive (since those optical media are dead for me anyway), so I wanted to use a "live usb stick" with the Ubuntu installer on it. UNetbootin is a tool that takes any Linux installation CD/DVD .iso file and puts it on a USB stick that is bootable by almost all PCs. As that always worked, I used it to put the Ubuntu 11.04 live install CD iso on a USB stick.
After installing rEFIt, the stick was detected and I wanted to boot. Guess what - it does not work. Others have the same experience : Booting from USB sticks does not work on a Macbook Air. You'll learn to hate the following errors:
Missing operating system
no bootable devices
I managed to get the Ubuntu installation CD working by putting it on a separate partition after preparing it a bit.
OSX device name | Linux device name | Type | Size | Description |
---|---|---|---|---|
Original partitions | ||||
disk0s0 | /dev/sda1 | fat32 | 200 MiB | EFI boot partition |
disk0s1 | /dev/sda2 | hfs+ | All the disk / 60 GiB after resizing | Mac OSX |
disk0s2 | /dev/sda3 | ??? | 620 MiB | Hidden Mac OSX rescue partition. |
Additional partitions | ||||
disk0s3 | /dev/sda4 | fat32 | 1 GiB | Ubuntu installer / boot |
disk0s4 | /dev/sda5 | ext4 | 50 GiB | Linux root / |
disk0s5 | /dev/sda6 | swap | 4 GiB | Swap |
disk0s6 | /dev/sda7 | ext4 | 10 GiB | /tmp |
disk0s7 | /dev/sda6 | ext4 | 110 GiB | Home folders /home |
With the OSX disk utility, you can resize the OSX partition and prepare the new ones, all as "fat32".
Create a msdos partition table on your USB stick. Most sticks do not have one, but we absolutely need it. GParted makes that easy: Menu "Device", "Create partition table", "msdos".
Create a 1 GiB FAT32 partition on it. Give it a nice name; rEFIt will show that later when booting.
Use UNetbootin on a second computer to put the install CD .iso on that partition. I used the "64-bit Mac (AMD64) desktop install CD" from the Ubuntu 11.04 alternate iso download page , but I think the normal (non-mac) 64-bit iso should work, too.
Boot into OSX, open the Terminal and run
$ sudo dd if=/dev/disk2s1 of=/dev/disk1s4 bs=1m
This will copy the partition from the USB stick onto the fourth partition on your Macbook's SSD.
Install rEFIt if you haven't done that yet.
Reboot. You will see the new partition in the rEFIt menu and can boot it. It will show the UNetbootin boot menu from where you can start the Ubuntu Live CD or the installer.
When running Ubuntu, add nomodeset to the boot options - otherwise the screen will look garbled and you won't see anything. This is necessary in at least Ubuntu 11.04 and 11.10; the fix will hopefully be in Linux kernel 3.2 after is has only recently been implemented.
Very important: You will only able to boot from the first four partitions because rEFIt uses the BIOS emulation for Linux, which means that you have to use the MBR partition table. Syncing the GPT to MBR does not give you an extended partition, so the first 4 are usable only. Keep that in mind when playing around.
The Ubuntu 11.04 installer has a problem installing Ubuntu on the same disk that the installer is run from. I don't know the reasoning behind that; the error is that the a partition of the disk is already in use (the installer partition).
To work around that problem, do not start the installer but the Live CD mode, run the following commands and then start the installer:
$ sudo cp -r /cdrom /cdrom2
$ sudo umount -lfr /cdrom
$ sudo rmdir /cdrom
$ sudo mv /cdrom2 /cdrom
The rest of the installation process is as usual without any problems.
The Macbook Air 4,2 (mid 2011) is not very well supported by the stock kernel and software in Ubuntu. Additional work is required.
The most easy way is to use Joshua V. Dillon's post-install script, post-install-natty.sh for 11.04 or post-install-oneiric.sh for 11.10.
The script fixes the graphic driver problems, so nomodeset is not required anymore. It also fixes bluetooth, the touchpad, the keyboard layout and backlight.
Support status for Ubuntu 11.10, kernel 3.0.0-12-generic #20-Ubuntu.
Hardware | State | Description |
---|---|---|
Display | Works | Full 1440x900 resolution |
VGA adapter | Partially | Full HD resolution of TV was not recognized, worked up to 1440x900 |
HDMI adapter | Works | All TV resolutions were detected correctly |
Wifi | Works | No problems in 11.10, 11.04 crashed under heavy load |
Bluetooth | Partially | My phone does not see the Macbook, works the other way round |
Keyboard | Works | Backlight, too - Gnome shell automatically supports hotkeys |
Touchpad | Works | 2-finger scrolling works, too |
Webcam | Works | No problems on 11.10. Didn't work on 11.04. Cheese allows 640x480 only, although HD should be possible according to Wikipedia. |
Sound | Works | If you hear no sound, use alsamixer to unmute both surround speakers. |
Suspend | Works | |
SD card reader | Works |
The Ubuntu Wiki has a very complete guide for the Macbook Air 4,2 now.
In case the linux system does not boot anymore from rEFIt, have a look at my solution.
Before upgrading the RAM in my Macbook, I had to find out which revision it was. Reboot wasn't an option since I did not want to lose my 39 days of uptime, so I had to find a linux-based solution - dmidecode:
$ sudo dmidecode --type 1 # dmidecode 2.9 SMBIOS 2.4 present. Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: Apple Inc. Product Name: MacBook2,1 Version: 1.0 Serial Number: N0N3EDTOFE3D UUID: S0M3TH1N5-57RAN53-15-H3RE-70-C Wake-up Type: Power Switch SKU Number: System SKUNumber Family: MacBook
The Macbook ships an infrared remote control, the Apple Remote - the thingy you control Front Row with. Using my beloved Gentoo Linux on the Macbook I looked for a way to control my apps with it.
Up to kernel 2.6.21, you could use some patch to make the remote appear as an additional keyboard (of course with only a few keys) in your system. For stability reasons I need to stay with very current kernel versions, so the patch was no option, unfortunately.
It was said that one could use LIRC in conjunction with your remote, but apparently there was no real HowTo that told me what to do. Here are the steps I needed to follow:
The Apple Remote behaves a bit strange when keeping buttons pressed: Instead of repeatedly sending the same key event, it sends a special repeat code. When calibrating your remote with irrecord, you are asked to keep a button pressed at the beginning of the procedure. This also makes LIRC think that the repeat signal is the same like a normal button - which leads to the annoying behavior that, when e.g. keeping the Up key pressed, only one Up signal is sent and a bunch of Menu signals follow. This can be fixed by manually adding a Repeat button and changing the toggle bit mask to match it.
Here is my /etc/lircd.conf:
Some more technical details: The remote is available as an USB device with name "IR Receiver", manufacturer "Apple Computer, Inc". Its device code is 05ACx8240 (Vendor and device id).