Posts tagged with "freebsd"


FreeBSD pkg bootstrap is being restored

Icon from the Crystal Clear Project

Good news, we have news from the pkgbeta.FreeBSD.org server:

pkg bootstrap is being restored. Stay tuned.
Updated: 2012-11-28 10:20 UTC.

The site went down shortly after I wrote my pkgng FreeBSD Handbook post, ironically enough. I was going to post in the newsgroups asking what was up, but now we have news.

UPDATE: We now have a new message.

Currently this site only contains pkg bootstrap files!
Updated: 2012-11-28 11:30 UTC.


pkgng is now in the FreeBSD Handbook

As far as I'm concerned, this makes it official! Under 5.5 Using pkgng for Binary Package Management:

pkgng is an improved replacement for the traditional FreeBSD pkg_install package management tools, offering many features that make dealing with binary packages faster and easier. The first release of pkgng was in August, 2012.

My only lingering gripe with pkgng was you still needed to download the ports tree or use pkg_add to install it, which seemed redundant. This has also been addressed:

FreeBSD 9.1 and later includes a "bootstrap" utility for pkgng. The bootstrap utility will download and install pkgng. [..] To bootstrap the system, run: # /usr/sbin/pkg

I'm counting this as an early Yuletide present from the lovely, epic FreeBSD developers and documentation team. I'd jump in my chair with joy, if I could!


Changing timezones in CentOS, Fedora, FreeBSD, Yuki

I knew how this worked in FreeBSD, and fortunately it works in the Red Hat world as well. First, make a backup of your existing timezone file, the create a symbolic link to your timezone. I've seen people copying the file instead, but I feel safer linking.

# mv /etc/localtime /etc/localtime.back
# ln -s /usr/share/zoneinfo/Singapore /etc/localtime

I'm tempted to set my timezone to Reykjavík, it's HOT in Sydney today. Nagato Yuki has the right idea. A-heh-hem.

UPDATE: @dai1311 on Twitter says that this also works on Arch Linux. Incidentally, his avatar is of Yuki!


Malaysian FreeBSD nostalgia and community

Screenshot of my MacBook Pro running FreeBSD with Haruhi Suzumiya's approval in 2006

Martin Wilke maintains one of the FreeBSD blogs I read most often, and one of his posts from February sent me down memory lane, and made me think about FreeBSD's future.

Some Malaysian BSD nostalgia

Going through his archives this evening, I found this post about BSD In Malaysia, which opened thusly:

Few days back I’ve met up with Mohd Fazil Azran for a small talk about *BSD at Starbucks coffee.

Funnily enough, I started experimenting using FreeBSD when we were living in Kuala Lumpur. Our home Streamyx internet was so laughably unreliable, I used to commute with my dad to KLCC where he worked, and hang out at Coffee Bean and Starbucks to download portsnap updates and build the latest ports on my MacBook Pro. You probably know KLCC from those Petronas Twin Towers.

Here's one of the posts I wrote at the time, from 2006. And another, specifically from the Starbucks in KLCC. And finally, another when I'd gone to the airport to use their internet. KLIA wasn't that far from our house.

Anyway, I thought it was cool someone was talking about BSD, in a place where I first learned and experimented with FreeBSD.

But I digress

As it happens, Martin blogged about FreeBSD in Malaysia specifically to highlight what he sees as a decline in the BSD community there.

I was interested to know why Malaysian *BSD community is so inactive, and from the discussion, I’d say that the reason is more likely caused by too much of politics in the group, financial issues, lack of interest to share knowledge and blablabla.

I was never an active part of the Malaysian BSD community (save from blogging about BSD in Malaysia at the time), but I agree with Khairil Yusof who left a fairly detailed comment. In brief: "the younger generation are used to the ease and flash of Fedora and Ubuntu Linux and therefore, start on those and get hooked on it."

With the release of FreeBSD 9.2 and the official inclusion of pkgng, perhaps this will change. I know from personal experience building ports was the least fun part of running the OS, and now that's been taken care of I've moved all but two of my machines back to it. I've always asserted (with a modicum of confidence!) that FreeBSD is technically superior, faster and more secure, but it was no secret that using it as a desktop OS was more challenging than Linux.


FreeBSD GPT works just fine on the ThinkPad X40

I'd abstained from using the GUID partition tables (get it... tables?) on my ThinkPads after reading warnings on the Fedora mailing lists. Inadvertently I installed FreeBSD with GPT on my ThinkPad X40 this afternoon though, and it worked just fine!

The K-On! girls eating sushi © Kyoto Animation.

Fedora

From Pádraig Brady on the mailing lists in February:

In Fedora 16 we changed to using GPT as the default disklabel for new installs. In a few cases, mostly limited to Lenovo hardware, we found that some BIOS's would not boot from GPT. We blacklisted Lenovo, falling back to msdos labels in order to solve this.

Thanks to Matthew Garrett we found that switching on the boot flag of the GPT's protective MBR these BIOS's would then boot from GPT. Matthew wrote a patch for parted to allow controlling this flag using the disk_set pmbr_boot command in parted. This is in parted-3.0-7

I can't find them right now (of course) but I also recall the release notes or installation guide for Fedora 16 and 17 detailing the use of nogpt and how Lenovo machines were blacklisted for using GPT.

So I avoided it, and used extended partitions to overcome the 4 partition limitations of MBR that we all remember.

FreeBSD

With the release of the 9.0 series, FreeBSD defaults to GPT instead of MBR. While installing, I explicitely created an MBR table instead of using GPT in the initial disk step of bsdinstall. Curiously, doing this resulted in a string of those notorious "g_vfs_done() error=5" errors when I first booted. The same results occurred when I used gpart manually from the shell.

Just to see what would happen, I let bsdinstall create GPT partitions instead, and FreeBSD has since booted flawlessly. No joke!

Granted, this is with FreeBSD i386 on a 32bit Pentium M ThinkPad X40. My next experiment will be to use GPT with FreeBSD amd64 on my Core 2 Duo ThinkPad X61s.


pkgin and pkgng for pkgwin

I moved to Fedora as my desktop OS of choice largely because of yum, and some Red Hat Linux nostalgia. Pkgin and Pkgng on NetBSD and FreeBSD respectfully may be enough to win me back :)

# pkg_add -rv awesomeness

Back when I fickly used FreeBSD then NetBSD for my file server at home, the systems were so appealing I wanted to try them on the desktop. If you go back to the Rubenerd.com archives from a few years back, you'll see all my posts about BSD desktops, getting Xfce working on them, and how much I enjoyed using them.

Leaving aside the issue of accelerated 3D graphics for now, the main issue with using the BSDs as desktop OSs is they tended to be heavily source-based. Binary packages were available, but generally speaking if you wanted current software and updates, you needed to use their respective port/package systems. Before the advent of freebsd-update, you also needed to rebuild the base system to upgrade it.

For small applications or the ones you'd typically run on a server, this was fine. Building Firefox or Xfce or KDE from sources each time they had an update would take hours, and was an incredibly tedious process. Sometimes they'd break, or a dependency wouldn't build, and you'd be stuck. It didn't make for a terribly pleasant desktop experience, especially when my Linux friends could enter yum update and be largely up to speed in minutes.

Obconf, Nitrogen, urxvt on Openbox, my "cloud" theme :)

A NetBSD repo? You bet!

A lot has changed in the intervening years since I started using Linux again. Pkgng on FreeBSD and Pkgin on NetBSD offer repository-based binary package management systems akin to yum in the Red Hat world, or heaven forbid apt-get.

From the NetBSD pkgin site:

pkgin is aimed at being an apt / yum like tool for managing pkgsrc binary packages. It relies on pkg_summary(5) for installation, removal and upgrade of packages and associated dependencies, using a remote repository.

Many so-called GNU/Linux distributions provide a convenient way of searching, installing and upgrading software by using binary archives found on "repositories". NetBSD, and more widely, all operating systems relying on pkgsrc have tools like pkg_add and pkg_delete, but those are unable to correctly handle binary upgrades, and sometimes even installation itself.

This is the purpose of pkgin, to provide the user a convenient way to handle binary packages, using the same working mechanisms than tools like apt-get.

And from the FreeBSD pkgng wiki page:

pkgng is built on top of libpkg, a new library to interface with package registration backends. It abstracts package management details such as registration, remote repositories, package creation, updating, etc.

pkgng is: a replacement for pkg_* tools, a tool to query/manage installed packages, a tool to deal with binary packages, a tool to upgrade/install packages from a remote repository and a library that provides all the package management in a safe way so one can write a new frontend.

I moved from FreeBSD to NetBSD on my file server here, and so far I've only played with pkgin, but I'm genuinely excited about both. A method to reliably and consistently upgrade binary packages was arguably the main reason I went to Linux.

I'll keep the penguin on at least one machine I own, but if these systems work well I may be on my way to using BSD on my laptops again, including maybe even this one! As much as I know about the Fedora ecosystem now, I'm still far more at home with BSD. /etc/rc.conf, securelevels, jails [sic], the 2-clause BSD licence!

I'll be playing with both after my latest round of assignments are handed in, and will report back ^_^


Belkin F5D7010 works on Fedora and FreeBSD

Photo of my ThinkPad X61s at a coffee shop with the wireless card in question

