Build a single kernel module in FreeBSD

July 16th, 2009 — 11:40am

This is a simple piece of information that may save some of you some time.

There are a few reasons that you would like to build a single kernel module in FreeBSD, and thankfully it is easy to do.

Firstly, find the module you need.

cd /usr/src/sys/modules/YOURMODULE

Often there will just be one file, a Makefile in these directories. That’s not a problem, just run

make

Now you will be left with a load of files, the one you need is the *.ko one.

To load this onto a running system, use the

kldload

command.

Done and done! To check your work, run

kldstat

Comment » | hackery

Is Earth ‘tuned’ for life?

July 10th, 2009 — 2:17pm

Alot of people subscribe to a mild form of creationism, although they would not call it as such. They don’t believe in Adam and Eve and all that bulls**t, but I often hear the argument that our planet is somehow ‘tuned’ to permit our existence.

This is an argument from design, the circumstances of life on Earth seem to be an amazing coincidence, so therefore, it points to a designer who ‘tuned’ these conditions to allow life to evolve here. It is certainly true that conditions here on Earth are astoundingly fortunate, liquid water, energy from the sun, it all seems to be almost too perfect.

I totally reject this argument. It’s narrow minded and childish. If I take a guitar and drop it, the tuning gets knocked off and it sounds horrible, how horrible depends on the mechanics of the fall, how hard it hit the ground etc. If I drop it again, it will go to a different tuning, again, seemingly random.

What if (assuming my guitar is made out of adamatium or something similar) I was to drop my guitar millions of times? Is it not conceivable that on one of those millions of occasions, the bang knocks the guitar INTO tune perfectly? In fact, even with millions of possibilities, the odds of that happening become quite high.

How does this fit in with the ‘Earth is tuned’ argument? Well, estimates put the number of galaxies in the universe in the hundreds of billions. The number of stars in our own galaxy is estimated at roughly 100 billion. If you have 300 billion galaxies, all containing 100 billion stars that could potentially have a rocky planet orbiting at a favorable distance you get 1×10^22 (or I with 22 zeros following it) possible solar systems.

Thats a hell of a lot of chances for life. In fact, the more you think of it, the more likely it seems that there is life on other planets that happen to have the same favorable conditions as our own.

But theres more, all this revolves around the assumption that life as we know it is the only way that life can exist. What if there are other planets with conditions not conducive to carbon based life forms but perfect for other types of life?  Creatures and forms we cannot begin to imagine, living happily in seas of methane or rivers of mercury. Taking this into account, it seems almost probable that we are not alone in the universe.

There’s nothing special about the Earth in the context of all the other planets in the Universe, yes it can support life, but, it seems likely, so could millions of others. The Earths special features are not a miracle of God, but a miracle of coincidence.

I wonder have those other life forms created religion to explain things they don’t understand like we have done.

2 comments » | religion

O2 Mobile Broadband – Strange Experience

July 3rd, 2009 — 4:23pm

I’ve recently moved into a new apartment for the summer months while I finish my work placement. The place is great, nice and compact, and about a 1 minute walk from work, sorted!

The cloud to all this silver lining is that the place had no tv or broadband. AGHH!! Terrifying I know!

After completing Halo 3 on heroic (using my computer monitor as a screen) we sorted out the TV, then set about sorting out broadband. Now I don’t expect to be living in the apartment I am in for more than a few months, so normal broadband isn’t really an option, I can’t sign up for a 12 month contract.

I had a look at the 3G mobile broadband options available around here and there were 3 options, O2, 3, and Vodafone. All weigh in at about 50 to 60 euro for the modem, and then 20 quid a month, or 30 quid if you’re looking at short contracts. Hmm, not ideal.

Luckily for me I then came across an offer that O2 are doing with HEAnet (Higher Education Associan NETwork) for college students. €13 a month on a 12 month contract, with the modem for FREE! Then, the real icing! €15 a month, on a 30 day contract that can be canceled at anytime! DING DING DING Jackpot!

HEAnet

