Tag: linux

Do you know what the problem with Linux is?

Some of the users.

For the 20th birthday of the Linux kernel, Microsoft have made a video wishing Linux happy birthday.

My first reaction to this? That’s pretty nice, at the end of the day, there’s no reason we can’t be friends just because of a difference of opinion on the best way to develop an operating system. In fact, I’m surprised Microsoft was relaxed enough to let this out, good on them.

The top comment on the Slashdot post about the video?

It begins with, “I read this as a slight against Linux…” and goes on to say..

I think the general philosophy that has clearly been reiterated by the Linux community is there is absolutely no room for trust in Microsoft. They are a convicted monopolist and have called upon everyone to view Linux as a cancer. They continue to use their patents to extort payment from large and small with bogus insubstantiated claims against Linux. They are the company that uses embrace extend extinguish. This animation represents the same underhanded intentions.

Do these people ever turn off?

mount command different in FreeBSD & Linux

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