The many ways PCs can dual boot multiple OSes
In response to yesterday's entry , acommentator asked a question related to dual booting. That means it'stime to open the can of complexity that is dual booting on PCs. One ofthe reasons that dual booting is much more complex than how PCs bootthe main OS is that there are at least threedifferent ways that you can boot an alternate OS:
- you can load the other OS's boot sector and jump to it, just as ifit was the real MBR being loaded by the BIOS
My mouse button bindings in fvwm, my window manager
I've previously described my X Windowswindow manager as highly customized. If you've looked at the pictureof my desktop , this may sound a little bit overdone;sure, it looks different, but a lot of that is just running customprograms and a fair amount of the rest of it is ultimately chrome andnot crucially important. As it happens, the visual appearance of mydesktop is just the tip of the iceberg; most of my really hard to partwith customizations are in mouse and keyboard bindings
On how PCs boot and hard disk partitioning
Starting from the very early days, PCs have booted in a very simplemanner: the PC BIOS found the boot disk, loaded the first 512 bytesector from it into memory, verified that it had a valid MBR signature , and then jumped tothe start of the sector (which had better be code). That was it. Thecode in the boot sector was responsible for doing everything else,calling on BIOS services as necessary for things like reading more datafrom the disk.
(Generally the code
The alternate screen terminal emulator plague
There is one bit of behavior in modern X environments that drives meup the wall: the use of 'alternate screens' in terminal emulators (andin programs). That's probably obscure to most people, so let me put itthe other way; what drives me up the wall is when I edit a file in vi or view it in a pager like less , quit, and all of the text that Iwas just looking at instantly disappears in favour of what was on thescreen before I started
The login name problem
I have been vaguely considering getting a Twitter account or twofor a while , but so far haven't done so. Asbefore , the big stumbling block is thatTwitter makes you pick a username and none of the ones that I findeven vaguely attractive are still available. My usual login nameis taken , as normal (it goes fast onmany services). So is my last name (probably by a relative), my first name , a variant I sometimes use , a variantof my last name
Why processing things in inode order is a good idea
In a note on yesterday's entry on readdir()'s ordering ,a commentator wrote (in part):
Note many utils use FTS which sorts directory entries by inode [...]
It may not be obvious why this is a good thing to do, so let me takea shot at it.
Suppose that you want to do something that either looks at ortouches the inodes of the files in a directory; perhaps your ls or find needs to stat() them, or your chmod
About the order that readdir() returns entries in
In a mostly unrelated article (seen via Planet Sysadmin ) I recentlynoticed the following:
readdir(3) just returns the directory entries in the order they arelinked together, which is also not related to inode numbering but asbest as I can tell is from outer leaf inwards (since the most recentlycreated file is listed first).
On most systems, readdir(3) is a modestly warmed overversion of the underlying 'read directory entries'system call, and returns directory entries in the same order that
Python instance dictionaries, attribute names, and memory use
In a comment on my entry on what __slots__ are good for , Max wrote:
On the other hand, having __slots__ saves the strings that theinstance dictionary entries would point to for the attribute names. Ona 4 byte string platform, that adds up quickly too.
Although one might naturally think that this is the case, CPython isactually sufficiently clever that it is not so; using __slots__ doesn'tsave you any memory for attribute names because the
About SATA port multipliers
I mentioned SATA port multipliers in passing yesterday but then I just assumed thateveryone knew what they are (as I have done before ). So, time for the explanations.
Put simply, SATA port multipliers let you talk to severaldisks over a single SATA port and cable. If you're old enough, you maynow be asking why we'd want to get rid of one of SATA's advantages andgo back to the bad old days of things like SCSI and multi-device IDE.The
The many names of Linux SATA devices
If you have SATA devices on your Linux system, the kernel gives them noless than four different names in four different namespaces (althougharguably one of the namespaces is not really a kernel one). Because Irecently had to deal with this, I feel like running down all of them.
The four namespaces are:
- Traditional
sdXnames likesdj. Unless udev is playing around withthem for you, these are allocated sequentially in the order thatthe SATA (or SCSI-like) drives are encountered. If you