Perfect, it’s only a measly 5GB of usage, but it should be enough for some lightweight usage. So off I went on my merry way to the local O2 shop in the centre of the city to sign up for this wonder deal, ID and proof of address in hand. I went up to the 8 foot tall shop assistant (seriously, the guy was huge!) and asked him about the deal. He was ready to get me signed up when he mentioned “€13 for 12 months”. Whoa!! Stop right there big guy, I want the one month contract thing! “That deal has been canceled since July”. “July?” I spluttered incredulously, “You mean in the last two days??”. “Yep” he replied and I left the store, heartbroken, not even giving the aspiring street artist clamoring for my attention so much as a nod.

As I reached my bike I realised I was standing outside another O2 shop, so I thought, I’d chance my arm, maybe they don’t know about the so called ‘canceling’ of this deal. One day (their computer system was down) and a couple of forms later, and I am now sitting on a 30 day contract with my free modem.Take that giant shop assistant.

o2

This turn of events really shocked me, one rep in one shop said one thing, while in another shop, quite literally 50 yards up the road said another, and processed my application without any trouble. The mind boggles. I suppose the moral of the story is to shop around, even if the shop is a different outlet of the same company.

Anyway, the heel of the hunt is that I now have my mobile broadband and am looking forward to trying it out on my bus journey later. I might post a review on this site depending on my experiences

modem

Comment » | galway, internet, life

Neteller – Use a Laser Card as a Credit Card

June 12th, 2009 — 6:25pm

Now that I have entered gainful employment for my college work placement programme, my thoughts quickly went to deciding what I would buy with my wages. As a tech head, gadgets are generally top of the list, and the cheapest place to buy gadgets is online. With me so far?

The problem with wanting to buy online is that the majority of shops only accept credit cards, a luxury I do not have. I do however possess a Laser Debit Card, and while some Irish shops do accept this type of card, it leaves you painfully restricted as to where you can shop, and therefore you often end up paying more than you should.

Ah I hear you chime up, 3V vouchers! Basically, a prepaid Visa card from Permanent TSB. I have used these in the past, and they are good, and do the job nicely, if a little expensively. The problem I have with 3V cards is the hassle of having to find a shop that a) sells the things and b) has employees who actually know what the hell they are. If I could buy 3V vouchers online with a Laser card, they would be perfect. There must be a better way I thought.

Thats when I came across Neteller, Neteller are an Internet payment company, most popular for their gambling services, and were very popular with Americans looking to gamble online, which for some inane reason is illegal in most states.

neteller logo

I signed up to an account, not because I’m harboring a secret gambling habit, but because of the promise of their Net+ cards.

To my surprise, I then got a phone call from a very friendly and helpful Neteller rep, something one does not expect when signing up to an online service.

To use the Net+ cards, first one must prove ones identification by sending them a scanned ID over the net. I was very cagey about doing this at first, but after some research, I went for it.

A few days later, my account was ‘Extended’ which meant I could start using all their features, the process works like this,

1. I deposit money into the account by choosing the debit card option and selecting the ‘Maestro’ card from the dropdown box (I figured since my card has a Maestro logo on the back it was worth a go). The money comes straight out of my account, plus a 1.7% charge, which is, as far as I can see, the only charge levied against me.

UPDATE

Murray in the comments informs me that AIB laser cards only have 15 digits, and for that reason will not work with Netellers depositing function. Sorry guys, I don’t know of a way around it, BOI laser cards work fine.

Noel has pointed out that if your AIB laser card has 19 digits, you’ll be fine and can use Neteller no problem.

2. I pick the Neteller Net+ Virtual card option on the site, and it generates a Mastercard No, with an expiry date and security code

Screenshot of card

Screenshot of card

3. Jot the details into the website of your choice, all websites accept Mastercard, and the payment will appear on your Neteller account.

4. ????

5. Profit!

There you go, use a Laser card as a credit card without leaving the house, simple really.

7 comments » | internet, life

Volvo Ocean Race Stopover – Galway

May 29th, 2009 — 11:14am

I went down to the race village last night for the first time, to see the Hothouse flowers and generally get a feel for the place. I have to say, I’m very impressed. They’ve done a great job, it was a lovely evening and there were loads of people just milling about.

One thing I noticed, food stands. Everywhere. And we’re not talking just your usual burger and chips. Every stand had something different, pies, spuds, organic teas, anything you can think of. A great selection.

After seeing them on TV, my main priority was to take a look at the boats themselves. especially the green dragon. I got some photos too.

green dragon

green dragon

They are really impressive things the boats, and apparently loaded with tech.

