Articles in the Uncategorized category

  1. Migrated This Blog From blogger.com to Blogofile

    Thu 30 December 2010

    Until now, I was hosting my blog on Google's blogger. I switched to using Blogofile. I wanted to have more control over my content and the layout.

    I had many issues with the blogger blog post editor, resulting in ugly posts with too much white space, strange fonts and fonts sizes. Also, showing programming code examples with syntax highlighting is not possible with Blogger. As a nerd, I'm a control freak and I was not in control enough over my blog on blogger.

    So I first started thinking about hosting my own wordpress site, but soon I concluded that this is not what I want. Wordpress has similar limitations as blogger and I no longer want to be depending on some special blog software without direct access to my content. So after a tip of a friend of mine I started to look at blogofile. Blogofile generates a static HTML website, which is a real benefit if you are hosting your own site. The most important benefits are:

    • Security
    • Performance
    • Ownership

    Security

    Most websites get hacked because they are basically live applications accessible from the Internet. Applications can contain bugs. If it contains security related bugs, you are toast. Software like wordpress has an awful track record regarding security. Basically, if you are running a wordpress site, you must be in a state of constant fear. You also constantly have to upgrade to the latest version within a short time frame or you will be hacked. I think that wordpress is a security hazard.

    Blogofile generates plain text static HTML web pages. There is no dynamic content and thus no program running, except for the web server itself. There is no serious security risk.

    Performance

    Plain text web sites are fast. It is just data. When a visitor requests some web pages, there is no application running, laying pressure on the CPU, just plain data transfers. I bet you could host this blog without much performance problems on a recent smart phone like an Android or iOS device.

    Ownership

    All content is stored in a text-only format that can always easily be transformed into some other format. I use markdown syntax to write new blog posts. But plain HTML can also be used. Comments can be posted through discus. It seems however that I will loose all existing comments of my original blog. New comments are showing up without a hitch, but existing imported comments do not show up. I do want to preserve them but how? I'm not sure yet. I'm thinking about incorporating them in my posts as an appendix.

    The whole process of migrating to blogofile

    All steps taken so far as to migrate away from blogger:

    1. Create a wordpress installation
    2. Export blogger blog.
    3. Import blogger blog in wordpress installation
    4. 'Import' the converted wordpress blog to blogofile 'format' using wordpress2blogofile.py
    5. Hack, script and fight to change all URLs so they are correct for the new site.
    6. hack, script and kill to get the old comments to show up, to no avail.
    7. Learn markdown
    8. Learn blogofile
    9. Create + steal a new website design and have to learn css and html all over again.
    10. Convert all posts from html to markdown.
    11. Fix all converted posts where necessary
    12. Put all external hosted content into a local folder and fix all links.
    If you have any comments email me, see the About page for contact details.
  2. 'Linux: Using Disk Labels to Counter Storage Device Name Changes'

    Mon 22 November 2010

    My router decided to change the device name for some USB storage devices. So /dev/sdc was swapped for /dev/sdd and vice versa. The result was some file system corruption on /dev/sdc, because it was used on a remote system through iSCSI, using a different file system from /dev/sdd.

    With regular internal disks, attached with PATA, SATA or SAS, the chances are very small that such an event will occur, but it is possible, especially if you start adding/subtracting disks. With USB devices the risk is substantially bigger.

    To prevent your system from mixing up drives because there device names change, use file system labels. All information that follows have been stolen from this location. Since this blog is also my personal notepad, the relevant bits are reproduced here.

    There are three steps involved, the third being optional:

    1. add a label to the file system
    2. add the label to /etc/fstab
    3. update grub boot manager (optional)

    Add a label to the file system

    Setting a label when the file system is created:

    mkfs.ext3 -L ROOT /dev/sda1
    mkfs.xfs -L BIGRAID /dev/sde
    

    Set label for existing file system

    EXT3:

    e2label /dev/sda1 PRIMARY_ROOT
    e2label /dev/sda1
    

    XFS:

    xfs_admin -L DATA1 /dev/sdf
    xfs_admin /dev/sdf
    

    Set label for swap partition

    mkswap -L SWAP0 /dev/sdb5
    

    add the label to fstab

    Example of contents of fstab:

    LABEL=ROOT          /         ext3    defaults        1 1
    LABEL=BOOT          /boot     ext3    defaults        1 2
    LABEL=SWAP          swap      swap    defaults        0 0
    LABEL=HOME          /home     ext3    nosuid,auto     1 2
    

    Update the grub boot manager

    title server
    root (hd0,0)
      kernel (hd0,0)/vmlinuz ro root=LABEL=SERVER_ROOT0 rhgb quiet
      initrd (hd0,0)/initrd.img
    
    Tagged as : Uncategorized
    If you have any comments email me, see the About page for contact details.

Page 13 / 40