Category: Linux

  • Total: ∞ packages (0 good luck, 1 mistake)

    I’d just like to put this out there for everybody…

    1. Make frequent backups. Maybe every month.
    2. Do not, under ANY circumstances, accidentally try to install Haiku to /dev/sda. Ever.

    Now that the advice is out of the way, it’s story time!

    Yesterday, I was trying to install Haiku to my 512MB flash drive, which, when I plugged it in, got assigned /dev/sdb. The Haiku build system was, at the time set to write to /dev/sda2 (my 3GiB Haiku partition). I deleted the “2” and went on with my business. I ran jam -q haiku-image to build it.
    “Hmm, this is taking a while.”
    “dd, wrote 134 MB to /dev/sda”
    “/dev/sda?! WHAT?!”
    “OH MY GOD!”

    It wrote 134 MB of 0x00s to the beginning of my hard drive, clobbering the bootloader, partition table, and the root filesystem of my Linux installation (/dev/sda1).

    It also got to the “Populating Image” step, so it was happily chugging along writing a Be File System over my entire hard drive and filling it with Haiku data.
    ^C!

    Programs still ran, not all the files on / were lost, and I was in a state of panic.
    One reboot later confirmed the obvious – no more system. Also, no more files in /. The filesystem layout was in memory, and I should have taken the time to recover some of the data before I reformatted.

    fsck told me that /usr was trashed.. /usr is like “Program Files” and more for Linux… Random data written in random places on a volume is… bad 😉
    / was definitely a goner…
    /home somehow survived, guaranteeing that my 8 years-worth of data would stick around for a while longer!
    Fortunately, I had backups from August 15th!
    Unfortunately, they were from August 15th. That means 3 months worth of upgrades to do…

    Restored / and /usr, some of /var (installed package database only), and went to work upgrading.

    500 compiled and installed packages later (the last of which are still going) and Jesus is… Well, for the situation, I have to say he’s done pretty darn well. Kudos, me.

    Once this is all done?

    BACKUP TIME!

    I think I need a NOS.