Of course, there’s only so much looking at boats you can do (check out my flickr page for more photos) and we moved then toward the big main stage to see the entertainment, and the Hothouse Flowers put on a great show.

Hothouse Flowers

Hothouse Flowers

We then retired to a local establistment to consume some recreational beverages. But not before I took this photo of the Ocean Race boats’ masts with the moon in the background.

Masts

Masts

All in all, it’s a great event, the team behind it, Let’s Do It Galway have done a brilliant job in creating a real party atmosphere and something Galway can really be proud of.

Of course, 70% of people there have never set foor on a sailing boat in their lives, any old excuse for a party eh?

2 comments » | galway

Open Letter To Dermot Ahern re: Blasphemy Bill

May 27th, 2009 — 12:36pm

To try to raise awareness to this concern, here is a copy of an email sent by me, to Dermot Ahern, regarding the upcoming blasphemy legislation in Ireland http://blasphemy.ie for more details.

Mr Ahern,

I am emailing in relation to the proposed Defamation BIll and the parts of the bill regarding blasphemy.

A person who publishes or utters blasphemous matter shall be guilty of an offence and shall be liable upon conviction on indictment to a fine not exceeding €100,000.”

The definition given of “blasphemous matter” is matter “that is grossly abusive or insulting in relation to matters held sacred by any religion, thereby causing outrage among a substantial number of the adherents of that religion; and he or she intends, by the publication of the matter concerned, to cause such outrage.”

This is absolutely unbelievable. It is a direct affront to the fundamental human right of free speech. To protect people who have a particular set of beliefs is completely against equality. The definition of blasphemous matter contains the phrase “any religion”. I subscribe to no religion and as such am an atheist, this law would value the opinions of religious people above my own and discriminate against me and the thousands of atheists around the country.

Suppose a religion or denomination of a religion complains that the advertising of equal opportunity jobs is blasphemous, because this religion believes, as many do, that women are inferior to men. By this law, they would be perfectly entitled to complain and fine such a company €100,000.

The main problem with the law is that the definition of blasphemous material is loose and open to interpretation. Because everyone will have a different definition, religious groups will use this to suppress debate and healthy discourse on issues of religion.

People will become scared to voice their opinions because of the fear of a huge fine. I hope I don’t need to explain why that would be a terrifying situation.

The law opens a door to a slippery slope which at the end, results in a police state, where even speech is controlled.

I implore you to rethink this almost Orwellian legislation and be open to new debate and public opinion. I also would urge you to visit http://blasphemy.ie/ to see the opposition to this bill.

Yours,
A concerned citizen,

Shane Tuohy
web – shanetuohy.com
twitter – shanetuohy

1 comment » | politics, religion

Fianna FAIL!

May 19th, 2009 — 11:57am

As most people in Ireland know, the European and Local elections are coming up on June 5th.

It’s widely expected that Fianna Fail are going to take a shoeing this time around with satisfaction in the government sits at the atrocious level of 10% as of recent polls. Because of this, many Fianna Fail candidates are trying to disassociate themselves with the negative feeling associated with the party, how? Well, take a look at this Fianna Fail candidates election poster.

Can you spot the Fianna Fail logo. No? There. Down the very bottom. On the right. Tiny isn’t it?

Candidates seem to be hoping that people will miss the fact that they are part of the current government party. This is deceptive and negative and hopefully voters won’t be fooled by these crude tactics.

TL;DR – Fianna Fail fail at electioneering

3 comments » | politics

mount command different in FreeBSD & Linux

May 1st, 2009 — 4:21pm

At work I use both Linux and FreeBSD extensively. Recently while going through some old bash scripts trying to make sense of them, I had two terminals open, one for looking through the script and the other for looking up man pages, to decipher command line switches.

This was going fine, until I can across a certain command that just didn’t make sense, the mount command.

The operation was happening at boot up, where a partition was being mounted as the root filesystem.

mount -f -o rw /dev/md0 /

This mounts dev/md0 on /. Sinple enough, the -o option specifies that the partition is to be mounted readable and writable. What about the -f part though.

I switched across to my other terminal, and typed in man mount to have a look for this command switch. According to the man page, go on, check for yourself, this command ‘fakes’ the mount, i.e, does everything except the system call.

manpage linux

manpage linux

