hard drive – Update loop on Macbook Air

I am trying to help some friends getting their Macbook Air 2017ish working again.
The issue is that when logging in, a progress bar will show, and after a while, the update will fail.

This happens over and over.

I have tried:

  • Booting from a USB startup disk, no luck, it won’t even show as a possibility
  • I have reset PRAM, no luck
  • I have tried to run recovery mode, but it wants me to log in to the user, but fails with the correct password every time
  • I have tried to use the laptop as an external hard drive, but I don’t own a Thunderbolt 2 cable, only a display cable and that does not seem to work
  • Single user mode, I can log in and mount the disk, but I can’t see the content of the “users” folder, so I can’t move files from that terminal
  • Internet recovery mode – Fails after a while, with an error code referring to connection issues, but the connection should be fine
  • Safe mode, logs in to user account but ends up with a big icon with a crossed-out circle

My guess is that the hard drive is full and that is why the update fails. I am pretty sure that FileVault is activated.

Any ideas?

photos.app – How to fix Photos error while trying to open iPhoto library from external hard drive “Photos was unable to open the library” error 4302

Running Catalina 10.15.7 (19H524)

The iPhoto Library has been stored on an external hard drive. Tried opening it various times. Restarted the computer. Remounted the hard drive.

Any idea how to get it to open?

Found this thread googling – https://discussions.apple.com/thread/250721038 – but don’t understand the proposed solution.

enter image description here

photos – Can i store and access iphotos library on external hard drive (and still have it backup to my cloud network)?

Apologies for my technical ineptness. What i aim to do i store my large iphoto library on an external HDD and access it from that so it does not us my laptops more limited SSD storage. Is it possible i can set this hard drive to backup via my computer to the same local network attacked storage that my computer backs up to. If so how would this been set up?

Cheers, Ben.

hard drive – Relatively new WD Red Pro yielding ATA status: 41 (DRDY ERR), error: 40 (UNC ) on FreeBSD 12.2

I am running a TrueNAS server based on FreeBSD 12.2. I migrated the storage to 10 TB WD Red Pro. They’re running for 42 days now.

Out of the sudden, during a ZFS scrub, one of the disks yielded 5 errors. All of them more or less read:

(ada2:ahcich14:0:0:0): READ_FPDMA_QUEUED. ACB: 60 b8 08 3a 0f 40 f8 01 00 07 00 00
(ada2:ahcich14:0:0:0): CAM status: ATA Status Error
(ada2:ahcich14:0:0:0): ATA status: 41 (DRDY ERR), error: 40 (UNC )
(ada2:ahcich14:0:0:0): RES: 41 40 90 3b 0f 40 f8 01 00 30 06
(ada2:ahcich14:0:0:0): Retrying command, 3 more tries remain

I ran an extended SMART test after the incident, but it yielded no errors (except those that were recorded), especially no relocated sectors or such:

smartctl 7.1 2019-12-30 r5022 (FreeBSD 12.2-RELEASE-p2 amd64) (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD102KFBX-68M95N0
Serial Number:    (deleted)
LU WWN Device Id: 5 000cca 0b0cd3041
Firmware Version: 83.00A83
User Capacity:    10,000,831,348,736 bytes (10.0 TB)
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database (for details use: -P showall)
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    (deleted)
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (   87) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    (1108) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0004   132   132   054    Old_age   Offline      -       96
  3 Spin_Up_Time            0x0007   100   100   024    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       3
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   100   100   067    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0004   128   128   020    Old_age   Offline      -       18
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       1077
 10 Spin_Retry_Count        0x0012   100   100   060    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       3
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       215
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       215
194 Temperature_Celsius     0x0002   142   142   000    Old_age   Always       -       42 (Min/Max 25/67)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 5
    CR = Command Register (HEX)
    FR = Features Register (HEX)
    SC = Sector Count Register (HEX)
    SN = Sector Number Register (HEX)
    CL = Cylinder Low Register (HEX)
    CH = Cylinder High Register (HEX)
    DH = Device/Head Register (HEX)
    DC = Device Command Register (HEX)
    ER = Error register (HEX)
    ST = Status register (HEX)
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 5 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 10 08 3a 0f 40 08  15d+21:45:25.729  READ FPDMA QUEUED
  60 80 38 b8 60 0f 40 08  15d+21:45:18.777  READ FPDMA QUEUED
  60 b8 30 f8 58 0f 40 08  15d+21:45:18.775  READ FPDMA QUEUED
  60 b8 28 40 51 0f 40 08  15d+21:45:18.775  READ FPDMA QUEUED
  60 b8 20 80 49 0f 40 08  15d+21:45:15.608  READ FPDMA QUEUED

Error 4 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 28 10 d8 0e 40 08  15d+21:45:10.298  READ FPDMA QUEUED
  60 80 40 48 ef 0e 40 08  15d+21:45:03.370  READ FPDMA QUEUED
  60 b8 38 88 e7 0e 40 08  15d+21:45:03.178  READ FPDMA QUEUED
  60 b8 30 d0 df 0e 40 08  15d+21:45:00.444  READ FPDMA QUEUED
  60 20 20 f0 d3 0e 40 08  15d+21:45:00.286  READ FPDMA QUEUED

Error 3 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 00 90 81 23 40 08  15d+21:41:08.578  READ FPDMA QUEUED
  60 80 10 08 91 23 40 08  15d+21:41:08.336  READ FPDMA QUEUED
  60 b8 08 48 89 23 40 08  15d+21:41:01.627  READ FPDMA QUEUED
  60 b8 f8 d0 79 23 40 08  15d+21:40:57.546  READ FPDMA QUEUED
  60 b8 f0 18 72 23 40 08  15d+21:40:56.899  READ FPDMA QUEUED

Error 2 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 18 f0 d5 17 40 08  15d+21:34:13.263  READ FPDMA QUEUED
  60 20 50 10 0c 18 40 08  15d+21:34:06.288  READ FPDMA QUEUED
  60 b8 48 58 04 18 40 08  15d+21:34:06.288  READ FPDMA QUEUED
  60 b8 40 98 fc 17 40 08  15d+21:34:06.288  READ FPDMA QUEUED
  60 b8 38 e0 f4 17 40 08  15d+21:34:06.288  READ FPDMA QUEUED

Error 1 occurred at disk power-on lifetime: 1050 hours (43 days + 18 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 00 00 00 00  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 b8 50 28 8b 17 40 08  15d+21:33:33.959  READ FPDMA QUEUED
  60 b8 48 70 83 17 40 08  15d+21:33:16.648  READ FPDMA QUEUED
  60 80 40 e8 82 17 40 08  15d+21:33:16.647  READ FPDMA QUEUED
  ea 00 00 00 00 00 40 08  15d+21:33:16.640  FLUSH CACHE EXT
  61 08 30 f0 fd 3f 40 08  15d+21:33:16.638  WRITE FPDMA QUEUED

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      1072         -
# 2  Short offline       Completed without error       00%      1023         -
# 3  Extended offline    Completed without error       00%       946         -
# 4  Short offline       Completed without error       00%       855         -
# 5  Short offline       Completed without error       00%       687         -
# 6  Extended offline    Completed without error       00%       610         -
# 7  Short offline       Completed without error       00%       519         -
# 8  Short offline       Completed without error       00%       279         -
# 9  Extended offline    Completed without error       00%       202         -
#10  Short offline       Completed without error       00%       111         -
#11  Short offline       Completed without error       00%        11         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

In the first place I though I might have bought a defective disk. I would have expected SMART to fail assessment. However, this is not the case. I don’t think it’s a defective PSU, because it’s not even one year old. Also, it’s a 550 Watts PSU and the machine consumes about 100 Watts. I don’t think it’s a defective cable, either, because I was running other disks for almost a year without problems. Also, with these other discs I actually had a defective cable, which I replaced, and the observations were different.

I am considering to RMA the drive, although I am not sure if it qualifies for an RMA. What do you think? May that be a transient error? Any advice is appreciated.

driving – How long does it take to drive from Marrakech to Merzouga?

Due to my personal experience, I would avoid driving for such a long stretch in Morocco. If the road quality has improved, the skills of the local drivers have not. I can assure you their driving style is very different that what you might be used to: aggressive and unsafe. Moreover, the fact that you don’t know the road also means you will be driving even more defensively. This will add an extra source of stress on you. 7 hours of stress is a very long effort. I would personally take the coaches. Indeed I used Supratours from Marrakech to Essaouira without a glitch.

There are Supratour coaches serving the line Marrakech – Merzouga. These leave at 08:30 and arrive at 20:59, needing approximately 12 hours 30 minutes, according to the ONCF timetable website. Therefore you would have to plan your journey accordingly.

There are also mentions of night coaches, such as this tripadvisor forum post from 2011. I could not find any more information about these though.

Your best bet is to go to the Supratours coach station in Marrakech to ask or more details, seeing as there isn’t much available online.

How to find Windows environment variables from hard drive without booting?

How can I find what the PATH variable on Windows 10 was on a backup “image” of an old system hard drive?

I returned my computer to field support, they “backed it up”, restored it to a new system, sent me the new system and nuked the old system.

When I asked about getting missing stuff off the old system, they said the only option is to see if I can find what’s missing on the backup image which they keep for seven days.

I’m missing my PATH and environment variables.

Unfortunately, restoring the system (not sure what their process was – I know that they re-installed some apps, so it wasn’t a system mirror) didn’t restore my environment variables and PATH.

I know that simply having the old PATH (and other environement variables as well) won’t necessarily “fix” any problems on the new machine.

But, for example, I spent a lot of time setting up my Python environment, and I have no idea what the Python environment variables even were that I used, much less what they were set to (there are several Python instances on the “restored” hard drive).

I have access to the back up that field service made of my boot drive.

Back in the “old” days, I’d just copy the AUTOEXEC.BAT and CONFIG.SYS files. Those haven’t been around (AFAIK) for a long time.

How can I find what the PATH and other environment variables WERE in the backup of the old system that I can no longer boot or use (since it and its hard drive are gone)?

I welcome pointers to other posts. I know Google is my friend, but not today. 99.9% of everything I’ve found is “how do I set my PATH variable”, and so on.

Thank you!

Jim

(P.S. I just dumped all my environment variables to a file I named CONFIG.SYS so I never have to consult the answer to this question again)

mac os x – MySQL with symlinked databases on an external drive on MacOS cannot read idb files

I have had this setup working for years, but all of the sudden today, MySQL crashed, and now I’m having trouble with every database on my external drive on my Mac.

It is currently running MySQL 8.0.21, and that update was done 3 months ago. Prior to that is when I say “working for years” since verstion 5.6/5.7. I haven’t updated the OS recently either — it has been running Catalina for a while.

Initially after the crash, the databases could not be recovered automatically by InnoDB. When it started up, it had lines for all of the tables in every one of those DBs that mentioned they could not be recovered because they were “in an unprotected location.”

Eventually, I figured out how to change the permissions for the users on the external drive to match those expected by mysql, and put this extra location in innodb_directories config setting, and it starts up OK.

However, now, when trying to select data, it tells me Tablespace is missing for table ... and there is a new error in the error log:

Operating system error number 1 in a file operation.
Error number 1 means 'Operation not permitted'
Cannot open datafile for read-only: ... OS error: 101

Not sure why it’s giving me both error 1 and 101, but according to perror, 1 is indeed operation not permitted, and 101 is STREAM ioctl timeout.

As for “not permitted” — the permissions were actually more lenient on these folders. drwxr-xr-x vs. drwxr-x--- (so, world readable and executable) and the ibd files within them are similarly more lenient: -rw-r--r-- vs -rw-r-----.

I don’t even know where to start with error 101, except to try to clear error 1 first, and see if it goes away. The drive is absolutely accessible, even by mysql, which could read it to start up, as best I can tell (since the errors regarding them being unprotected went away).

I decided to chmod o-r and chmod o-x to make those folders and tables match exactly the permissions on the ones that worked. I restarted mysql to see if that made a difference in its ability to read those tables in the databases on the external drive, but it gives the same errors.

I moved a database folder that was working from the main drive to the external drive. It continued to work, until I restarted MySQL. Then it started up as normal, but when selecting data again it gave the same error as before. I moved a database from where it didn’t work on the external drive, to the main MySQL folder, and restarted MySQL, and it works fine. Move it back, and we get the same errors.

MySQL runs under the same user account that I am logged in as, so I don’t see why it would have an issue with any kind of permissions related to the user account.

Finally, I tried adding mysqld and mysqld_safe to Full Disk Access in MacOS and restarting MySQL, in case MacOS was blocking it at the program level, again with no luck.

I am out of ideas. Anyone have anything else I can try?

Have raw pbundle data on drive, need it to be recognize as time machine

So I made a home-brewed linux / raspberry pi time machine more or less like this. I ended up with time machine data stored on an ext4 partition shared via samba that was successfully recognized and used as a time machine backup destination my my mac. The drive holds 3TB of information, so it’s full of something.

But when I tried to use that drive as a source from Migration Assistant after my mac was wiped by apple repair, it won’t recognize the network drive.

So I bought another 6TB drive, formatted it as HFS, and copied the .pbundle / sparsebundle file onto it. I thought of this as a “nuclear” option sure to work.

But now, the mac still doesn’t see this new drive as a time machine source.

What should I do? How should I recover my data?