Mounting UFS2 read/write on Linux

Tags: , , ,
No Comments »

I recently had the need to mount an UFS2 (NetBSD) partition under GNU/Linux, and while this is surprising, a standard Linux distro, Debian in my case, is not able to mount it in read/write mode.

I came across this project https://github.com/DanielO/fuse-ufs2 which has basic UFS2 read/write support. It is not very stable, I made it crash a couple of times while using vim on the mounted partition, but it does support simple operations like cp, rm and such.

Here’s how to build and use it under Debian Wheezy:

apt-get install build-essential fuse libfuse-dev autoconf automake libtool git libbsd-dev e2fslibs-dev 
git clone https://github.com/DanielO/fuse-ufs2
cd fuse-ufs2
./autogen.sh
./configure
vim fuse-ufs/do_fillstatbuf.c

Comment out the __st_ino. Do the same operation for fuse-ufs/op_readdir.c

make
make install
fuse-ufs /dev/xvda3 /mnt -o rw

Replace xvda3 with the actual partition you need to mount.
You can now access your UFS2 partition :)

Holidays (IT)checklist

Tags:
2 Comments »

Well, it’s that time of the year again, next week I’ll be flying to my beloved Ibiza.

Being an Internet/IT junkie, I don’t exactly “disconnect”; actually I like to read / dig / test some new topics while on holidays (and while I’m not at the beach / clubbing / sunbathing). So every year I go through a particular “checklist” in order to be sure I can connect to the Internet no matter what, here’s the list as of now:

  • A dual-Atheros-based OpenWrt access point
  • Serial cable in case of AP bricking ;)
  • A power strip
  • One directionnal antenna
  • One omnidirectonnal antenna
  • A 10m ethernet cable
  • SDcard USB adapter
  • A UNIX based laptop
  • OpenVPN
  • aircrack-ng (you know, for… things)
  • wireshark
  • tshark
  • ettercap
  • metasploit (for research purposes only)
  • OpenSSH public key deployed on every machine I’d like to ssh to
  • A fallback SSH server with password access (strong one)

Any idea that comes to mind? :)

virt-manager: “nc: unix connect failed”

Tags: , ,
No Comments »

I came across an annoying behaviour while trying to connect to a remote KVM hypervisor from a FreeBSD GUI. virt-manager failed to connect to the server and showed the following error message:

libvirtError: End of file while reading data: nc: unix connect failed: No such file or directory: Input/output error

In short, virt-manager tries to access to /usr/local/var/run/libvirt/libvirt-sock because it is compiled with a /usr/local PREFIX on FreeBSD. Of course they didn’t plan anything on a plain text configuration file. I figured out this has to be configured in GConf, for example using gconf-editor, simply replace:

qemu+ssh://user@host/system

with:

qemu+ssh://user@host/system?socket=/var/run/libvirt/libvirt-sock

Other parameters for remote URIs can be found at this address.

FreeBSD 10, KMS and Intel 4500MHD

No Comments »

I recently borrowed a Dell machine at work, model E4300, a nice little laptop whose graphical display is done by a much common Intel 4500MHD. While the card worked out of the box for a classical 2D display with a fresh FreeBSD 10.0 install, I noticed that DRM/DRI (in short, 3D) wasn’t available; I knew it was somewhat related to the new KMS/GEM infrastructure, so I began a few searches and found those useful resources:

Those pages gave bits and pieces of information, but stack a lot of useless complex information for the newcomer. Actually, setting up KMS on FreeBSD 10 is pretty simple. Olivier and farfa gave me the right link: a post on the FreeBSD announce mailing list which explains that there’s an alternative repository for what they call “NEW_XORG”, aka Xorg 1.12.4 with KMS. Simply create a new pkg configuration file in /usr/local/etc/pkg/repos/FreeBSD_new_xorg.conf (create the directory if it does not exist), it must contain the following:

FreeBSD_new_xorg: {
   url: "pkg+http://pkg.FreeBSD.org/${ABI}/new_xorg",
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",
   enabled: yes
}

Then run:

# pkg update -f
# pkg upgrade

You should be asked whether or not you want to upgrade a couple of packages, and among them, some Xorg-related packages.

There was one glitch on this process, xf86-input-keyboard and xf86-input-mouse actually have the same version in the standard pkg repository and the WITH_NEW_XORG repository, so it is mandatory to delete them using:

# pkg delete -f xf86-input-mouse xf86-input-keyboard

Then add:

WITH_NEW_XORG=yes

to /etc/make.conf, ensure your ports tree is up to date by running:

# portsnap fetch update

and rebuild xf86-input-keyboard and xf86-input-mouse with portmaster:

# portmaster x11-drivers/xf86-input-mouse x11-drivers/xf86-input-keyboard

If you don’t do this, Xorg will start but its log will explain the mouse and keyboard driver ABI mistmatches Xorg current version.

Restart Xorg, and enjoy your GLX-enabled environment :)

Back to 2000-2005: FreeBSD desktop

Tags: , ,
2 Comments »

A while ago, I had my ${DAYWORK} workstation running NetBSD, and honestly, it did pretty well. Things began to become more painful when there was no more DRI acceleration with the radeon driver, it then did an okay-ish job, but the overall desktop became somewhat laggy.
It was told someone was working on porting KMS/GEM, that was more than a year ago, and as of today, that work -and I guess it is not an easy one- isn’t mature enough to be used as a workstation, I need my desktop to run various tools, and not only terminal-based ones.
Two weeks ago, I asked for a new desktop, more powerful, so I can run more virtual machines with it. That new box was shipped with an nvidia graphic card and various modern components which I knew were not supported by NetBSD. This is one regret I have about that beautiful project, running on VAX, PlayStation 2 and Amiga is fun, but I’ll tell you a little secret: nobody cares anymore about VAX, PlayStation 2 and Amiga.
So I gave FreeBSD 10 a try. And I was not disappointed: everything, and I mean everything worked almost out-of-the-box. Of course there was a bit of fighting with the proprietary nvidia driver, but it worked as expected with 3D acceleration and all.
Not everything is perfect either, but I must say FreeBSD does a great job as a workstation, actually, it does what I needed: display a decent 2014 hardware powered desktop, no more, no less.
Under no circumstances will I replace my NetBSD servers / virtual machines (as long as they still support the underlying hardware!), they do an amazing job and I am quite happy with them, but don’t expect desktop-related commits from me to pkgsrc for the time being…

Update

Well well, this blogpost have bring much unexpected rage. Just to clarify: this is definitely not a troll or whatsoever, only an end user opinion on what’s preventing me of using NetBSD as a desktop at work for the moment.
Read the previous sentence a couple of times and notice the word “work”, the place where you can’t spend countless hours patching / tuning / trying / crashing / rebooting (sounds like a Daft Punk song) before you can reply to an urgent customer inquiry. Yes, that place. The only thing I say is: FreeBSD, as of today, does a better job at being an out-of-the-box modern desktop.
I will continue to use NetBSD as my server OS of choice, because it does rock, because it is stable, simple and fills the task perfectly. As soon as it doesn’t anymore, I’ll switch to something else, that’s what I do. Pragmatic.
So yes, I have the weakness to like shiny desktops that run something else than twm, I like transparency, I like effects when I change my virtual desktop, I like my windows to be displayed and moved rapidly, you know, pretty much like all those BSD developers that actually use OSX because it does all those things.
I will also continue contributing to pkgsrc, because it is in my optinion the most beautifull packaging system around, all I’m saying is that I won’t commit desktop-related tools I can’t really test or use. Nothing more.

Plus qu’un blog post

Tags:
3 Comments »

Ok, je vous l’accorde je poste pas des masses. MAIS ! je n’écris pas moins. Et je le prouve.
J’écris depuis plusieurs années pour le vénérable GNU/Linux Magazine France, ces articles, je les propose sous licence Creative Commons BY-NC-ND, cela signifie que 4 mois après leur parution dans le magazine, moyennant une rémunération moins importante par article, ces derniers sont publiquement et gratuitement disponibles en ligne.
Comme je ne suis pas certain d’avoir exhaustivement listé les articles disponibles ici, voici les liens directs vers les articles récents, et n’hésitez pas à vous perdre dans les milliers d’autres contributions !

D’autres sont en attente de publication, comme par exemple la serie sur Salt et Flask, stay tuned.

WP Theme & Icons based on GlossyBlue by N.Design Studio
Banner from www.trynthlas.com
Entries RSS Comments RSS Log in
Optimization WordPress Plugins & Solutions by W3 EDGE