This had me puzzled for a while, until I realised that I was looking at the man page for the LINUX implementation of mount,not the FreeBSD implementation, so I ssh’d to a FreeBSD box and had a look and sure enough, I found,

screenshot-shaneshane-work-desktop

Sure enough, the command is different, but what a difference!

In Linux, -f ‘fakes’ a mount, whereas in FreeBSD, it ‘forces’ a mount. Those are two completely different things, you could hypothetically want to check a volatile FS using -f to fake a mount, and then acting based on the return from that, but if you run the command on FreeBSD, it will force the mount, a dangerous thing to do!

So note to self – Linux and FreeBSD are NOT THE SAME…watch out for the subtle differences between even the most fundamental of commands in the two operating systems

Comment » | hackery

Pirate bay decision – a step backward

April 17th, 2009 — 2:26pm

Today the 4 guys on trial for copyright infringement in relation to the Pirate Bay were found guilty, given 1 year jail time, and a $905k fine. To be paid to the music labels.

It’s all over the news and the Internet, and it seems like some of the “expert commenters” seem to believe that the Pirate Bay will now shut down – Dick Doyle of IRMA – “There will be others [sites] out there, but this sends out a message….”

Pff. Not a hope. Even the guys found guilty aren’t worried and are about to kick off a lengthy appeals process.

It’s pretty much a step back for the whole Industry vs. Piracy thing. If the music industry wanted to sue people for using BitTorrent, which is why they went after the Pirate Bay in the first place, they would need to sue millions of people around the world, because these are the people who do the actual sharing.

I have often used BitTorrent to download Linux ISO’s, perfectly legal behaviour, mainly because a weakness of servers is a strength of BitTorrent.

When a server is being hammered, i.e loads of people downloading files from it at the same time, it has difficulty keeping up, and ultimately slows down. BitTorrent is the opposite, the more people downloading, the more sources you have for a file and the quicker it goes.

The Pirate Bay does not host ANY copyrighted material. It is all on the users computers. The Pirate Bay facilitates this by providing a way to use the technology behind the system, it collates torrent files. What people upload and do with this service is not the responsibility of the Pirate Bay.

If you’re still not convinced, lets give an analogy.

Should all MP3 player makers be taken to court as they provide a way of playing and using copyrighted material. They provide a way to use a technology that can be used for pirating copyrighted material. GUILTY!

What about ethernet cable makers? They let you download files through them. GUILTY!

All rewritable cd makers, even camcorder makers (record a film, concert etc), should, by the logic employed by the prosecution here should be taken to court.

I understand that piracy is wrong, it is. The Pirate Bay and the BitTorrent technology behind it on the other hand, isn’t.

Comment » | internet

Top 3 New Features in Jaunty

April 16th, 2009 — 10:28am

It’s that time of the year again, when we are treated to the latest Ubuntu release. As per usual you have all the latest Gnome packages and little tweaks here and there, but here are the 3 features I am most looking forward to.

1. New Notifications

Ubuntu now has a new notification system. you know, that thing that tells you when you are low on battery, change volume etc.

It looks lovely, really slick and smooth, but don’t take my word for it, check it out yourself, go ahead, I’ll wait…

http://www.markshuttleworth.com/wp-content/uploads/2008/12/jaunty904_notifications_example1_web_092.swf

See that??? Look lovely, can’t wait :)

2. Boot time improvement

One of the focuses of this Ubuntu release is to improve boot time, something Microsoft Vista could learn from..

This is a clever thing to focus on at the current time as more and more people are using netbooks and small MID devices, which don’t have the power of full PC’s, and therefore boot times can be painfully elongated. Ubuntu is clearly targeting these small form devices with the new release.

So is it effective? Well it appears so! I haven’t installed the beta onto my laptop, because of the bad experience I had last year so I can’t vouch for it, but it looks promising.

3.EXT4 support

This one has a friend of mine all a flutter, the main advantages of ext4 are that it can support volumes up to 1 Exabyte in size, and single files of size 15 terebytes. You may laugh and say that this is nonsense, but give it time till we have super de duper HD x4 and we’ll see file sizes get larger!

A directory can also contain more than 32000 entries, which was the limit in ext3

The main improvement is speed though, and if you really want the fastest possible Ubuntu experience, use ext4, you won’t regret it.

So thats it, roll on the 23rd!

Comment » | linux, ubuntu

Back to top