How do I install macOS Sierra now after all these issues?
Solution 1:
I've been looking over your other questions and the whole history of your situation and feel like we're missing something here. Not blaming you, I just think something unbeknown has happened (e.g. a power failure at some point you're not aware of that has caused some corruption).
So, I'm suggesting you do as follows:
- Start your iMac in Target Disk Mode
- Connect it to your MBP (make sure the MBP is connected to AC power)
- Run Disk Utility from the MBP to erase the iMac HD (no need to do another secure erase) and also run First Aid
- Assuming you don't encounter any errors, do a fresh download of the install macOS Sierra app from the Mac App Store (i.e. do not run the installer from the USB installer you created, but download a fresh copy from the App Store directly to your MBP)
- Now run the installer from the MBP
- Follow the steps to install macOS Sierra (ensure you select the iMac's HD to install it on)
Let me know if you run into any problems, but hopefully this will resolve the issue once and for all as it eliminates a number of possible problems.
Solution 2:
The most likely culprit is that your hard drive has failed or is in the process of failing.
You've provided lots of good info so let's see if we can digest it all...
The iMac in question is a mid-2011 27" model. I just tested it by putting a 2012 MBP in target disk mode and booting it from that. It booted fine and seems to run fine.
This means that your iMac is more than capable of running Sierra and the only component you've isolated that has eliminated your problem is your hard drive.
As I mention in my first question, I decided to reformat the HD by doing a 2 pass secure erase and this was successful. So I think that means I have no problems with my HD right? Plus the 1hr hardware test passed also.
Not necessarily. A two pass erase simply writes data to the drive. The trick here is to do a verification after the write (read the data back). I have seen many instances where a drive was failing but failed (pun not intended) to report that it was failing.
Many people like to "stress test" their drives in the hope that it somehow fixes things. This is roughly what you did and it ultimately doesn't make anything better.
The first problem I ran into was an endless loop during installation so I posted this question: Stuck in endless macOS Sierra installation loop . Monomeeth got me past this problem by creating a USB installer.
Again, here we are bypassing the installer by getting it on the USB and not the installer located on the hard drive. You have effectively isolated your HDD (again) and eliminated the problem (to a point).
From your previous post:
vfs_mountroot
is what mounts your root file system that's located on your hard drive. At the risk of oversimplifying things, your kernel has loaded, but when it tries to load the rest of the OS, things break. This is the "panic" because without it, you can't do anything so it's (figuratively) throwing it's hands up the in the air "panicking."
Further down (from the same post) we have this little gem:
This is telling us that the kernel that got loaded was the install media but that's as far as it got. Since it couldn't mount the root file system, it stopped here. It couldn't read the drive, so it couldn't go any further.
To Summarize (and TL;DR) ....
-
You have a 2011 iMac with the original HDD, so it's at least 6 years old. If I remember correctly the lifespan of the drives installed in the iMac was rated at 3 years1. If you got 5/6 years out of it, you're pretty lucky and pretty much on borrowed time.
-
Each time you isolate your internal HDD from the equation; Target Disk Mode with a MBP and/or install from USB, it works fine.
-
If you want to further verify this, get an external USB drive and install/boot Sierra from that. If it works, then you know it's your internal drive.
Your fix...
Get a new drive; go for an SSD (I use Samsung EVO 850 in my iMac and swear by it). Your 2011 iMac has it's screen held in with magnets and Torx screws (as opposed to the 2012 and up which uses glue). Ifixit.com has an excellent tutorial on doing this drive replacement It's rated as "moderate" mostly because the screen is large and unwieldy. But, if you take your time, you can do this with no problems
1 Per iFixit.com: Installed drive was WD Caviar Blue. WD Warranty at the time was 3 years. Source: WD Warranty Policy