ssd-ready kernel for PowerPC's (tiger 10.4.11 only)

Discussion in 'PowerPC Macs' started by dinobot, Feb 20, 2013.

  1. dinobot, Feb 20, 2013
    Last edited: Feb 20, 2013

    dinobot macrumors newbie

    Joined:
    Feb 20, 2013
    #1
    Sup dudes. :cool:

    Some of you are going to put SSD's in your powerpc Macs, but it looks like no one of you heard of preparation the OS for SSD.

    I have Ibook G3 700mhz with terribly slow, hot and noisy HDD, so I have same reasons as you to put SSD in it. But! Life of your SSD won't be so long and easy inside your mac if you have not optimize your system berofre. Solid State Drives have limited overwritting cycles, so any byte of solid state disk could be flipped from 0 to 1 (or from 1 to 0) only about 10 000 times. Reaching this limit disk starts to die, and we may prevent it the way I wanna tell you about.

    So, there are two steps. The first one was easy, but the second was not.

    Firs of all, you should to disable swap file to prevent system overwrite it thousand times per hour. If you have enough memory (I'm sure my 640 is enough for web surfing, SSHing and itunes with tiger) it definitely will be ok.

    Go to the /etc/rc with your favourite text editor and root privileges. Find the line says:

    and put # in the beginning to comment it. Than make

    to remove your old swap files. Restart your computer and make sure you have no swapfiles in /private/var/vm any more.

    Second step, atime option for SSD partitions must be disabled. If you mounts with atime, your system will save date and time when any file was opened. It's ok for HDD, but with SSD you will get a whole bunch of write operations you don't ever need. (remember, SSDs are sensetive to often rewrites, but unlimited for read. Don't let your system make your SSD life much shorter than it should be!).

    Unfortunately, Tigrer doesn't support it out of the box. SSD-friendly mount options starts with Leopard, but my friend (cool unix guy and real hacker) helped me to find solution to make tiger 10.4.11 (Darwin 8.11) mount all the HFS systems with noatime.

    Mac OS uses Open Source kernel called Darwin. Sources of Darwin could be downloaded, modified and used for any purposes completely legal (BSD license, like GNU linux systems). My great friend helped me to disable ATIME in hfs file system driver and build it proper way.

    Now we have modified darwin 8.11 (ppc) source and binary ssd-ready kernel, so you may just download it and replace old 10.4.11 kernel with new 2013 built ssd-ready one.

    You may just download mach_kernel file, backup your old one from your sysrtem root, put new kernel and restart your computer. After you will boot, you may run uname -a from terminal to make sure youre boot a new kernel.

    to make sure you have atime disabled, you may do a simple test. Run ls -lut in terminal, then read any file in your folder (cat test.txt if you already head one, or any other file you have), after run lt -lut again. You will make sure that file last read time for file you just read is not updated.

    You can get ssd-ready kernel here. Make sure you run TIGER 10.4.11 either your system may not boot again.

    I may post modified sources later if you are interested in.
     
  2. AlbertEinstein macrumors regular

    AlbertEinstein

    Joined:
    Jan 3, 2013
    #2
    Great work, will try it out when i get a new main machine.
     
  3. dinobot thread starter macrumors newbie

    Joined:
    Feb 20, 2013
    #3
    If you think it make brake your system, you may rename new kernel to mach_kernel.ssd and put it to your system root with the old one (don't replace old with new).

    After that, you may just to switch kernel from mach_kernel image to mach_kernel.ssd image with NVRAM boot option. For my ibook G3 it will look like:

    If your system fail to boot, you need just to reset NVRAM to bring everything back.
     
  4. dinobot thread starter macrumors newbie

    Joined:
    Feb 20, 2013
    #4
    Have anyone tried? Does it work for you as well as for me?
     
  5. dinobot thread starter macrumors newbie

    Joined:
    Feb 20, 2013
    #5
    IMPORTANT update!

    mach_kernel permissions should be -rw-r-r (sudo chmod 644 mach_kernel)
    Owner should be root.

    If kernel permissions are not 644, system won't start.
     
  6. Giuly, Feb 28, 2013
    Last edited: Feb 28, 2013

    Giuly macrumors 68040

    Giuly

    #6
    Actually, a typical modern 128GB SSD lasts 10 years if you write 10GB per day to it.
    Second, turning off swap on a machine with 1GB RAM or so is not that smart. SATA 6GBit/s is about as fast as SDRAM, which makes UltraATA100 about 1/6 as fast as SDRAM - and an SSD will easily saturate that for most anything. This greatly neglects the shortened lifetime, because when that iBook will be gone, the SSD will still be fine, even with swap on.
     
  7. dancevision macrumors newbie

    Joined:
    Jan 30, 2015
    #7
    Request for Repost of Active Link to Download SSD-Ready Kernel

    @dinobot - I've been attempting to use an SSD as the main internal drive for my Powerbook 1998, but I cannot get it to boot. The SSD mounts, but it will not boot as the main startup disk; however, I can get it to boot if I install the SSD as a secondary drive within an expansion bay along with a HDD as the main internal drive.

    If you could repost an active link to downlowd the "ssd-ready kernel for 10.4.11", I'd love to give it a go. Really great that you had success, and I'd be grateful for the repost of the kernel and any updated guidance. Thanks!
     
  8. cpepper macrumors newbie

    Joined:
    May 2, 2015
    #8
    @dinobot : Thank you very much for this article and for enabling the download of the kernel file again! It works great and will increase the life of my mSATA-SSD (with an 2.5''-ATA-to-mSATA adapter) in my iBook G4 !
    As I was afraid not being able to boot, I used chmod 644 mach_kernel and chown :wheel mach_kernel just to be on the safe side.
    Great work and very important to keep the OS X Tiger running on SSD as the noatime option is very important for the life of a SSD.
    It was for sure not too easy to recompile the kernel, and you deserve very positive feedback for doing it!

    Disabling the paging file is IMHO not that important but still a good idea to disable (if there is enough RAM).
     
  9. Cory5412 macrumors member

    Joined:
    May 14, 2004
    Location:
    Arizona
    #9
    This is an old thread, but I just had to reply. This is all terrible advice. Don't do any of it, if you've done it, you should probably undo it.

    If you buy a modern SSD, it'll be able to withstand constant writing at the full speed of the bus for probably longer than you are all alive. Even without TRIM, most SSDs will do wear leveling automatically without the intervention of the operating system.

    The 10,000 rewrite cycle applies to things like flash drives and super-small SD and CF cards from 2007. Don't try to boot Mac OS X from anything of that nature to begin with. (Though, newer flash disks and SDHC/SDXC and CF media have also overcome this limitation as well, they don't all have wear leveling and TRIM, which make the SSD experience much better.)

    If you disable the swapfile on your Mac, it will crash and burn, badly. Mac OS X expects, nay, needs that file to be there. It's not like the System 7 days where if you ran out of memory, it just declined to launch the app. It'll launch the app, run out of memory, and you'll almost certainly get the kernel panic screen, and everything you were doing will be lost.

    Disabling access time datestamps is less critical, but it will probably break your backup software and syncing routines in any apps like dropbox/box.net/skydrive/bittorrentsync.

    Plus, disks (even solid state disks) are probably best thought of as consumables anyway, because they've long been the most breakable part of a computer, and you should be doing backups of your system and the data on it if they're of literally any importance to you at all, whatsoever.

    ----------

    To add to my previous thoughts: Wow, I didn't even notice the link to the mach_kernel file, with no context whatsoever, from an untrusted source, with no mention of what was done to it.

    Given that the kernel is literally the root of your machine, this could be how your system gets rooted and starts spewing spam.

    From a security standpoint, that alone makes this a really really bad idea.

    Good luck and my condolences to anybody who does this, especially given that if you're running Mac OS X 10.5 on the machine into which you put an SSD, the faulty ram handling in Mac OS X has almost certainly got you swapping quite frequently to begin with. You'll need to reboot or do a memory purge nearly daily, even on a system with a whole boatload of RAM, like a G5 with 8 or 16 gigs installed.
     

Share This Page