BenV's notes

Boring

Mounting partition in disk image

by on Jul.22, 2011, under Boring

This is already 20 times on google, but I hate searching so here we go another time.
And without tools that slack doesn’t have. Just the normal (s)fdisk etc.

Steps:
1. Figure out start offset for your image. You’re interested in “sectors of X bytes” and the number in the “Start” column for the target partition.

root@images:~$ sfdisk -lu sources.img
unrecognized format - using sectors
Disk sources.img: cannot get geometry

Disk sources.img: 261 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
sources.img1 63 4192964 4192902 83 Linux
sources.img2 0 - 0 0 Empty
sources.img3 0 - 0 0 Empty
sources.img4 0 - 0 0 Empty

2. Convert the offset in sectors to bytes by multiplying the two numbers you read from the output.
63 * 512 = 32256
3. Mount with an offset:

root@images:~$ mount -o loop,ro,offset=32256 sources.img /mnt

Done.

Leave a Comment :, , more...

Splitting up a PDF file

by on Sep.30, 2010, under Boring

If you have colleagues like mine you’ll eventually find an email in your inbox that’s about 20MB because of some PDF file attached to it. Apparently it’s some manual of a device that we work on, but I only care about 5 pages out of the 400-ish pages in the pdf. (continue reading…)

Leave a Comment :, , , , more...

Favicon.ico generation

by on Dec.30, 2009, under Boring

Since I keep forgetting how the heck I create these favicon.ico files (or favicon or Favorites Icon), it’s time to put it here. (continue reading…)

Leave a Comment :, more...

Cry me a river!

by on Nov.06, 2009, under Boring

As I often instruct people to do:

Cry me a river

Cry me a river

Stolen from Wayfinder’s blog – check it out, it has many more funny face pics, not to mention great music!

Leave a Comment more...

Pretty graphs!

by on Sep.24, 2009, under Boring, Software

Everyone loves them (except for idiots of course), pretty graphs that show fancy lines and stuff. Especially stuff.
For instance stuff like this:

Traffic graph

Traffic graph


Disk I/O

Disk I/O


HDD temperature

HDD temperature

Why make these graphs? Because you can. Because they can show you gradual changes that you normally wouldn’t notice because the change per day is only very little. Because they’re fancy. Because they can give an indication on how hot stuff runs. Because they can kill your mother while you sleep. Because they got all the legendary items that you’ll never have. Tons of reasons.
But mainly because they’re pretty 🙂 (continue reading…)

Leave a Comment :, , , more...

Do it yourself Bell Peppers

by on Sep.16, 2009, under Boring

Nope, no computer stuff this time.
When I’m not behind my computer I sometimes dare to enter the domain called “outside”.
If you like plants, and especially plants that are in some way ‘useful’ (in other words: they produce edible parts), you might want to grow some of them yourself. (continue reading…)

Leave a Comment :, more...

Firefox, nfs and libsafe

by on Sep.14, 2009, under Boring

Don’t ask me why, but as usual Firefox (3.5.3 in this case) has issues. If it weren’t for lotjuh I didn’t even try to fix them. But since she smiles at me in such a cute way sometimes, I’ll fix it for her.

The issue was on teigetje, you remember the box from the NFS story earlier today.
Starting firefox gave nothing, it was just stuck. Running a strace on it:

root@teigetje:~# strace -p 12111
Process 12111 attached - interrupt to quit
futex(0x8056c60, FUTEX_WAIT_PRIVATE, 2, NULL
*stuck*

The exact reason isn’t known to me, probably NFS related, but this works to get it going:

root@teigetje:~# vim /etc/ld.so.preload
i
#
:wq

In other words, this comments out the /lib/libsafe.so.2 line so it wont be loaded anymore using LD_PRELOAD.
But isn’t that unsafe?
Pfffrt…. if you insist on firefox you’re probably opening yourself up for Adobe issues anyway. And libsafe doesn’t really make stuff “safe”, it only tries to protect your machine against buffer overflow attacks. So now it’s up to your kernel to ‘safe’ you instead.

1 Comment more...

Aion

by on Sep.11, 2009, under Boring, Morons, Software

Lately I’ve heard some rumors about this new mmorhghhghg coming up called “Aion“.
Fileplanet (you know, the cancer popup site you sometimes get when you need to download a game patch and then need to click through 23894723897 registration things etc… which is barred from bugmenot…. *sigh*) handed out open beta keys. So I got one. And so did lotjuh.

Did I mention my machine doesn’t have windows? Makes it… interesting.
First we obviously tried wine. Well, it installs without much hassle, which is a good thing.
However, it doesn’t launch. Some piece of garbage called GameGuard doesn’t work on wine. And because it doesn’t, neither does Aion.
Great going Aion guys! Needless to say they couldn’t be arsed to write a linux binary for it, so they SUCK per default! They couldn’t even be arsed to write a Mac binary for it. Pffrt.

However, to make an interesting attempt to test out Virtualbox’s 3d acceleration support, I decided to install Aion in a virtualboxed windows xp that I “borrowed” from lotjuh.
Virtualbox is at version 3.0.6 these days, so first I installed the latest version.
The installation went fine:

Aion installation on XP in Virtualbox 3.0.6

Aion installation on XP in Virtualbox 3.0.6


Not only the installation, but also the updater ran fine:
Aion Updater

Aion Updater


Then the gameguard part came, it looked promising:
Aion GameGuard part`

Aion GameGuard part`


However, to all good things must come an end. So it dies because of hardware acceleration issues. No real surprise, but too bad for Virtualbox. Not there yet.
Aion dies

Aion dies


Maybe it’ll work one day when Virtualbox gets their direct3d working as well as wine has it working.

Anyway, from what I’ve seen of the game (it runs ‘fine’ on lotjuh’s PC with her “Seven” failure install), it’s a World of Warcraft wannabe.
Graphics are a lot better, they put in some cute stuff like when it rains and the character idles it’ll put a leave over their head. The movies are cute, the quests sometimes even show you stuff (like a little ingame movie of the target area) to go along with the text. But all in all it doesn’t look like a wow killer. No linux support (not even with wine), no mac support, and so far I haven’t seen a major reason for people to switch from wow to this game, except for the graphics. Then again, I’ve only looked at it for a short amount of time, maybe it’ll get better 😉
I’m sure they’ll get a decent amount of players though, it’s a good wow clone.
Story wise the game is fail, I could sum it up with “There were gods, and a planet, and now the planet is split in 2 half planets and the ‘people’ on those halves fight eachother”.

It asks for a stellar converter if you ask me. (master of orion 2 reference, can’t find a good image/video on google)

2 Comments :, , more...

Secret Maryo Chronicles

by on Aug.28, 2009, under Boring, Fun

So I was bored and went through the usual slashdot, kernel.org, freshmeat.net, etc.
Once reading through the news on happypenguin.org I noticed it must be mario season or something.
After checking the descriptions I decided to check out Super Mario^W^WSecret Maryo Chronicles.
(continue reading…)

Leave a Comment :, , , , , more...

The wonders of SSH forwarding

by on Aug.21, 2009, under Boring

This is trivial stuff, but nice to know.

Do they have a cute little firewall at your work that only allows outgoing traffic on a certain port? Does some site have retarded IP restrictions? Does the piratebay block you from home?
Have no fear, ssh is slow as a bear. (huh?)

Anyway, you could use an anonymous proxy to get around all of this, but they are often slow and hard to find. Not only that, they often require you to use a specific port.
So the simple solution for all this: use ssh. Of course this requires you to have ssh access on a machine outside of the network that you’re trying to get out of.
But if you don’t even have that, you probably suck anyway. (get lost with your micro~s fail piece of cardboard).

Solution #1, for simple TCP port forwards. For instance when you’re trying to access a remote snmp server that has the irc port (6667 by default) firewalled:

idiot@yourmachine$ ssh -L 1234:127.0.0.1:6667 ip.of.irc.machine
*username and password stuff*

After a successful login you can now connect an IRC program to localhost on port 1234 and it will act as if you were connecting to the remote machine directly. (bypassing the firewall).
Woei. Too bad this fails for UDP though. You also need to keep the ssh connection open, but that’s pretty obvious.

Solution #2, for a real proxy solution. When you’re trying to access a remote web server it becomes more annoying to use a simple port forward, since your browser will not pass the correct
information to the remote server. (It will say Host: 127.0.0.1 for where it was supposed to be Host: www.piratebay.org for example).
To make this work we simply turn ssh into a socks proxy like this:

moron@yourmom$ ssh -D 1234 ip.remote.shell.machine
*username and password stuff*

Now you can enter localhost and port 1234 in your browser’s proxy configuration in the SOCKS proxy section. Magic, you can now go to any site and it will be tunneled through the nicely encrypted ssh session. (although it might be a bit slower).

Well, so much for the obvious stuff today.

1 Comment :, , , , more...

Archives

  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)