Start Ubuntu and run badblocks
Use an Ubuntu disc that works with your Mac, then run badblocks with appropriate options.
Ubuntu Manpage: badblocks - search a device for bad blocks
DVD compatible with a MacBookPro5,2
DVDs not compatible with a MacBookPro5,2
- Ubuntu 12.04 desktop i386
- Xubuntu 12.04.1 desktop i386
- Ubuntu 12.10 desktop i386
Example A
Adapted from a Mac-oriented post in the ZEVO support forum:
I ran badblocks onto a dedicated PC with Ubuntu Live, disk connected
via SATA 6.
I opened four Terminal windows and began:
- two instances with option
-n
- two instances with options
-wsv
– at intervals of ten minutes (the second instance begun ten minutes
after the first, and so on).
After seventy hours it was around 75% -n and 50% -w.
Yesterday I decided to stop badblocks and review S.M.A.R.T. values
– a comparison with results of a first run of smartctl (after
unboxing this new disk). Nothing had changed.
That's not Mac hardware, but as some Mac hardware can use SATA 6, I like this example; a pleasantly thought-provoking approach to multiple concurrent runs of badblocks against a single disk.
Example B
Started from Ubuntu 8.10, a partial test of a 750 GB Seagate Momentus® XT ST750LX003-1AC154 solid state hybrid internal to a MacBookPro5,2
ubuntu@ubuntu:/dev$ man badblocks
ubuntu@ubuntu:/dev$ badblocks -n -s -v /dev/sda
badblocks: Permission denied while trying to determine device size
ubuntu@ubuntu:/dev$ sudo badblocks -n -s -v /dev/sda
Checking for bad blocks in non-destructive read-write mode
From block 0 to 732574583
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: ^C1.30% done, 9:34 elapsed
Interrupt caught, cleaning up
ubuntu@ubuntu:/dev$ sudo badblocks -n -s -v /dev/sda
Checking for bad blocks in non-destructive read-write mode
From block 0 to 732574583
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: 0.23% done, 1:47 elapsed
0.92% done, 7:09 elapsed
1.00% done, 7:46 elapsed
25.13% done, 3:49:32 elapsed
25.13% done, 3:49:33 elapsed
25.13% done, 3:49:34 elapsed
25.13% done, 3:49:35 elapsed
I aborted the run to start OS X.
That was around 7.75 minutes for one percent, so for badblocks with those options to test that number of blocks (732574583) might take around 12.9 hours.
Overviews of the disk used for that test
macbookpro08-centrim:~ gjp22$ diskutil list disk0
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *750.2 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS swap 32.0 GB disk0s2
3: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF 536.9 MB disk0s3
4: Apple_HFS spare 671.1 MB disk0s4
5: Apple_CoreStorage 99.5 GB disk0s5
6: Apple_Boot Boot OS X 650.0 MB disk0s6
7: Apple_CoreStorage 616.3 GB disk0s7
8: Apple_Boot Boot OS X 134.2 MB disk0s8
macbookpro08-centrim:~ gjp22$ sudo gpt -r show -l /dev/disk0
Password:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - "EFI System Partition"
409640 62500000 2 GPT part - "Apple_HFS_Untitled_2"
62909640 262144
63171784 1048576 3 GPT part - "journal"
64220360 1310720 4 GPT part - "spare"
65531080 194305104 5 GPT part - "OS"
259836184 1269544 6 GPT part - "Boot OS X"
261105728 1203781256 7 GPT part - "gjp22-cs"
1464886984 262144 8 GPT part - "Booter"
1465149128 7
1465149135 32 Sec GPT table
1465149167 1 Sec GPT header
If I understand correctly: around 1,465,149,169 blocks. So why might badblocks determine that only 732,574,583 are to be tested? If not related to SSHD (see below) this might be a separate question.
Related
Solid State Hybrid Technology: HDD SSD SSHD | Seagate
In Super User:
For a simplified edition of this answer, I'd like to perform a similar test with a hard disk drive (not a hybrid) as an example.
badblocksis for Power PCs only, so requires Rosetta. – Crissov Apr 08 '16 at 11:43