I can confirm it works brilliantly, and better than the stock internal wireless card on my ThinkPad X61s!

You won't let me connect?

The Intel PRO/Wireless 4965 card is an odd beast. It can connect to any wireless network I throw at it, enterprise or otherwise. That is, until I take my ThinkPad X61s to UTS (my university) and attempt to connect to their PEAP WPA2 network. Occasionally enough to be weird, it'll troll me and connect, otherwise I'll be prompted for my password four times, then it'll fail. It's like interfacing with a customer support hitline.

I mistyped "hotline" as "hitline". I think I'll leave it.

I'd all but given up and decided to start researching replacing the internal wireless card. As much as I'm a fan of Apple's minimalism, I'm also a fan of ThinkPads modular design with easily accessible bays for all the major components, and replacing the wireless card would be trivial.

And then I remember I had an alternative. It came to me in a vision. Or a drawer, or something.

You'll let me connect?

I bought this Belkin F5D7010 G wireless CardBus card originally when I ran FreeBSD on my Armada M300. The same card you see in the photo above can be seen in this post from 2008.

As people who run FreeBSD and Linux can relate to, typically we have to be a bit more careful about what hardware we use to ensure compatibility with our more limited set of drivers. It had worked flawlessly on FreeBSD, so I thought I'd give it a whirl on Fedora.

I took it to UTS, and it's connected almost every single time, without trouble. Well, without any more trouble than we all face connecting to UTS wireless. Mmm-hiven-maven.

The Belkin F5D7010 is based off the Broadcom bcm43xx chipset, which thanks to the tireless efforts of reverse engineers (sounds like people building a backwards bridge) and later Broadcom releasing more limited drivers, this card works flawlessly on Fedora (and FreeBSD). If you have an older laptop, buy this card with creamy, chocolate filled confidence.


HandBrakeCLI --start-at and --stop-at in

Icon from the Gnome desktop project

When trying to use HandBrakeCLI to take a clip from movie, I couldn't figure out why it was ignoring the durations in seconds I was defining with --start-at and --stop-at.

Turns out, you need to append the word "duration", "frame" or "pts" before each value. For example, to create a 20 second clip starting at the 1 minute mark:

HandBrakeCLI [...] \
--startAt duration:60 --stop-at duration:20

Amazing what one can learn if one reads the manual page before wasting half an hour figuring out what's going wrong!


Point Gnome 3 Contacts to SeaMonkey Address Book

A silly little hack I devised this afternoon if you run Gnome 3 and have the pretty (but unused) Contacts icon in your Applications menu. Open this as root:

/usr/share/applications/mozilla-seamonkey.desktop

And replace this:

Exec=gnome-contacts

With this:

Exec=seamonkey -addressbook

One of these days I'll fulfill my dream of writing an entirely XUL desktop environment. And it'll use the Walnut theme by default. Oh, you'd better believe it.


Make Qt applications match Gnome 3

Qt applications look acceptable in Gnome 3, but with the Qt4 Configure utility you can change the colours and fonts to match their GTK+ brethren!

Installing Qt4 Configure

This is a potential gotcha; depending on your distribution you may have to specify qt4, or not. For example, in Fedora:

# yum install qt-config

And FreeBSD:

# cd /usr/ports/misc/qt4-config
# make install clean

Once you've installed it, a beautifully large Qt4 Configure icon should appear in the "Other" category of your Gnome 3 Shell. Given many of my GTK+ applications still have crappy icons, having the Qt4 Configure app fit in so well was a pleasant surprise!

Colours

The default GTK+ theme for Qt looks passable, but Gnome 3 uses a whiter shade of pale. This is most noticeable between the title and menu bar in Qt applications.

You can correct this by clicking "Button Background" and "Window Background" under "Build Palette", and slotting in the following values:

  • Red: 239
  • Green: 235
  • Blue: 231

To get the right shade of blue for selected menu items, click "Tune Palette..." under "Build Palette", then choose "Highlight" under "Central color roles". Slot in the following values:

  • Red: 74
  • Green: 144
  • Blue: 217

I derived these colours from using the GColor2 utility, so they may be approximations. I can't tell the difference!

Fonts

For better or worse, Gnome 3 uses Cantarell for its default font. To get Qt applications to match, set the font to "Cantarell" on the "Family" dropdown box under the "Fonts" tab.

Update

Curiously, I had to go through this rigmarole on my Fedora 16 x86_64 tower, but on my MacBook Pro running Fedora 16 i686, Qt had the right colours set for Gnome 3 by default.

I've since discovered it has to do with installation order. If you install Qt4 Configure before any Qt applications such as VirtualBox, Amarok or Opera, the Gnome 3 colours will be included by default. Interesting!