Translate

Archives

The Boot To Gecko Project

Mozilla believes that the web can displace proprietary, single-vendor stacks for application development. To that end, some time ago, Mozilla started a project called Boot to Gecko (B2G) to pursue the goal of building a complete, standalone operating system for the open web. The B2G roadmap was recently updated and shows that they are on track to to demo a product some time in mid to late 2012. This is a further step on a journey that has been happening for some time now, i.e the commoditization of the operating system. The operating system is no longer an important part

Multiarch

Multiarch is a general solution for installing libraries of more than one architecture on a system. It was first proposed in 2004. It solves the problem which was created when Linux distributions standardized on the /lib and /lib64 directories for libaries. The core concept is to put libraries for each architecture into architecture-specif ic paths. For example, /usr/lib/libfoo (amd64) —> /usr/lib/x86_64-linux-gnu/libfoo /usr/lib/libfoo (armel) —> /usr/lib/arm-linux-gnueabi/libfoo /usr/lib/libfoo (i386) —> /usr/lib/i386-linux-gnu/libfoo GNU triplets are used for architecture paths, with some adjustment for historical cruft. While I do not particularly like the proposed names for the architecture specific directories, the general idea has

Change MAC Address

In IEEE 802 networks, the Data Link layer of the OSI Reference Model is divided into two sublayers: the Logical Link Control (LLC) layer and the Media Access Control (MAC) layer which interfaces directly with the network medium. Consequently, each different type of network medium requires a different MAC layer. On networks that do not conform to the IEEE 802 standards but do conform to the OSI Reference Model, the node address is called the Data Link Control (DLC) address. If you are using Linux, you can use the macchanger utility to change the MAC address of a network card.

Copy DVD to Image File

On Linux, /dev/cdrom, /dev/dvd and /dev/cdrw are usually just symbolic links to /dev/sr0 or some other optical disc device. The following example shows one way to copy a a CD-ROM or DVD to an ISO file. dd if=/dev/dvd of=dvd.iso This mostly works, but sometimes a few extra NULL blocks are copied which will cause the DVD checksum not match the ISO image file checksum. The following will create an image of a DVD while ensuring that the image will have exactly the same checksum as the DVD itself: # COUNT=$(isoinfo -d -i /dev/cdrom) # dd if=/dev/dvd bs=2048 count=$COUNT conv=notrunc,noerror >

Sprintf Portability and Leading Zeros

On some platforms, code such as the following can be used to output a string with leading zeros left padded to a length of 4. sprintf(*str, “%04s”, *pstr); This works on AIX for example. However if the same code is compiled on Linux using gcc, it outputs leading spaces, padded to a length of 4, instead of leading zeros. There is no simple way to fix this behavior. This particular usage of leading zero padding with the string format is explicitly undefined in the various C standards. What is outputted depends on a platform’s libraries rather than the compiler. As