Using grub2 to recover your system

grub2 is hai­led as the all new, super modu­lar cure-all remedy for all boo­ting pro­blem you’ve had, have and will have. At least that’s the way the deve­l­o­pers and some enthu­si­asts see it, whe­reas most blo­kes who’ve actually had to use it with more than arrow keys and enter will paint a slightly dif­fe­rent picture.

The thing with grub2 is that even though in theory it sounds like the end of all things boo­ting, it’s about as well-documented as the ques­tion for life, the uni­verse, and everything.

And as I today had to try to fight my way through goog­ling for necessary infor­ma­tion again, I’d thought I’d create a quick step-by-step refe­rence with all the most inte­res­ting bits you’ll ever need alre­ady there.

Thusly, the ingre­dients nee­ded to resur­rect your com­pu­ter with grub2. The gist is that you have the goal of boo­ting one spe­ci­fic ope­ra­ting sys­tem on your com­pu­ter, from wher­ein which you’ll use wha­te­ver methods you deem necessary to update your grub in the “right way” — usually a down­grade to an older ver­sion and wait­ing for the dust to blow over.

  1. A boo­ting grub2. If your grub2 alre­ady fails to boot because of some ran­dom error, you need to get a grub in smel­ling dis­tance of your BIOS. One of the most pro­ven methods is to
    1. Down­load a USB res­cue image like grml (usually from Your Other Com­pu­ter or that of some­body else)
    2. Put it on an USB stick (dd if=grml-variant_version.iso of=/dev/sdx in most cases, with appro­pria­tely cho­sen variables)
    3. (Re)boot, even­tually adjus­ting the prio­rity for your USB HDD/USB key

    And that’s it, you’re in a grub. Also note that it’s recom­men­da­ble to have an USB stick with a res­cue image lying around for the times when you can’t just easily down­load it.

  2. Enter the com­mand line/shell mode by pres­sing ‘c’.
  3. Do an ‘ls’, which will give you a lis­ting of reco­gnized devices. Doing an ‘ls device’, e.g. ls (hd0,1) will give you more infor­ma­tion about that device.
  4. If the infor­ma­tion by your ls isn’t com­plete, you will have to load some modu­les (by using insmod modulename). Here’s a checklist:
    1. If you do not see any other devices which look like your hard drive(s), e.g. you only have an (hd0) device from your USB medium, then load a device dri­ver. They will allow you to find the actual devices. Exam­ples include:
      • bios­disk
      • scsi
      • fs_uuid
      • pci
      • raid
      • mdraid
      • dm_nv
    2. If you have devices, but no par­ti­ti­ons, you’ll need a par­ti­tion dri­ver. It seems the default grub con­fig does not load any par­ti­tion dri­ver, and debug­ging this is just a bit annoy­ing. But there’s two easy choices for most people:
      • Load the module “part_msdos”.
      • If this doesn’t help, try “part_gpt”.

      These are the two most com­mon par­ti­tion tables (at least for next to ever­yone rea­ding this guide in need) and should help your grub find its par­ti­ti­ons again.

    3. Even­tually, you will also have to load your file­sys­tem dri­vers. I pre­sume you alre­ady know which those are, but for the sake of completion:
      • Almost all Linux use ext2
      • Most cur­rent Win­dows will use ntfs, but fat is also an option.
      • Mac users will use hfsplus for newer sys­tems, hfs for older ones.
    4. The next step depends on exactly what you want to do. There’s a fork in the road — if you just want to load your pre­viously unboo­ta­ble grub, you will try to load its con­fi­gu­ra­tion file, else you’ll try to boot your ope­ra­ting sys­tem kernel.

    5. To search for a file, you use the search -f filename com­mand, which will give you results on where files of that name are stored. Use root device to set the resul­tant device as the root device for your fur­ther ope­ra­ti­ons. If you only want to load your old grub con­fig, type in configfile filename, whe­reas filename will usually be some­thing like /grub/grub.cfg or /boot/grub/grub.cfg.
    6. Should this fail to resolve your pro­blem, or not be what you’re aiming for, you’ll need to find the ope­ra­ting sys­tem. For most Linu­xens, you’ll pro­bably have a file cal­led /vmlinuz or /boot/vmlinuz to search for. For Win­dows ope­ra­ting sys­tems, look for /Windows/win.ini. For Mac: no clue. When found, set your root device (with root device).
    7. Now methods will become diver­gent, as ope­ra­ting sys­tems dif­fer in the way of boo­ting them.
      Linux
      1. kernel kernel_filename
      2. initrd initrd_filename [most cur­rent ker­nels come with an “initial ram­disk” hol­ding modu­les etc.]
      3. boot — if all goes well, you’re set.
      Win­dows
      1. chainloader +1
      2. boot
      MacOS
      Pro­bably the same as Win­dows, using the chainloader.

    And that’s it. It should cover most cases you’d need to res­tore your capa­bi­lity of boo­ting your ope­ra­ting sys­tem. You’ll pro­bably want to fix/install your boot­loa­der after this, though.

    A hel­pful tool for debug­ging your cur­rent grub state is probe, which will allow you to check what dri­vers are assi­gned to devices.

D&D Characters: Shamorn Fallenheart, Tiefling Bard

As a bit of a side occupa­tion, I like to engage in some cha­rac­ter design for role-playing games, as it just comes as a natu­ral exten­sion of being a hobby-ish wri­ter person.

Thus, I pre­sent: Shamorn Fal­len­he­art, a tief­ling bard from High Imaskar.


Birth — and over misgivings

Shamorn was born in Gheld­an­eth, the fading Mula­nian metro­po­lis of High Imas­kar, and his par­ents belie­ved in the pro­phe­cies sta­ting Shamorn to bring forth bet­ter times for the tief­ling folk of the Gheld­an­eth slums. Being rai­sed in a com­mu­nity of hired hands to accom­pany adven­tu­rers on dan­ge­rous tre­a­sure hunts through the depths of the sun­ken city, hopes were laid on him, and him alone, to libe­rate them from this life of unof­fi­cial slavery.

Early life

Our young tief­ling was always a bit pam­pe­red. The male role models of the com­mu­nity were often too busy get­ting kil­led on a foolish quest, as was Shamorn’s own father — shortly before his fourth birth­day. As it were, there was none of the usual goading and tes­ting a tief­ling endu­res as part of gro­wing up. The con­se­quen­ces of this, as well as the pam­pe­ring he recei­ved by his mother and other “faith­fuls”, would be dire indeed.

Thus Shamorn grew to be a young adult, hel­ping out ever­y­where in the com­mu­nity, wit­hout ever taking up a real job. He had many on and off teachers, ver­sing him in skills as @skills and the heri­tage of the tief­ling race, trai­ning him in the use of wea­pons and tel­ling sto­ries of heroic deeds throug­hout time.

Con­stantly sur­roun­ded by an app­re­cia­tion for life, for hero­ism, the history and cul­ture of his people and a will to bring good to them, it came as a great sur­prise to many that Shamorn Fal­len­he­art, Pro­phe­sied Saviour of the Gheld­an­eth Tief­lings, came to start trai­ning to be…

a bard.

There was a wan­de­ring Elven Bard in Gheld­an­eth at the time, and Shamorn choose to app­ren­tice him­self to him, belie­ving that beco­m­ing a bard, a herald of their people, would be worth much more than sim­ply slaugh­te­ring any would-be opp­res­sors or being a lea­der to guide the people to their Pro­mi­sed Land.

As was to be expec­ted, his deci­sion did not sit well with some, if not most, of his elders. His mother came just short of disin­heri­t­ing him, and he was fore­ver bran­ded as a wimp by most others. Still, there were some people who still belie­ved in him, and he mana­ged to stay in the com­mu­nity, even though ever­yone tried to for­get about any kind of pro­phesy laid upon him.

The turning point

His app­ren­ti­ce­ship was going well, all things con­side­red. But his teacher, unbe­kno­west to him, was a bit of a brag­gart and igno­rant, that is to say: not a very good bard. Still, Shamorn mana­ged to mas­ter his natu­ral graps of the Arcane under his tutor­ship, even though the social values might have been slightly distorted.

Sadly, this dis­tor­tion and the infu­sion of heroic tales led to an unfor­t­u­nate inci­dent. A rough band of tre­a­sure hun­ters, with a fierce repu­ta­tion for their harsh effec­tiv­en­ess and rumours of a bru­tal and unrelen­ting man­ner towards oppo­si­tion, sought out their enclave to hire some of their men for help. So, after a few minu­tes of shouting, waving of wea­pons and dragging people out of their hovels, Shamorn thought it was time to act.

Bra­vely step­ping for­ward, he con­fron­ted the lea­der of the sca­ven­gers, deman­ding of him to cease these des­pica­ble acts and appealing to his good sense, as a man, to respect his people’s wishes.

The screams as the leader’s mini­ons star­ted slaugh­te­ring the women and child­ren are still stuck in Shamorn’s head. He still only has vague memo­ries of that moment, but there is one thing he is quite con­fi­dent of:

As his mother’s life­l­ess body was thrown in front of him, crump­led up in a heap, he snap­ped. Shamorn went into a rage, slamming into the mini­ons and fight­ing them fier­cely. It see­med the demon in him had taken con­trol, for he was full of laugh­ter at the slaugh­ter he was cau­sing, taun­ting his enemies as he smas­hed their faces in with his $wea­pon or embed­ded his dag­gers into their hearts, even just rip­ping into them with his claws and bit­ing as he went along.

It did not take long for him to cut through the mini­ons, emer­ging bathed in blood, eldritch powers abound and fla­mes crack­ling around his body. His Elven mas­ter bard was asto­nis­hed at the dis­play, and reco­gnized the poten­tial of a war­lock in him should he have even been trai­ned thusly. As it was, the teacher pre­fer­red to cower in fear and observe what hap­pened next.

Shamorn con­fron­ted the lea­der of the sca­ven­gers who was just stan­ding there, sho­cked to his core.

“This is what hap­pens when you try to com­pel my folk, human!” the bard sta­ted in an almost neu­tral voice, only a hint of a burning dark­fire notica­ble in the voice. And with that, he slew the lea­der of the group that brought death to his kin.

And as if by mira­cle, Shamorn imme­dia­tely cal­med down to his usual, naive self. The only hint at his mons­tro­sity was the fact that he sur­veyed the slaugh­ter he had cau­sed wit­hout fear, shame or dis­gust. Loo­king around him, he found few people left alive. Some were cower­ing inside their hovels, eit­her hiding their faces or sta­ring out at him with fear. Others seem to have run a way, and it was eerily silent.

Shamorn clea­red his throat. “My mas­ter, I will be lea­ving now. Do you wish to accom­pany me?”

His mas­ter, still shaking slightly, replied “No, my app­ren­tice. I do not think that you need me any fur­ther. Con­sider your trai­ning complete.”

And with these short words, the recently orpha­ned Shamorn Fal­len­he­art set out into the Realms, ven­tu­ring forth to herald his people — and to leave this bligh­ted home which has been cur­sed by his deeds.


The cha­rac­ter sta­tistics will fol­low as soon as I have access to the rele­vant docu­ments again. I might also write a short story or two detailing the back­ground or later adventures.

Vortrag: Datenschutz und –sicherheit in MMOs

Auf der RPC 2009 habe ich einen Vor­trag über Daten­schutz und –sicher­heit in MMOs gehalten.

Wohl gemerkt sei der Vor­trag nur als eine Art Ein­füh­rung zu ver­ste­hen; rich­tige Mög­lich­keit der For­schung bie­tet sich lei­der nicht, da die Her­stel­ler nur unzu­rei­chend koope­ra­tiv sind.

Down­load­link für die Folien: Daten­schutz– und –sicher­heit in MMOs
Es gab keine Ton– oder Bildaufnahmen.

OpenChaos-Vorträge: Digitale Verhütung (de)

Von Sep­tem­ber bis Novem­ber gab es im Chaos Com­pu­ter Club Colo­gne die Vor­trags­reihe „Digi­tale Ver­hü­tung” im Rah­men des Open­Chaos. Diese Reihe rich­tete sich an den tech­nisch weni­ger begab­ten Nut­zer; sie sollte der Sen­si­bi­li­sie­rung gegen­über den Gefah­ren die­nen, wel­che einem in der moder­nen Daten­welt dro­hen, und was man zu sei­nem Schutz davor machen kann.

In der Reihe habe auch ich mehr­fach vor­ge­tra­gen; zum einen habe ich, zusam­men mit mar­cel, den Vor­trag „Sichere Kom­mu­ni­ka­tion” gehal­ten. Dort haben wir dar­über gere­det, wie ein­fach es manch­mal sein kann, die Kom­mu­ni­ka­tion ande­rer abzu­hö­ren, und was man dage­gen tun kann, damit das nicht mehr so ein­fach geht. Dabei wur­den all­ge­meine Grund­la­gen der Kom­mu­ka­ti­ons­ver­schlüs­se­lung behan­delt, sowie diverse Metho­den der Ver­schlüs­se­lung und deren Imple­men­ta­tion in popu­lä­ren IM–Pro­gram­men.

Dann habe ich noch im Novem­ber einen Teil des Meta­vor­tra­ges „Ver­schlüs­selte Daten­grä­ber” gehal­ten; dort ging es, wie schwer zu erra­ten ist, um Fest­plat­ten­ver­schlüs­se­lung. Ich über­nahm dabei den letz­ten Teil­ab­schnitt, „Umge­hung” und beschäf­tigte mich genau damit. Grund­la­gen, Aus­nut­zen von Nut­zer­schwach­stel­len sowie die Umge­hung auf tech­ni­scher Ebene wur­den ange­ris­sen und auf ein­fa­chem Niveau erklärt; eine detail­lierte Erklä­rung, oder gar Bei­spiele, waren nicht vorgesehen.