Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Is running fsck -fy on OSX disk from Linux safe?

  1. #1
    Join Date
    Apr 2012
    Location
    Quebec, Canada
    Beans
    261
    Distro
    Ubuntu 12.04 Precise Pangolin

    Is running fsck -fy on OSX disk from Linux safe?

    Hi,


    I have a problem with the MacBook Pro of a friend;
    OS X would completely fail to boot - we've tried different stuff, all unsuccesful including:

    -Reset NRAM/PRAM;
    -Boot into Safe Mode
    -Boot into command-line / Single-User mode, which display something like this (don't remember the exact line, will check again: hfs_mountroot failed: 5 cannot mount root, errno = 19. Can't mount root?);
    -I also got a "No-Way" sign (Does this mean, basically hard-drive not found?), and even a Kernel Panic.
    -Boot from recovery partition and verify disk; oddly, the disk is not even seen by OS X at all, so I can't verify it! Nor in the terminal. Should I list the partitions and try to mount it manually?

    It may sound like a dead hard-drive, but still, I did managed to boot on my Ubuntu 13.04 x64 USB drive and access the OS X partition. I accessed all the files, and apparently managed to backup everything, at least in the Users folder. I should note that the drive takes at least 2 minutes to simply show up in Nautilus. And Ubuntu was really glitchy, lots of graphics glitchs and even prone to instant crash when moving the mouse for too long. I don't worry about that much, because I run it on Apple hardware without any tweaks to make it more compatible, but still.

    I can't understand much why OS X can't see the drive AT ALL (?!?), while I did accessed the hard drive in Ubuntu and copied everything, without possibly any "apparent" sign of corruption. Is this exclusively a OS X boot problem, a single partition?

    Of course, it's an Ubuntu forum, not an OS X, but I would appreciate at least one advice:
    Next, I will try the boot disk "DiskWarrior" and see what will happen. Additionally, I guess I could use fsck -fy from Linux to check the drive (Seems like OS X has the same command built-in his Disk Utility, so). I am aware that I will need to unmount the partition first to avoid damage. But running it from Ubuntu to an OS X partition (HFS+), is this safe, even if it's the same command?

    Is is required to install hfsprogs before fsck (To write on HFS+ drives)? Since I have no Wifi, will try to install it from a Raring DEB, please correct me if I need to do something else;
    Also, should disabling journaling be done before the fsck command? How long should the command last (My guess, from 30 minutes to 389 years) ?

    EDIT: I also have to try testdisk - used it in the past with lot of success. http://perrohunter.com/repair-a-mac-...rtition-table/

    If you have anything else in mind I could try to fix the boot issue, please let me know, I appreciate it.
    Last edited by GameX2; April 29th, 2014 at 03:00 AM.

  2. #2
    Join Date
    Apr 2014
    Location
    Northern VA
    Beans
    14
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Is running fsck -fy on OSX disk from Linux safe?

    Quote Originally Posted by GameX2 View Post
    Additionally, I guess I could use fsck -fy from Linux to check the drive (Seems like OS X has the same command built-in his Disk Utility, so). I am aware that I will need to unmount the partition first to avoid damage. But running it from Ubuntu to an OS X partition (HFS+), is this safe, even if it's the same command?
    No good is going to come from running Linux's fsck on a BSD-style filesystem. Remember that the first two letters of fsck, fs, mean file system. Not disk. Berserkley's journaled filesystem isn't the same as ext[3,4], and the latter are what Linux's fsck is written to handle.

    There's something about that disk that the Mac's EFI doesn't like, for some reason. Since you have the data that you need from it, it may be worth nuking it from orbit to see if you can continue using it. But, I wouldn't hold my breath. I assume you have a bootable USB OS X installer? (If you don't: why not?!) Boot with that, go into the Disk Utility, and see if it recognizes the drive on your Mac. Assuming it does, format it first. Then tell the OS X installer to use it. Get some popcorn, sit back, and wait.

    If Disk Utility doesn't recognize it, then I'm afraid that disk has had it from a Mac perspective. Either attach it to a PC and use it there, or drop it in a chipper/shredder and dispose of it.

  3. #3
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Is running fsck -fy on OSX disk from Linux safe?

    Moved to Other OS Chat.

    Depending on the MacOS version that is on the MacBook, you may want to try cmd-r when powering on the computer, hold it for long enough, this should boot you in the recovery partition where you can use Disk Utility.

    If on a pre-Lion release, you should have install disks.

    http://support.apple.com/kb/ht4718
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  4. #4
    Join Date
    Apr 2012
    Location
    Quebec, Canada
    Beans
    261
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Is running fsck -fy on OSX disk from Linux safe?

    Thank you for replying;

    EDIT3: This is the first time I try to fix a Mac, so I don't have OS X on a USB drive. I will try to find one, would appreciate if you know on top of your head where there is one. I have the Snow Leopard installation CD, but not USB on me - I don't think there's a possibility to run OS X live from USB without install, but correct me if I'm wrong, I don't have much experience with Mac systems.

    Although it's not my Mac (I don't own a Mac, but managed to run Mountain Lion with VMware, running well), I can confirm it's Snow Leopard and that we have the installation DVD - I am also aware that Snow Leopard is unsupported since February, will try to upgrade it / install Lion, the PC is a Intel Core 2 Duo, so should work. :/

    I tried Cmd-R, booting from the Recovery Disk, and the OS X disk just isn't detected - doesn't appear on the list, so I can't verify it. Use the Terminal as well, but I can't browse to the partition neither, like it wasn't mounted (But in the case, the drive wouldn't show up at all).

    Lead me to think that the partition or boot sector got problem, I successfully mounted it on Linux (After 2 minutes of detection, is that a failure sign?) and backed up everything. There could also be major problems with the drive, not just the partition :/

    I will come back to you with the error message that appears when I boot Single-User mode.
    Thanks

    EDIT: Yes, when I boot in Single-User Mode, that's the message I get:

    Code:
    BRCM tunables:
    pullmode[1] txringsize[ 256] txsendqsize[1024] reapmin[  32] reapcount[  128]
    Freeze at this point... Then this message show up every minute or so (Along with the No-Way sign):
    Code:
    Still waiting for root device
    Which seems really logical that OS X cannot mount / , and would also explain that Ubuntu took 2 minutes to display the OS X drive in Nautilus.

    EDIT: This look interesting, but this is for an Hackintosh: <bip bip was here>
    Last edited by bapoumba; April 29th, 2014 at 06:50 PM. Reason: removed link to hackintosh

  5. #5
    Join Date
    Apr 2014
    Location
    Northern VA
    Beans
    14
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Is running fsck -fy on OSX disk from Linux safe?

    Quote Originally Posted by GameX2 View Post
    I have the Snow Leopard installation CD, but not USB on me
    If this Mac has a DVD drive, then you have all you need. Pop the DVD in, hold the C key while the Mac is booting, and it should boot off of the DVD. Follow the previous instructions from there, but don't expect much.

  6. #6
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Is running fsck -fy on OSX disk from Linux safe?

    What is the SMART status of this drive? If you can boot Ubuntu, then you should be able to read the SMART status:

    Code:
    sudo smartctl -a /dev/sda
    Otherwise I would stick to Disk Warrior or the native Mac Disk Utility (which can be run from a Live session from an OS X installer DVD).

    If the SMART status shows lots of sector errors, then I would presume you have a physical/mechanical problem with the drive. Pull it out, put it in a USB enclosure and pull a second copy of important files. Also, spend some time to verify the integrity of user files that you have already backed up. It's possible that you have a bunch of corrupted files. If that is the case, then that would also indicate a failing drive.

    How old is the disk? How many power-on hours? If more than 3 years or 10,000 hours, then you probaby need a new drive anyway. No Apple Care means that machine no longer exists in the Mac ecosystem.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  7. #7
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Is running fsck -fy on OSX disk from Linux safe?

    Please be aware that we wont support hackintosh or running MacOS X in a VM on non Apple hardware as this is breaking their Licence (I know that is not what you are doing here, as you have a MacBook with the adequate install disks).

    Insert the disk and start up the MacBook holding down c, this should boot you into the installer. Make sure you have saved everything that was to be saved prior to doing this, because it will erase the HD and reinstall Snow Leopard.
    http://support.apple.com/kb/HT3910?viewlocale=en_US

    If the HD is borked, that wont work, but then you'll know the HD is dead.

    Edit, sorry, did not see tgalati4's post before replying. Please follow their recommendations before mine, as my suggestions are a one way drive (so to speak )
    Last edited by bapoumba; April 29th, 2014 at 06:47 PM.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  8. #8
    Join Date
    Apr 2012
    Location
    Quebec, Canada
    Beans
    261
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Is running fsck -fy on OSX disk from Linux safe?

    Allright, here's what I did;

    Tried rebooting again with the Snow Leopard DVD, but still

    What I did noticed, is that pressing the Option key list all the drives, and 1 time out of like 5, the OS X drive isn't listed, just the USB drive. In that case, if I choose to boot in Ubuntu, while the OS X drive did not appeared on boot, Ubuntu won't be able to find the disk at all, like it didn't existed, same for GParted.
    However, I restarted a few times, pressed the Option key, and then the OS X drive showed up (As well as "Recovery 10.6"). Instead of choosing the OS X drive (Which would lead in a No-Way sign), I booted in Ubuntu, and the OS X partition was instantly found and accessible. That way, I managed to take a screenshot of the partition layout:

    https://dl.dropboxusercontent.com/u/...2019_36_17.png

    Later ran smartctl (Had to install smartmontools from a Raring DEB because the MacBook was not connected to the Internet):

    Had to enable SMART because it was not enabled:

    Code:
    smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.8.0-19-generic] (local build)
    Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF ENABLE/DISABLE COMMANDS SECTION ===
    SMART Enabled.
    Then ran sudo smartctl -a /dev/sdc :

    Code:
    smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.8.0-19-generic] (local build)
    Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF INFORMATION SECTION ===
    Device Model:     TOSHIBA MK2555GSXF
    Serial Number:    804NT5NZT
    LU WWN Device Id: 5 000039 2b1b00c99
    Firmware Version: FH405B
    User Capacity:    250,059,350,016 bytes [250 GB]
    Sector Size:      512 bytes logical/physical
    Device is:        Not in smartctl database [for details use: -P showall]
    ATA Version is:   8
    ATA Standard is:  Exact ATA specification draft version not indicated
    Local Time is:    Tue Apr 29 19:51:02 2014 UTC
    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:  (0x00)    Offline data collection activity
                        was never started.
                        Auto Offline Data Collection: Disabled.
    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:         (  120) 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:      (  87) minutes.
    SCT capabilities:            (0x0039)    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   050    Pre-fail  Always       -       0
      2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
      3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       1034
      4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       10543
      5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
      8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
      9 Power_On_Hours          0x0032   091   091   000    Old_age   Always       -       3668
     10 Spin_Retry_Count        0x0033   253   100   030    Pre-fail  Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       7020
    191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       922
    192 Power-Off_Retract_Count 0x0032   096   096   000    Old_age   Always       -       2479
    193 Load_Cycle_Count        0x0032   061   061   000    Old_age   Always       -       390682
    194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       36 (Min/Max 11/47)
    196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
    197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
    198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
    220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       66
    222 Loaded_Hours            0x0032   095   095   000    Old_age   Always       -       2304
    223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
    224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0
    226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       251
    240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  Offline      -       0
    254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       2285
    
    SMART Error Log Version: 1
    No Errors Logged
    
    SMART Self-test log structure revision number 1
    No self-tests have been logged.  [To run self-tests, use: smartctl -t]
    
    
    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.
    Huh, according to the output, test was passed. I don't know, is that something wrong with /dev/sdc1 partition with the flag Boot, that would prevent OS X from booting, even when the harddrive is detected on startup? I'm afraid the only reason why the drive show up 1 time out of 5 is a hardware failure.
    As for when the MacBook was purchased, I don't know myself, will ask that tomorrow. Almost sure it's at least 2-3 years old. It's an Intel Core 2 Duo, 4GB of RAM with Snow Leopard, so (2009, maybe?).

    Also tried holding Option on boot, then noticed the OS X disk (As well as Recovery) was detected. I chose to boot with the Snow Leopard DVD, the Apple logo appeared, and after a while, the loading icon stop spinning. The hard drive stop, freeze, nothing. The DVD won't boot when the OS X partition is found on boot. I rebooted again, noticed this time the OS X partition was not listed in the bootloader, chose the Snow Leopard DVD, and then it succesfully booted in the DVD. That's weird because the DVD only boot when the OS X partition is not detected (?!?).

    Thank you for the help, I appreciate it.
    Last edited by GameX2; April 29th, 2014 at 09:28 PM.

  9. #9
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Is running fsck -fy on OSX disk from Linux safe?

    The power-on hours are not excessive. The load-cycle count (at 390,000) is rather high. I have read that disks tend to wear out at 600K to 1.2 Million load cycles. It's possible that a ribbon cable is loose. Laptops tend to move around and a loose cable will cause similar symptoms. Try reseating the disk cable at both ends. It's also possible that the drive controller on the disk itself is going bad or the SATA controller on the motherboard is going bad. The fact that multiple power cycles will cause the drive to show up is consistent with a failing chipset.

    Check the corners of the laptop for drop damage. One drop can loosen internal connections.

    Because SMART was not enabled, no previous errors were captured, so you don't have a history of sector errors or relocation. Because you can see the files in Ubuntu makes me think that the directory tree is intact and therefore a disk controller or disk power circuitry is failing.

    Check the serial number of the macbook and see if it still has Apple Care. If so, then make another data backup (verifying the files) and take it to the Genius Bar. The Pro machines tend to get better service.
    Last edited by tgalati4; April 29th, 2014 at 09:40 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  10. #10
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Is running fsck -fy on OSX disk from Linux safe?

    I'm not sure how much free space you need to be able to boot snow leopard (looked around but did not find the exact answer). Your pic shows the drive is almost full.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •