Using a vfat filesystem sanely in Linux

May 1st, 2006

Here is how I set up my fstab to automatically mount my vfat partitions, owned by a single user, at boot:

/dev/hdg1 /home/nemesis/mnt/c vfat defaults,user,dmask=022,fmask=113,uid=nemesis,gid=disk,noatime 0 0

The mount point is under user nemesis's home directory and owned by the user.

The 'user' mount option allows the user owning the mount point to mount and unmount the volume. Even though it is mounted automatically at boot, this can still be handy. It also implies the 'noexec', 'nosuid' and 'nodev' options, meaning that execution of files is not permitted (WINE will still work), files with the suid bit are not allowed, and device special files are not allowed.

Since vfat (FAT32) has no concept of security, the ownership and permissions must be synthesized.

uid=nemesis means the user 'nemesis' will be the Unix owner of all files and directories in the filesystem.

gid=disk means that all files and directories will be under group 'disk'.

dmask=022 means that directories will have a mode of 755, corresponding to rwxr-xr-x.

umask=113 means that files will have a mode of 664, corresponding to rw-rw-r–.

This setup means that files will not be falsely flagged as executable while the noexec option disallows executing files. It also means that only user nemesis and group disk can write to the filesystem.

Unfortunately, the vfat driver has no 'sync' or even 'dirsync' support, so preventing data corruption in an unclean shutdown (i.e. due to a WINE/video driver crash) or in an unexpected media removal (i.e., a USB flash device) is impossible. Using autofs to manage removable vfat media is currently the best option.

The 'noatime' option prevents the vfat driver from updating the access time in the file metadata on each access, a typically useless source of overhead.

Climate Change

May 1st, 2006

Is global warming actually occurring? If so, why do we seem to be in a local cooling trend?

If global warming is occurring, is the magnitude of the warming unprecedented?

If unprecedented global warming is occurring, is it the result of the greenhouse effect, or some other natural process?

If global warming is occurring because of the greenhouse effect, is it due to CO2 or some other greenhouse gas, is it possible that some other atmospheric agent that was previously absorbing solar radiation is dwindling, and what is the magnitude of the greenhouse effect's contribution compared to that of other sources?

Is it possible that elevated CO2, and thus a greater magnitude of warming due to the greenhouse effect, follows global warming that is initiated by some other means, as opposed to CO2 being the direct cause of the warming process?

If global warming is occurring primarily because of CO2's contribution to the greenhouse effect, how much CO2 emission is under our control? Can we reverse the warming trend even if we zeroed CO2 emissions overnight?

Is a precedented level of global warming a net benefit or a net detriment to the US? What about globally? What about an unprecedented level?

If global warming is a net detriment, what would the impact of a significant enough emissions restriction to reverse the warming process be, in terms of economic growth and in terms of poverty and lost lives -especially in undeveloped nations?

Samsung memory, PC100/PC133 and CL2/CL3

April 29th, 2006

Don't get snookered when buying memory for an older system.

Example: Samsung KM440S16030CT-GL
-GL means PC100/CL3
-GH means PC100/CL2
-G8 means PC133/CL3
-G7 means PC133/CL2

CL2 is ALWAYS better than CL3. PC133 is only better than PC100 if you are able to clock your bus higher than 100MHz. On i440BX systems as an example, this is undesirable because the AGP bus will be overclocked (the smallest ratio available on BX is 2/3). So when upgrading RAM, get PC100 CL2, or -GH in that case.

I am not sure whether PC133/CL3 (i.e. 8ns) memory can be safely run at CL2 in a PC100 board.

Many people posting memory on eBay are GUESSING as to its performance characteristics. Make sure you know before you waste money bidding on something that isn't really worth that much.

Politics and values

April 29th, 2006

… are often confused. For example, the communist who votes for socialist candidates in the US, despite socialism being widely reviled and practically unworkable. This communist assumes that because he lives in a successful commune with several others, that this will translate into successful policy for society. He ignores that while he possesses the ethic of society-above-individual necessary for communism to work, regardless of whether such an ethic is good or bad, others do not necessarily possess it. If his plan were placed into action, it would be a failure.

Are we better served when people attempt to vote and legislate their individual values onto society? After all, their values, even if inefficient or harmful, will only take hold if enough others agree with them.

Or are we better served when people use a more universal metric for gauging the value of political efforts, such as the sum total of happiness for example?

This is not appeasal. Appeasal means to make free riders happy at the expense of others who are made less happy. The happiness created at the targets of redistribution is negated at perhaps an even greater magnitude at the source of the redistributed wealth.

This is not hedonism. Hedonism espouses a reckless disregard for the consequences of actions. But we should be certain that we are not manufacturing consequences in order to make fables out of individuals' lives. And we should be sure that when technology presents solutions that can prevent those consequences, that we do not use circular thinking to obstruct such measures.

The golden rule, as in do unto others only what you would allow them to do unto you, only works if individuals are social and rational, i.e. that they value fellow human creatures and that they value that which fosters happiness and survival. Individuals who are anti-social or who somehow obtain happiness from self-harm could use the golden rule to justify harming another.

What if throwing oneself on the sword would increase the sum total of happiness? Then this turns into collectivism. What if killing another would increase the sum total of happiness? Can such a metric be used as a moral compass? The very thought is disturbing. That action could be justified by other means, perhaps in terms of retribution, if the man had inflicted at least that amount of harm on another. But it is difficult to justify in terms of simply weighing the termination of his individual happiness against those whose happiness would be increased upon knowledge of his death.

Whether our autonomy is an illusion or not, it is fundamentally all we have. As soon as we hand over the reins to fate and become spectators in our own lives, we have ceded any meaning in our actions. Lack of autonomy implies nihilism. Does nihilism increase happiness? Maybe for those for whom autonomy is a curse rather than an exquisite and unique privilege.

What happens when the reactionary survival instinct of a nihilist clashes with the examined plan of an autonomous individual? Since the nihilist values nothing, is it okay to disregard his instincts as we disregard those of beasts? How can one empirically, and externally, determine whether another truly holds no autonomy, no values and thus no happiness, in which case their life is an objectively valueless slideshow of sensations that can be discarded if it interferes with the happiness of one who does hold values?

Then again, if our senses were wired into a perfect simulator of nirvana, we could obtain ultimate happiness even though autonomy would in reality be non-existent…

Social science as a basis for government

April 17th, 2006

The utility of the area of study referred to as the social sciences rests on several assumptions.

The first assumption is that behavior of a large and diverse demographic can be predicted using results from a relatively minute sample set. A statistical significance test can usually falsify a social sciences result prima facie.

The second assumption is that in a social sciences study, it is possible to control for all confounding factors. Given the richness and depth of the individual human experience, this seems unlikely. Even if diversity is superficially maintained, a closer examination shows that it is impossible to account for all sets of inherited and learned behavior traits, nullifying any conclusions. Because of this inherent weakness, controls in social science studies are easily attacked. Critics of social science are brought out as being “pedantic” or “antisocial” or “not willing to compromise” or “unconcerned with the fate of the children”; or accused themselves of whatever allegedly immoral behavior is under attack, or of supporting some other clearly immoral behavior that happens to have some spurious association with the behavior under attack.

The last assumption is that predicting the behavior of autonomous, sentient individuals is within the scope of science itself. Science can only be used to divine facts and make predictions regarding deterministic systems. Behavior is not deterministic, because behavior can change whimsically, or it can change because the subject realizes they are being observed. The behavior may change to “good” behavior, to avoid engaging in a criticized activity, thus tainting the result; or it may change to “bad” behavior, to thumb one's nose at the establishment, to defy authority and dare to do that which is under criticism – also tainting the result. Social science assumes that behavior is ordered and caused. This places self-determination in a very low regard.

I believe (but cannot prove) that all are false. Repeated observation has shown that whenever social science is used to determine public policy, the outcome rarely if ever meets expectations, while increased government police power and economic meddling is justified as necessary to implement the policy and prevent it from failing. Failure, however, is usually rewarded with more funding or increased powers, in an attempt to stem the tide of whatever hated behavior continues to take place.

Fortunately, social sciences are usually only used to justify nanny-state behavior and/or thought control, so the philosophical justification for such controls can be challenged simultaneously with the practical results they fail to bring.

legality, morality, ethics

April 16th, 2006

An ethos is a test to determine whether some controllable, deterministic eventual outcome is good (ethical) or bad (unethical). Ethical study is the process by which an ethos is derived.

Morality is the mapping of a sentient, autonomous individual's actions onto an ethos in order to determine the sets of actions that are right and wrong. If an action is moral, it is necessarily ethical. An action can be moral or immoral depending on circumstance, because the same action can have different outcome events in different contexts. If the individual, as a sentient being, had knowledge or could have reasonably predicted that the outcome of his action would have been an unethical event, the act was immoral. However, given an action with mixed ethical outcomes, is an action both moral and immoral, or does the greater moral direction dominate the act into a binary classification?

Legality is often misconstrued as the forceful encoding of a morality. In fact, what is legal is not necessarily moral, simply because government force cannot be efficiently and accountably used to stop certain acts. And what is illegal is not necessarily immoral, because government is not always accountable and democratic. There must be a significant overlap for the government not to be overthrown, but morality and legality are not a 1:1 mapping in any real world society.

The argument that something is immoral because it is illegal is thus a weak argument. The assumption must be made that following the law is ethically right. Since the law is made by men, that ethos is a framework for manipulation and control by those who act immorally relative to the subject.

A buyer's guide to HP 92275A toner cartridges

April 12th, 2006

If you're anything like me, you probably have anywhere from 5 to 10 HP laser printers laying around in varying states of disrepair. When a friend mentions needing a reliable printer, you cobble together a working one from various carcasses, buy new rollers and a toner cartridge, and hand off to him, satisfied that you've done a good deed by keeping a workhorse printer out of the dumpster and at the same time helped a friend.

Except, when it comes to the 92275A toner cartridge for the IIP and IIIP series of printers with the Canon LX engine, it just isn't that easy.

First of all, never buy remanufactured toner cartridges for this printer. The reason is that the remanufacturers do not replace the rubber wiper inside the toner cartridge. This wiper is responsible for removing unused toner from the drum. When it fails, toner will be left on the drum, eventually causing streaks and afterprint on the page. The wiper does not last long. If the remanufacturer DOES state that they replace the wiper and have a good reputation, you should be fine.

When buying NEW toner cartridges, beware. New toner cartridges only have a shelf life of a few years, even in a sealed box. After a certain amount of time, the toner congeals and will fail to transfer to the drum during a print job. Check the expiration date on the outside of the package. You will find that on many old-stock toner cartridges, especially those sold by wholesalers and online auction vendors, the “Sell-By” expiration date has been removed. If the expiration date has been removed, DON'T buy the cartridge. There is no other reason to remove the expiration date besides to conceal the date of manufacture.

Now, there are three kinds of boxes that this toner was shipped in. In order of oldest to newest: a brown box with green/blue print and a green and white label, a white/blue/purple box, and a white/blue box. If it is not in the white/blue box, don't buy it – the brown boxes are at least 10 years old, and the white/blue/purple boxes have been sitting around for quite a while at least.

Now, if you got a toner cartridge and it's not printing – don't panic yet. Did you remember to shake the cartridge back and forth several times? Did you remember to remove the sealing strip? If you did, did it come out in one piece approximately 1.5-2X as long as the cartridge is?

If you did all those things and it's still not printing (but another cartridge does print), you are the lucky owner of a stale toner cartridge. Get your money back as soon as you can. I recommend using Paypal to pay for toner cartridges that aren't coming from a known, trusted source, for this reason – you can use Paypal's arbitration process to get your money back if there is a problem.

Selecting the best Debian mirror

April 5th, 2006

I always thought this was a process that had to be done by hand. Enter netselect.

# apt-get install netselect netselect-apt
# netselect-apt testing

After issuing those two commands, you will have in the current directory a sources.list suitable for adding to /etc/apt/sources.list to replace the existing mirrors in there. Netselect automatically determines the server with the best network conditions, taking all the work out of it.

copyright

March 27th, 2006

Is the intent to provide incentive to create, or to provide opportunity to create? To me, providing incentive is the equivalent of dangling a carrot in front of the hitherto idle musician. He will only create when the reward is sufficient. Is that a philosophy within which great art is created?

The opportunistic musician, on the other hand, creates constantly without needing any incentive to do so – the copyright privilege, when invoked, lends to him the economic opportunity to devote his time exclusively to artistic pursuit.

I believe there is a fine distinction here that is missed by both sides of the copyright debate. Incentive is a nice thing economically, but pure incentive, like the ownership metaphor, should not be the end goal of copyright – copyright should be viewed first and foremost as a mechanism to provide _opportunity_ to advance the sciences and useful arts. Would-be artists who only cash in and create something when the incentive is sufficient were not who the framers had in mind… and since they are only pandering and not advancing the state of the art, we shouldn't pay them much heed when they demand more and more protection in order to continue creating.

“The primary objective of copyright is not to reward the labor of authors, but '[t]o promote the Progress of Science and useful Arts.'” – Justice Sandra Day O'Connor, writing for the majority in Feist v. Rural Telephone Service Company, Inc. (1991)

If vim suddenly won't display help…

March 27th, 2006

I was getting this strange message when attempting to invoke vim help:

Sorry, help file “/usr/share/vim/vim64/doc/help.txt.gz” not found

What was strange is that path did not exist even. I was about to file a bug when I checked my $HOME/.vimrc, and lo and behold this little gem was in it:

” Debian uses compressed helpfiles. We must inform vim that the main
” helpfiles is compressed. Other helpfiles are stated in the tags-file.
set helpfile=$VIMRUNTIME/doc/help.txt.gz

Commenting out that last line fixed the problem.

Oh, and if you want to reformat a text document where the lines are too long:
:set textwidth=60 (or some other reasonable number)
Then highlight the text in question, and hit 'g' then 'q'.