My hard drive: death by Terminal

Discussion in 'macOS' started by narco, Dec 17, 2006.

  1. narco macrumors 65816

    narco

    Joined:
    Dec 9, 2003
    Location:
    California.
    #1
    So after getting tips from three different sources on how to delete this pesky 20GB text file, I got a lot of Terminal suggestions. Everything worked fine, but of course, something had to go wrong.

    While I was logged in as Root, I typed the command to delete the hidden file (which I made sure is harmless) but then I got a kernel panic. Then I tried to restart and got another kernel panic shortly after the grey apple appeared. Then I tried to boot from the Tiger disc and got another kernel panic in the same place. THEN I tried restarting in Safe mode, but the fans on my 2ghz G5 kept getting louder and louder until it sounded like it was going to explode.

    Luckily, I have a second internal drive to boot from. My main drive is unplugged, but it has 90GB of music (luckily, i backed up 80GB of it). Before I take it to the Apple reseller tomorrow, is there anything I can do here?

    Any help will be appreciated. Thanks!

    PS: Before anyone asks, my music is all legal. Most of it is ripped from vinyl and I went through great lengths to add album artwork and all proper tags. I'd love to avoid doing that again.
     
  2. vniow macrumors G4

    Joined:
    Jul 18, 2002
    Location:
    I accidentally my whole location.
    #2
    Boot from a Linux live CD and delete it from there?
     
  3. narco thread starter macrumors 65816

    narco

    Joined:
    Dec 9, 2003
    Location:
    California.
    #3
    I know absolutely nothing about Linux, so where would I get this live CD? I miss the good old days of holding down the spacebar to bring up the Extensions manager. At least that I could somewhat figure out on my own!
     
  4. vniow macrumors G4

    Joined:
    Jul 18, 2002
    Location:
    I accidentally my whole location.
    #4
    Try one of the Ubuntu ones here. I advise the torrent since it goes faster usually. Burn to disc, boot from it and navigate to the file on your hard drive from the Linux desktop.

    http://ftp.ussg.iu.edu/linux/ubuntu-releases/edgy/

    Edit: They all will say install but the way Ubuntu works is it boots to a live session and you can optionally install it from there.
     
  5. apfhex macrumors 68030

    apfhex

    Joined:
    Aug 8, 2006
    Location:
    Northern California
    #5
    I read stories like this posed here every day, and it seems too strange to be a coincidence, but I don't think it's possible to do anything from the Terminal that would cause the machine to KP at startup (before the OS loads). Sounds to me like a freak disk error, or perhaps failure of some other hardware in the machine.

    FYI you shouldn't need to log in as root to delete from the Terminal, you can use sudo instead before the rm command (if that's what you were using).
     
  6. narco thread starter macrumors 65816

    narco

    Joined:
    Dec 9, 2003
    Location:
    California.
    #6
    I ran Disk Utility from the Tiger disc and it repaired the errors on my main drive. I used it and restarted a few times after that, but it wasn't until I logged in as root and started deleting stuff with Terminal commands when the kernel panics began.

    I'll definitely try the linux live cd and see if i can at least access those files. if i could save them to one of my external drives, i'd be totally stoked.
     
  7. tyr2 macrumors 6502a

    tyr2

    Joined:
    May 6, 2006
    Location:
    Leeds, UK
    #7
    Could you give more details about what you're actually deleting. If the file is owned by root and you can't delete it as the normal user acount then there's a fair chance it shouldn't be deleted. It could be a virtual memory swap file or somesuch.
     
  8. narco thread starter macrumors 65816

    narco

    Joined:
    Dec 9, 2003
    Location:
    California.
    #8
    The short version:
    I had the program Soulseex (a Soulseek client) log all console activity, so that log file turned into a 20GB file. I tried deleting it, but every time I did I'd just get a KP. So i did all these Terminal commands that people suggested, and here I am.

    For a detailed version, here's the thread:

    http://forums.macrumors.com/showthread.php?t=261366
     
  9. mac-convert macrumors 6502a

    mac-convert

    Joined:
    Nov 2, 2006
    Location:
    Are we there yet?
  10. Angrist macrumors 6502

    Joined:
    Mar 11, 2005
    Location:
    MI or NJ
    #10
    Well,
    In my experience (3 macs for me, 4 more in my family) kernel panics are almost always hardware related.

    From your symptoms, I'd suspect a flaky HD. Since it looks like you've already tried Disk Utility ... if you can get your hands on a copy of Alsoft's DiskWarrior, it's worth every penny. Fixes HD / filesystem problems that fsck/diskutility won't touch.

    Other simple stuff sometimes works too, disconnect the HD cables, shoot them with a can of air, and re-seat them. Do the same for you RAM, and run a ram checker (memtestosx works well).
     
  11. Fleetwood Mac macrumors 65816

    Fleetwood Mac

    Joined:
    Apr 27, 2006
    Location:
    Canada
    #11
    Can't you have both disks plugged in and start up holding Option (to open the purple OpenFirmware bootloader thing) and select the spare bootup disk? Then you could just copy the music all in OS X. I might be missing something here though...
     
  12. mac-convert macrumors 6502a

    mac-convert

    Joined:
    Nov 2, 2006
    Location:
    Are we there yet?
    #12
    Actually, the problems the OP has started by trying to delete a system log file in the terminal app I think. See the other thread referenced above for all the snarfed attempts.
     
  13. tyr2 macrumors 6502a

    tyr2

    Joined:
    May 6, 2006
    Location:
    Leeds, UK
    #13
    Ok try this "sudo cat /dev/null > /path/to/logfile". That will empty the log file without deleting it or changing the inode so if anything is holding it open then it can still write to it.

    Edit:
    Also if you want to see what is using the file you can use lsof. For example:

    $ sudo lsof | grep console.log
    loginwind 119 gordonj 8w REG 14,11 4466 1064876 /Library/Logs/console/501/console.log
    -----------^^^ - use this number in the next command
    then

    $ ps aux | grep 119
    gordonj 119 0.0 -0.2 354396 4084 ?? Ss 12:15PM 0:00.22 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console

    So we can see in my case the 'loginwindow' application is using 'console.log'.
     

Share This Page