Zap's Digital Lighthouse
|
|||||
| |
Categories:
Archives: |
|
|
Mon, 20 Feb 2012
Going for simple FreeBSD instead of FreeNAS
So, I have been playing with my small soekris net6501-70-based NAS device for home. Lots of things have happened since I last blogged about this:
So, lots is happening with my small NAS server. More on this next weekend. /FreeBSD | Posted at 01:01 | permanent link
Upgrading FreeBSD from 8.2 to 9.0
I have just finished upgraing one of my FreeBSD machines from 8.2 to 9.0, rebuilding from source as explained in the FreeBSD handbook here. One of the painful steps in upgrading a FreeBSD machine, is the mergemaster step, as it forces you to go through a whole bunch of files, just to accept CVS tag changes... or so I thought !!! Turns out that there are optional flags to mergemaster, and running "mergemaster -FiU" does pretty much what I've been hoping mergemaster to do. Yay! /FreeBSD | Posted at 00:41 | permanent link Sun, 12 Feb 2012
FreeNAS, ZFS, and external USB disks
I have set up my Soekris net6501 with the latest beta of FreeNAS 8, FreeNAS-8.2.1-ALPHA-r10110M-x64. I installed 4 external 1 TB external USB disks on the machine, and set them up as a RAID-Z ZFS volume in FreeNAS and set about exporting CIFS and NFS partitions to the rest of my household. FreeNAS 8 is going to be an excellent product when it releases v.8.2.1... I look forward to seeing it in use in the coming months. However, I have received the following FreeNAS alert twice now: The ZFS volume status is UNKNOWN: One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffected.Determine if the device needs to be replaced, and clear the errors using 'zpool clear' or replace the device with 'zpool replace'. Interestingly enough, both times the error was corrected without any problem and the ZFS pool was back in HEALTHY state when I looked into it, but still that message sounds fairly omnious. Could it simply come from the fact that the drives go to sleep and are sometimes not ready when ZFS tries to access them (hence they somehow timeout)??? Or is it something more serious and one of my (new) drives is about to go south? I wonder whether there are any recommendations against setting up a RAID-Z zpool across external USB drives that can go to sleep (and hence take 30-60 seconds to wake up). Hmmmm, I should investigate ZFS best practices and see if USB drives are usable this way. Else, I'll just stick with UFS with rsync for replication/backup. More next weekend :-) /FreeBSD | Posted at 23:34 | permanent link
4 wins in a row for the Montreal Canadiens
I listened to the hockey game between the Montreal Canadiens and the Toronto Maple Leafs last night on ''internet radio''. Montreal won 5-0 which gives them a 4-games winning streak (haven't seen too many of these this season!). NHL hockey is fun, but it's always particularly fun when Montreal beats Toronto or Boston :-) (Now, of course, these guys probably feel particularly smug when they beat the Canadiens, but I'm not going to worry about that :-) /misc | Posted at 03:14 | permanent link Fri, 10 Feb 2012
Using virtual machines at home
I have been architecting, recommending, and specifying the use of irtual machines at work for years, but I had never really used them seriously at home yet until recently. I had looked into using either Parallels or Fusion on my Macs to run Windows seamlessly, but in the end had always reverted to just using Apple's bootcamp, which always did the job for what I needed (except for the @!$&#^!%# graphics drivers in bootcamp which never seemed to be up to snuff). However, given my recent purchase of a decent PC, I looked into the possibility of running FreeBSD in a virtual machine to take advantage of the CPU speed and sizable RAM to compile kernels for some of my smaller machines faster (running a whole buildkernel buildworld installkernel installworld cycle on a Soekris net4801 takes over 24 hrs which isn't fun). I investigated various options, but it turns out that the best/most convenient is to run the vmware player under Windows 7 on my PC... using that, I can install FreeBSD 9 in either 32-bit or 64-bit mode, and just "play" whichever version of FreeBSD I need to run tests (or compilations) in a window. There is something inherently fun in having FreeBSD boot and discover the hardware of the virtual machine. Quite useful, quite powerful... just fascinating. Of course, we are living in a world where one can run a full PC emulator written in javascript in a browser, and boot linux onto it, as I have blogged about recently here. The IT world is fascinating: every 5 years we reinvent the impossible. /software | Posted at 01:03 | permanent link Mon, 06 Feb 2012It's nice to be able to watch Superbowl XLVI on TV, right here in Paris. The TNT channel W9 is showing the game direct from Indianapolis. It's a bit late (actually, it was already tomorrow here in Paris, as the game started :-) but it's quite nice to watch! 2nd quarter's almost over, and the NY Giants have been dominating the game from the start... but the score is only 9-3: the Patriots still have a chance if they get their act together. ...it is cold in Paris (-5 Celcius), so it's nice to watch the game under a warm blanket... I may drift to sleep during the halftime show though: my alarm clock is set for 04:40 in the morning. Update 1: 10-9 for the Patriots at the end of the 2nd quarter. Hey, game's not over! Not the time to fall alseep yet! /misc | Posted at 01:37 | permanent link A quick follow-up to my recent blog entry about identity servers on small home networks:
/FreeBSD | Posted at 00:13 | permanent link Sun, 05 Feb 2012By the way, just in case anybody wanders here and is curious as to whether anything I write here is related to personal hobbies or work, let me state explicitly that I do not intend to blog about work-related topics or express any work-related opinions here. Work-related social networking belongs on work-sanctioned forums or communities... so this blog is purely about personal stuff and interests, and any opinions expressed here are my own. /notwork | Posted at 23:47 | permanent link FreeNAS 8 is a nanobsd configuration, based on FreeBSD 8.2.
In order to boot FreeNAS 8 on my Soekris net6501 under the amd64 image of FreeNAS, one
needs to rebuild the FreeBSD kernel that is at the heart of FreeNAS with the line
" Therefore, I used the instructions from the FreeNAS Forums here
to set up a VMware virtual machine running FreeBSD to setup the FreeNAS sources,
adjusted the kernel configuration file in " FreeNAS 8 seems to look good on the net6501 and I am able to set it up with 2 external 2 TB USB disks partitioned with ZFS. For some strange reason, the FreeNAS 8 website seems to call for at least 6 GB of RAM to run it with ZFS, but my 2 GB net6501 seems to do just fine so far. So, I just need to complete the set up of my FreeNAS box, export one of the disks through CIFS, NFS, and rsync, and set up a regular backup from disk1 to disk2. Once that runs fine, I can probably connect a 3rd 2 TB drive to that net6501, and set up some form of RAID-5 between the 3 drives (with snapshots, perhaps I don't need the weekly backup from disk1 to disk2, as I normally do on my NSLU2). FreeNAS seems like a winner so far. More info later. Miscellaneous comments & ramblings:
Anyway, enough for tonight... good night to all. /FreeBSD | Posted at 23:28 | permanent link Thu, 02 Feb 2012
Compilers in the Open Source world
When Gnu started, way back, one of the first bricks to be laid out in the open source building, was the gcc compiler. Okay, first there was emacs, but that was always a bit of a peculiar animal (to this day, I will sometimes use alternatives such as Gnu Zile instead of plain old emacs). So, gcc was one of the first bricks that led the open source edifice to be built: compilers were always expensive and complicated software packages before that, but then suddenly, one could compile C code freely, and the compiler wasn't too shabby either: being developed by a large group of individuals from industry and academia, it produced very decent code and its optimizer generated pretty fast code too! (I remember using gcc on a project in 1990 because the code it generated on our project under ultrix ran quite a bit faster than the code generated by the native ultrix compiler). So it's a bit strange these days to see that there are a number of alternative compilers being used by my favorite open source projects (notably FreeBSD): the old pcc is back, and FreeBSD seems to favour the clang compiler (see also this comparison). Of course, there's also the question of which language to code in: C, C++ (there's a new 2011 flavour of that), Objective C (hey, isn't everyone doing an iPhone app these days? :-), Java, Scheme, python, Ruby, or any number of weird and wonderful languages. Even 'lowly' Javascript is geting quite powerful... Fabrice Bellard has written a PC emulator in it that's powerful enough to run linux in your browser! Anyway, lots of possibilities. Just have fun coding! Update: take a look at the TIOBE Programming Community Index of language popularity. /software | Posted at 01:06 | permanent link Wed, 01 Feb 2012I still purchase music CDs and DVDs -- I guess that makes me somewhat of a dinosaur. I do listen to music online (through Spotify) which allows me to listen to a whole bunch of tunes that I do not have at home but fondly remember from the '80s, the '70s, or even earlier. I also rent movies in iTunes to watch on my iMac or my PC... however, on iTunes, I only use prepaid cards: I don't like leaving my credit card number for recurring purchases... especially since I find that Visa and MasterCard will agree to a recurring credit card charge even if the credit card expiry date has passed. It used to be that you would need to submit your credit card info again, once it has expired, but no longer: they'll just charge you anyway. The first time this hit me was with Apple's MobileMe service: I had let my credit card lag beyond expiration, since I did not intend to renew for one more year, but they still charged my card. Annoying to say the least: clearly not a implementation of the Principle of least astonishment. :-( Anyway, this being said, when watching movie content, I should ideally set up a
Mac Mini or some sort of Apple TV in the living room so that I can watch rented movies
(i.e. downloaded content) in the comfort of the living room. Haven't done that yet. /misc | Posted at 23:33 | permanent link Sun, 29 Jan 2012Food for thought: I've been thinking of rolling my own FreeBSD-based replacement for my old Linksys NSLU2 NAS devices on my home network, based on my recently purchased Soekris net6501 server. However, I have just found a very nice little device on the internet, the HP ProLiant MicroServer which seems quite nice: 4 SATA drives, a dial-core 1.5GHz AMD processor, up to 8 GB of memory in 2 simple DDR3 DIMM slots, 1 Gigabit Ethernet port, and a rather small footprint. The datasheet is available here. It is 275-300 EUR (before VAT) on the French HP site. That's less than a net6501. Hmmm. /hardware | Posted at 15:21 | permanent link Fri, 27 Jan 2012
What are people using for small identity servers at home?
So, on my home network I have:
and various other odds and ends. However, it strikes me that I do not have a small and simple identity server, where I could define user accounts for all of my various devices and OSes (Windows, Mac OS X, FreeBSD, and probably some Linux also). What do people use? NIS yellow pages? that seems too unixoid and will probably not help with the Windows machines. Some sort of Microsoft Active Directory? Through Samba? that feels too microsofty perhaps. Is there something that bridges the gap? Going beyond my little home network, is there something that would let me be accepted as an OpenId authenticator? Also, something I could use to allow logins into my machines hosted outside of the home network. Hmmm. Over the years, we have gotten pretty good at doing IP networks, file sharing, printer sharing, web serving, and even web services and the like... but we are still struggling with having some form of simple authentication mechanism standardized. Probably because it is hard to have trust in authentication mechanisms, and especially the quality of the data they contain(*). Anyway, that's another interesting weekend project. (*) Perhaps we are setting the bar too high? I do not need strong authentication with non-repudiation and all that jazz... I would like a simple userid/password mechanism that would return something like the old unix uid/gid, but in 64-bit range, and I would like it to be easily integrated with Windows, Unix, and Mac OS X. Hmmm... fuzzy requirements... it's always more complicated than it looks like. What are people using out there? Any solid and usable public domain reference implementations I could look at and implement? Would Radius fit the bill? /FreeBSD | Posted at 02:28 | permanent link
Setting up a new NAS device at home
For the last few years, I have been using a couple of Linksys NSLU2 NAS devices coupled with external USB disks for shared storage across my home network. I find that this works quite well to store files from my Mac, Windows, and even FreeBSD machines. One of the NSLU2 is unslung and runs an rsync daemon that I use to save files from my various FreeBSD machines. The NSLU2 is a nice device, but it had become fairly old (no gigabit ethernet, limited expandability of the software, etc). So I have been meaning to set up a replacement. I have decided to use a Soekris net6501 to build my own little NAS box, using a couple of external 2 TB external drives. Now, the question is: what software will I run on the net6501? I have been quite tempted by FreeNAS, but FreeNAS 8 has a stated minimum RAM size requirement of 4 GB (with 6 GB listed as the minimum for ZFS usage), and the net6501 is limited to 2 GB RAM (actually, I think that's even a limit of the Intel Atom CPU that it is built upon). FreeNAS 0.7 has a significantly lower RAM requirement, but I am afraid that it will be orphaned, as the main development path for FreeNAS is now version 8. Of course, I could just set up FreeBSD on the net6501 and be done with it. Anyway, I still have a few weeks to decide, as I am waiting for a new BIOS release for the net6501, as I am having some issues with the new USB boot code of the Soekris device: if I plug in 2 large (2 TB) external USB disks, in addition to the small internal 8 GB USB key that holds the FreeBSD image, then the device hangs on boot while probing the USB devices. If I just connect the external USB drives after the machine is booted, it works perfectly. I am hoping that the USB probe code will be fixed in the next BIOS release. Fun for the weekend :-) /FreeBSD | Posted at 02:06 | permanent link Mon, 23 Jan 2012I have set up this little blog using blosxom (from http://blosxom.sourceforge.net). It is an oldish blogging package (in the Internet world, I guess 2003-2005 is getting ancient :-) but I like the fact that it's small, works with simple ASCII text files, and has no dependencies beyond having perl on the system. The blosxom website also has links to lots of plugins that do useful things, but unfortunately quite a few of the links are now dead. This is where the Internet Wayback Machine is quite useful. For instance, I was looking for the categorylist plugin, and it had disappeared from the web... well, a quick check in the wayback machine and voilą! the plugin is resurrected from history. The Internet Wayback Machine isn't perfect, but it does a lot to save the information from the internet and ensure it doesn't just go away. (Note: some other day, I'll chat about project Guttenberg, another great Internet outpost) /blosxom | Posted at 02:24 | permanent link Sat, 21 Jan 2012
Setting up FreeBSD 9.0 with a ZFS root filesystem: Success!
So, I investigated last week's problem with ZFS and FreeBSD 9.0 and I discovered that the problem was very simple to fix. I needed to add:
to the procedure described last week (on January 15th) so that the zfs mountpoint options would be executed. So now, things are working fine... I am going to play with this configuration a bit to see if the fact that I haven't configured a swap space causes problem with a 2GB memory configuration when I try to compile world. More later. Late addition to this post: turns out that the author of the initial page at http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE had also found the error and fixed it on the wiki, but I had not gone back to check. In the end, it's OK, this has allowed me to explore ZFS enough so that I now understand it better. /FreeBSD | Posted at 19:49 | permanent link Thu, 19 Jan 2012
Listening to Montreal Canadiens' hockey abroad
All native Montrealers have hockey in their blood. When living away from home, you can listen to the games on internet radio, either in French on fm98.5 at http://www.985fm.ca/webradio/ or in English on Team990 at http://www.tsn.ca/Montreal/listen/. This is a real lifeline when one feels too far from home... of course, having maple syrup in the house also helps ;-) /misc | Posted at 02:25 | permanent link Wed, 18 Jan 2012
IPv6 day for 2012 will be June 6
Seen on http://slashdot.org today: On June 6th, many companies will be enabling IPv6 by publishing AAAA record in DNS, and this time, they are not turning it back off! This is good news. I have been running IPv6 in my little part of the Universe for about a year (yes, I know, I should have done it earlier... I've been meaning to do it for 10 years). I even have a subnet at home that is running 100% IPv6. Interestingly enough, while IPv6 is fine, it is not easy to run a plain PC or Mac in an IPv6 only world, as a number of things still expect IPv4 to be visible (or at least, I haven't found the ways to get around it). For instance, while Windows has had support for IPv6 for a long time, my Windows machines on that IPv6 segment cannot seem to find Windows update, and hence no patches get downloaded, which isn't nice. Browsing the web is also frustrating, because even though Google is visible on the IPv6 internet, the search results returned don't all point to IPv6 addresses (unless I haven't found who to enable that). Are many people living in IPv6-only worlds? How do you do it? /inet | Posted at 22:33 | permanent link Sun, 15 Jan 2012
Setting up FreeBSD 9.0 with a ZFS root filesystem
With the new version of FreeBSD being just out, I decided to try out the ZFS filesystem. Notably, I would like to find out whether it works correctly with 2GB of memory, or whether more is really needed (I read that it doesn't really work with less than 1GB of RAM, but then again, there are conflicting reports that it needs lots more, though sometimes that's qualified with 'if you want prefetch' or 'if you are trying to do dedup'). Actually, I am building a small NAS server I am building around a Soekris net6501-70 which comes with 2GB RAM, and I would like to find out if I can use ZFS with it. So, I looked up http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE and tried to set up a vmware virtual machine with ZFS only. I did not bother setting up swap space, nor a mirrored disk configuration, so the commands I used were:
The last 4 commands (i.e. after 'zfs set mountpoint=legacy zroot') give error messages, but I think that's OK. However, once I rebooted the virtual machine, the filesystems (except for /) were not mounted and therefore FreeBSD did not come up properly. So, this was a first try... More on this next weekend :-) /FreeBSD | Posted at 22:57 | permanent link Fri, 13 Jan 2012
Yay! FreeBSD 9.0 is out! The announcement says:
Please see http://www.FreeBSD.org for more info. Note also that FreeBSD 9.0-RELEASE is dedicated to the memory of Dennis M. Ritchie, one of the fathers of UNIX. /FreeBSD | Posted at 21:19 | permanent link Thu, 12 Jan 2012
FreeBSD 9.0-RELEASE ISO are out
Found the ISO images for FreeBSD 9.0-RELEASE on ftp.freebsd.org and ftp4.fr.freebsd.org. I've already got the amd64 version installed on a vmware player virtual image successfully from the ISO -- which works beautifully with FreeBSD under Windows 7; check it out! I'm off to Zurich for a couple of days... more FreeBSD over the weekend. /FreeBSD | Posted at 03:05 | permanent link Tue, 10 Jan 2012
Waiting for the next FreeBSD release
I have been setting up a small computer -- a Soekris net6501-70 -- to use as a NAS (Network Attached Storage) device on my home network. The idea is to replace the small, reliable, Linksys NSLU2 (slugs) that I have been using for shared network usage in my home, with a new device with more disk space and Gigabit Ethernet ports since my home network (at least the wired part) is Gigabit Ethernet. Ideally, I would have liked to run FreeNAS on the device and to run ZFS as a filesystem, but it didn't turn out that way, as the net6501 has 2 GB RAM, and FreeNAS requires a lot more than that. Therefore I have installed FreeBSD 9.0-RC3 on my net6501-70 and I even had the pleasure to discover that I could run FreeBSD in amd64 mode (i.e. 64-bits mode). Now, I cannot wait for FreeBSD 9.0 to be finally and officially released, and for the next iteration of the ne6501 combios to be effectively release. Can't wait! /FreeBSD | Posted at 00:29 | permanent link Oh well, after literally years of resisting, I have finally opened a LinkedIn account recently, prompted by an old colleague/good friend at ZFS. Since then, I've been having fun surfing the social networks and adding lots of people I've known in the past, even going back to friends in Canada from university or even high school. Of course, I worry about publishing all of this information to an external company: this is why I have had neither a LinkedIn account, nor a Facebook account in the past. But, I have to say that it is quite nice to be able to reconnect with people from way back. | Posted at 00:15 | permanent link Wed, 04 Jan 2012
Upgrading an OCZ Onyx SSD drive
A while ago, maybe 2 years, maybe 18 months, I bought an OCZ Onyx 32GB SSD drive to put in my Soekris net5501 server under FreeBSD. The idea was that since that machine doesn't get lots of writes, it would benefit heat-wise and speed-wise from having a SSD drive rather than a regular 2.5" laptop drive (which always seem to fail after about 2-4 years of continuous operation). Well, I have been quite disappointed, because after only a few months of operations, the Onyx started developing a number of read errors and bad sectors. I restored from backups a few times, but eventually it got so bad that I went back to a simple laptop drive for greater reliability. When I bought a new PC recently, I remembered my Onyx and tried to use it to accelerated my disk accesses through intel's Rapid Storage caching Technology. Well, that didn't work at all because it developed read errors within 24 hours, and so I gave up on that idea and ordered a small Intel drive to use as a cache in my system (which seems to work fine). Now, being somewhat stubborn, I surfed the web and found that OCZ had a firmware update for my 32GB Onyx drive (upgrade to 1.7)... so I upgraded the firmware to 1.7, and now the drive is in a very strange state: not only does it report that it has a capacity of 128GB (which is quite strange), but also I cannot seem to pqrtition/format it properly in Windows 7 or with the UBCD. So, I guess I have reached the end of how much time I am willing to devote to this piece of junk, and send it into the recycle bin... truly one of the least positive hardware purchases I have ever made. /hardware | Posted at 23:33 | permanent link Tue, 03 Jan 2012
So, I flew on an A380 from Paris to Montreal
So, we landed in Paris this morning on an A380 from Air France. A very nice flight... fast too (5h 30'), but we took off about an hour late. Overall, a positive experience. | Posted at 11:26 | permanent link The Airbus A380 is a very nice plane. Quite large. Two floors all the way (as opposed to the Boeing 747 which has 2 floors only in the front part of the plane)... this allows airlines to pack a large number of people in each plane, optimizing revenue on long haul routes that are well travelled. For instance, Air France used to have 4 flights a day between Paris and Montreal; now that one of these flights in an A380, they run only 3 flights. However, it is also a fairly recent plane. Now, I have no particular worries about the stability or reliability of that plane; Airbus and Boeing are both extremely proficient at designing, engineering, and building these huge metal birds... and major airlines like Air France, British Airways, Air Canada, Singapore Airlines, etc. are all quite proficient at operating and maintaining them. However, these big recent planes have anciliary problems: you don't have many backup pilots for them; you don't have many gangways for them. So when you have a problem with crews or logistics, you run a greater risk of running into problems. So far, I've flown twice on an A380. The first time, the pilot was ill and had to be replaced... however, another A380 pilot had fallen ill on that day, and the backup pilot was already on his way to New York! Had this been an A330 or 767, they probably would have had tons of backup pilots... but in this case, they had to send everyone home and delayed the flight to the next day. The second time I flew an A380, we arrived 30' early. Unfortunately, our gangway was occupied by another A380 that was delayed and hadn't left the gangway yet. So we had to wait for a whole fleet of busses to come and take us to the terminal (there are many people in n A380, so we needed many busses). So anyway, my impression at this point is that the A380 is a very nice plane, but because of logistic details, it is probably best avoided for now. I am going to fly on an A380 for the third time tonight. I'll let you know how that goes. | Posted at 01:23 | permanent link Mon, 02 Jan 2012Just a quick entry onto this blog whilst it is still January 1st over here in Canada (regardless of what my European blog engine says :-) to wish all of my family, friends, and readers a very happy 2012: happiness, health, and success to all of you throughout the year! | Posted at 05:24 | permanent link Blosxom is nice because it produces a reasonable-looking weblog based on very simple ASCII text files. Therefore, I can just use vi, zile, or emacs to edit blog entries, and they just get posted on the weblog painlessly. The only problem is that I cannot always access rax.org via ssh. For instance, from work, I can do http, but not ssh. Therefore, it would be nice to be able to do weblog entries using the Scribefire add-on to Firefox once in a while. Scribefire can connect to weblog engines using the MetaWeblog RPC protocol, which blosxom seems to support via a plugin, but somehow, I haven't been able to figure it out yet, and I haven't found too many references to metaweblog4blosxom on the Internet. Oh well, perhaps I should stick to emacs :-) /blosxom | Posted at 05:20 | permanent link Hmmm. I've just taken a bit of time over the holidays to properly configure blosxom as my blogging engine. Took a bit longer than I expected to get plugins and flavours going, but now it's fine. I had writebacks going too, but then I disabled them because I feared to be flooded with spam. I will wait and see how much use I make of this small blog & then I will decide if I use it enough to spend any time policing spam on the blog. Overall, I find blosxom an interesting little blog engine, but it seems to have fallen in disuse since 2003, 2004, or so. Any comments from any blosxom users out there? /blosxom | Posted at 05:19 | permanent link Sun, 01 Jan 2012Looking for a place to have lunch in downtown Montreal on Sunday January 1st is not easy. We walked around rue Ste-Catherine for a while, not finding much that was open (apart from McDonalds and Burger King, which we did not feel like having) except for a dinner that had the excellent idea of being open for business: unfortunately, that meant that 100+ people converged there, and there was a line-up at the door. Then, Sylvie had the idea to walk over to the Chinatown... wow, almost everything was opened and there were tons of people around :-) We ended up having a Pho and Bo'Bun (sorry for the missing accents) and leaving smiling and happy. The morale of this story: on January 1st in Montreal, head for Chinatown for restaurants. | Posted at 10:10 | permanent link Sat, 31 Dec 2011I was able to spend some time in these last few days of 2011 setting up blosxom remotely on my little Soekris server. I should be able to blog in 2012, hopefully on a regular basis... nothing too serious, just some random thoughts about what I'm doing as a hobby. Hope you have fun reading it :-) /blosxom | Posted at 23:15 | permanent link Sat, 12 Nov 2011Actually, this machine is the first one within the rax.org domain that has moved to IPv6. I have used the facilities provided by SIXXS.net to create a tunnel to an IPv6 network, and have established an IPv6-only subnet on my home network. I have installed a client MS Vista machine onto this subnet, and I am trying to see what works and what doesn't on this subnet. I intend to blog about what works and what doesn't in these pages. /inet | Posted at 22:43 | permanent link Well, I wanted to install a minimalistic blogging engine on rax.org, so after searching a bit, I settled on blosxom (which is pronounced blossom, actually). Of course, most blogs don't really survive past the first couple of weeks, so before publicizing this, I'll see it I do generate some content into it :-) Best regards to all readers! /blosxom | Posted at 18:50 | permanent link Thu, 23 Oct 2008
Quick syntax summary for the Markdown blosxom plugin
I have adopted the Markdown plugin to allow some simple wiki-style formatting on my weblog. There is a good summary of the syntax at http://daringfireball.net/projects/markdown/syntax.html, which I have reproduced below: Markdown: Syntax*Note:* This document is itself written using Markdown; you can see the source for it by adding '.text' to the URL. OverviewPhilosophyMarkdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- the single biggest source of inspiration for Markdown's syntax is the format of plain text email. To this end, Markdown's syntax is comprised entirely of punctuation characters, which punctuation characters have been carefully chosen so as to look like what they mean. E.g., asterisks around a word actually look like *emphasis*. Markdown lists look like, well, lists. Even blockquotes look like quoted passages of text, assuming you've ever used email. Inline HTMLMarkdown's syntax is intended for one purpose: to be used as a format for writing for the web. Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown's formatting syntax only addresses issues that can be conveyed in plain text. For any markup that is not covered by Markdown's syntax, you simply use HTML itself. There's no need to preface it or delimit it to indicate that you're switching from Markdown to HTML; you just use the tags. The only restrictions are that block-level HTML elements -- e.g. For example, to add an HTML table to a Markdown article:
Note that Markdown formatting syntax is not processed within block-level
HTML tags. E.g., you can't use Markdown-style Span-level HTML tags -- e.g. Unlike block-level HTML tags, Markdown syntax is processed within span-level tags. Automatic Escaping for Special CharactersIn HTML, there are two characters that demand special treatment: Ampersands in particular are bedeviling for web writers. If you want to
write about 'AT&T', you need to write '
you need to encode the URL as:
in your anchor tag Markdown allows you to use these characters naturally, taking care of
all the necessary escaping for you. If you use an ampersand as part of
an HTML entity, it remains unchanged; otherwise it will be translated
into So, if you want to include a copyright symbol in your article, you can write:
and Markdown will leave it alone. But if you write:
Markdown will translate it to:
Similarly, because Markdown supports inline HTML, if you use angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:
Markdown will translate it to:
However, inside Markdown code spans and blocks, angle brackets and
ampersands are always encoded automatically. This makes it easy to use
Markdown to write about HTML code. (As opposed to raw HTML, which is a
terrible format for writing about HTML syntax, because every single Block ElementsParagraphs and Line BreaksA paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. (A blank line is any line that looks like a blank line -- a line containing nothing but spaces or tabs is considered blank.) Normal paragraphs should not be indented with spaces or tabs. The implication of the "one or more consecutive lines of text" rule is
that Markdown supports "hard-wrapped" text paragraphs. This differs
significantly from most other text-to-HTML formatters (including Movable
Type's "Convert Line Breaks" option) which translate every line break
character in a paragraph into a When you do want to insert a Yes, this takes a tad more effort to create a HeadersMarkdown supports two styles of headers, Setext and atx. Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example:
Any number of underlining Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example:
Optionally, you may "close" atx-style headers. This is purely cosmetic -- you can use this if you think it looks better. The closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) :
BlockquotesMarkdown uses email-style
Markdown allows you to be lazy and only put the
Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
adding additional levels of
Blockquotes can contain other Markdown elements, including headers, lists, and code blocks:
Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu. ListsMarkdown supports ordered (numbered) and unordered (bulleted) lists. Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers:
is equivalent to:
and:
Ordered lists use numbers followed by periods:
It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is:
If you instead wrote the list in Markdown like this:
or even:
you'd get the exact same HTML output. The point is, if you want to, you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to. If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number. List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab. To make lists look nice, you can wrap items with hanging indents:
But if you want to be lazy, you don't have to:
If list items are separated by blank lines, Markdown will wrap the
items in
will turn into:
But this:
will turn into:
List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:
It looks nice if you indent every line of the subsequent paragraphs, but here again, Markdown will allow you to be lazy:
To put a blockquote within a list item, the blockquote's
To put a code block within a list item, the code block needs to be indented twice -- 8 spaces or two tabs:
It's worth noting that it's possible to trigger an ordered list by accident, by writing something like this:
In other words, a number-period-space sequence at the beginning of a line. To avoid this, you can backslash-escape the period:
Code BlocksPre-formatted code blocks are used for writing about programming or
markup source code. Rather than forming normal paragraphs, the lines
of a code block are interpreted literally. Markdown wraps a code block
in both To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input:
Markdown will generate:
One level of indentation -- 4 spaces or 1 tab -- is removed from each line of the code block. For example, this:
will turn into:
A code block continues until it reaches a line that is not indented (or the end of the article). Within a code block, ampersands (
will turn into:
Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it's also easy to use Markdown to write about Markdown's own syntax. Horizontal RulesYou can produce a horizontal rule tag (
Span ElementsLinksMarkdown supports two style of links: inline and reference. In both styles, the link text is delimited by [square brackets]. To create an inline link, use a set of regular parentheses immediately after the link text's closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:
Will produce:
If you're referring to a local resource on the same server, you can use relative paths:
Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:
You can optionally use a space to separate the sets of brackets:
Then, anywhere in the document, you define your link label like this, on a line by itself:
That is:
The following three link definitions are equivalent:
*Note:* There is a known bug in Markdown.pl 1.0.1 which prevents single quotes from being used to delimit link titles. The link URL may, optionally, be surrounded by angle brackets:
You can put the title attribute on the next line and use extra spaces or tabs for padding, which tends to look better with longer URLs:
Link definitions are only used for creating links during Markdown processing, and are stripped from your document in the HTML output. Link definition names may consist of letters, numbers, spaces, and punctuation -- but they are not case sensitive. E.g. these two links:
are equivalent. The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets -- e.g., to link the word "Google" to the google.com web site, you could simply write:
And then define the link:
Because link names may contain spaces, this shortcut even works for multiple words in the link text:
And then define the link:
Link definitions can be placed anywhere in your Markdown document. I tend to put them immediately after each paragraph in which they're used, but if you want, you can put them all at the end of your document, sort of like footnotes. Here's an example of reference links in action:
Using the implicit link name shortcut, you could instead write:
Both of the above examples will produce the following HTML output:
For comparison, here is the same paragraph written using Markdown's inline link style:
The point of reference-style links is not that they're easier to write. The point is that with reference-style links, your document source is vastly more readable. Compare the above examples: using reference-style links, the paragraph itself is only 81 characters long; with inline-style links, it's 176 characters; and as raw HTML, it's 234 characters. In the raw HTML, there's more markup than there is text. With Markdown's reference-style links, a source document much more closely resembles the final output, as rendered in a browser. By allowing you to move the markup-related metadata out of the paragraph, you can add links without interrupting the narrative flow of your prose. EmphasisMarkdown treats asterisks (
will produce:
You can use whichever style you prefer; the lone restriction is that the same character must be used to open and close an emphasis span. Emphasis can be used in the middle of a word:
But if you surround an To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:
CodeTo indicate a span of code, wrap it with backtick quotes (
will produce:
To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:
which will produce this:
The backtick delimiters surrounding a code span may include spaces -- one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:
will produce:
With a code span, ampersands and angle brackets are encoded as HTML entities automatically, which makes it easy to include example HTML tags. Markdown will turn this:
into:
You can write this:
to produce:
ImagesAdmittedly, it's fairly difficult to devise a "natural" syntax for placing images into a plain text document format. Markdown uses an image syntax that is intended to resemble the syntax for links, allowing for two styles: inline and reference. Inline image syntax looks like this:
That is:
Reference-style image syntax looks like this:
Where "id" is the name of a defined image reference. Image references are defined using syntax identical to link references:
As of this writing, Markdown has no syntax for specifying the
dimensions of an image; if this is important to you, you can simply
use regular HTML MiscellaneousAutomatic LinksMarkdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:
Markdown will turn this into:
Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:
into something like this:
which will render in a browser as a clickable link to "address@example.com". (This sort of entity-encoding trick will indeed fool many, if not most, address-harvesting bots, but it definitely won't fool all of them. It's better than nothing, but an address published in this way will probably eventually start receiving spam.) Backslash EscapesMarkdown allows you to use backslash escapes to generate literal
characters which would otherwise have special meaning in Markdown's
formatting syntax. For example, if you wanted to surround a word
with literal asterisks (instead of an HTML
Markdown provides backslash escapes for the following characters:
/blosxom | Posted at 10:10 | permanent link |
|