I spent a big part of yesterday manually moving a Vista NTFS partition. It was frustrating but I learnt something.
The obvious part is moving the data. The new and old positions didn't overlap, so I could just create a new partition and copy the data. I booted a Ubuntu CD in single user mode, created a partition with fdisk and copied the data with dd, specifying a large block size to speed up the copy. I made the new partition active (boot flag), the old partition un-active and I hid the old partition by changing its type to 0x17. This results in a readable but unbootable partition.
The first issue boot issue is the Vista boot configuration data store (which may be edited with bcdedit in Vista). Booting off a Vista DVD and running the automated startup repair can fix this; Vista will add the partition as a "(recovered)" entry to the boot menu. However, Partition Saving seems like a better choice because it will allow you to alter all the entries. After this is fixed, Vista would appear to boot ok but after logging in practically nothing would work because the moved partition is mounted as something other than C:.
Vista's automated startup repair doesn't seem to be able to fix the drive letter issue, but it may be fixed manually by running regedit, loading the system hive and editing entries in MountedDevices. Partition Saving can quickly and easily fix the problem, and so I recommend it for both of these problems. After this, everything may seem to work, but that's deceptive because the boot is still using parts of the old partition. If the partitions get out of sync, mysterious boot problems can occur. If you're lucky, you'd get "A disk read error occurred" followed by "Press Ctrl+Alt+Del to restart", but the boot could simply hang with no error message.
In order to fix the boot sector problem, I looked at information about the XP boot sector and considered trying to understand where it might be failing or even trace through the code. After I learnt that the boot sector loads additional sectors following it and noted that some error messages aren't used by the boot sector itself I realized that the code it loads might be failing and just using the error messages in the boot sector. I found a blog post about avoiding "disk read error occurred" after resizing. That was not it; the geometry was correct. However, it drew my attention to "Number of Hidden Sectors" at offset 0x1C in the boot sector. This had to be the sector number that the boot sector is at. It was still pointing to the old partition. After fixing that with a disk editor, everything seemed fine.
There was one remaining issue I remembered: there was a backup boot sector. I ran TestDisk and it found that the boot sector differed from its backup now. I then told it to copy it to the backup. (TestDisk is great utility for undeleting partitions. The boot sector backup saved me once when an attempt to install MS-DOS 6.22 started reformatting the HD and overwrote the boot sector.)
While doing all this I also learnt about Bootrec on the Vista DVD and bootsect.exe. While both of these Microsoft utilites can rewrite the boot sector, they don't seem to fix the sector number at offset 0x1C. Chkdsk is also useless here; it won't notice that anything is wrong. All this makes me very disappointed about Microsoft's automated repair tools. They did do one thing right however: the Vista recovery environment is like a LiveDVD which allows you to use some standard Vista tools like regedit.
Sunday, February 24, 2008
Saturday, February 23, 2008
There's too much spam on Yahoo Messenger
There's too much spam on Yahoo Messenger, and Yahoo seems to do nothing about it. It's all very similar. The accounts names look as if they're generated by the same algorithm. Each message includes one randomly selected emoticon. Finally, and most importantly, each message contains the URL of some web site with the characters of the URL alternating with non-printing characters, as if I was viewing UTF-16 as 8-bit.
Messenger spam is especially annoying because the message results in an open window "in my face". Yahoo seems to be able to handle e-mail spam; I get practically none. So why cannot they handle Messenger spam? I've already set Messenger to not allow Yahoo web sites to show I'm online. So the only option available to me is "Ignore anyone who is not on my Messenger list". It's too bad that I've been forced to set that, but there are plenty of other ways to contact me.
Edit (Feb 26th): I had a Yahoo IM link in my profile on Blogger. I wonder how much of the spam was because of that.
Messenger spam is especially annoying because the message results in an open window "in my face". Yahoo seems to be able to handle e-mail spam; I get practically none. So why cannot they handle Messenger spam? I've already set Messenger to not allow Yahoo web sites to show I'm online. So the only option available to me is "Ignore anyone who is not on my Messenger list". It's too bad that I've been forced to set that, but there are plenty of other ways to contact me.
Edit (Feb 26th): I had a Yahoo IM link in my profile on Blogger. I wonder how much of the spam was because of that.
Wednesday, February 20, 2008
Photos of the total lunar eclipse
I just took some photos of the total lunar eclipse using my Olympus C-770 Ultra Zoom camera. 10x optical zoom is insufficient for photos of the moon. I ended up using the "Super Zoom" mode which crops the image to 1600x1200 while possibly zooming a bit more. I'm not really happy with these images, but I guess they're not too bad based on friends' reactions and considering they come from a consumer camera.


Conflict between Redirect Remover and Secure Login Firefox extensions
Recently I found Firefox was crashing regularly. It crashed more often than Netscape or IE ever did. Then one time I finally found how to reproduce the crash. The link to one story on Reddit would always make Firefox hesitate and promptly crash. I first noticed this because the story was at the top of the Reddit home page. Fortunately, the crash also happened on the story's comments page, and so it didn't depend on the layout of the home page.
At first it seemed like a problem with Redirect Remover because that extension was active on the link, and its special cursor remained even after I moved it off the link. However, then I thought that it might be a conflict with another extension, and through a binary search I found that it was a conflict with Secure Login. In order for the crash to occur, both extensions needed to be enabled, the page couldn't be loaded from a local file, I had to be logged in to Reddit, and a password had to be saved for reddit.com. Finally I found a workaround: disabling "Automatically search for login data and highlight form fields" in Secure Login. I've sent information to authors of both extensions and I've submitted a Firefox bug report via Talkback. In the meantime, the workaround isn't a problem and Firefox is totally stable.
At first it seemed like a problem with Redirect Remover because that extension was active on the link, and its special cursor remained even after I moved it off the link. However, then I thought that it might be a conflict with another extension, and through a binary search I found that it was a conflict with Secure Login. In order for the crash to occur, both extensions needed to be enabled, the page couldn't be loaded from a local file, I had to be logged in to Reddit, and a password had to be saved for reddit.com. Finally I found a workaround: disabling "Automatically search for login data and highlight form fields" in Secure Login. I've sent information to authors of both extensions and I've submitted a Firefox bug report via Talkback. In the meantime, the workaround isn't a problem and Firefox is totally stable.
Tuesday, February 19, 2008
Fidel Castro did a good job
It seems that Fidel Castro's government did a good job in Cuba. If one compares Cuba with other large independent countries in the Caribbean, one notes that Cuba is doing better in most ways. A comparison with developed countries or the territories of developed countries would not be fair. However, Cuba beats Puerto Rico (a territory of the US) in many categories and it even manages to beat the US in infant mortality, literacy and some other categories. This is all despite the US embargo and the collapse of the Soviet Union. All this makes Cuba seem like a socialist success story.
I'm amazed by how some people, especially Americans, attack Castro and Cuba. It seems like an irrational hatred of "communism" and attachment to democracy. The government works. It's like those people value the ability to complain about the government more than the performance of the government. One has to consider what has happened to other countries in the region to get a realistic picture of the alternatives. Haiti and the Dominican Republic have had democratic elections but also coups and other violence. It would probably be unreasonable to imagine that Cuba would have been a stable democracy (like the US or Western Europe) all this time if it wasn't for Castro.
Finally here's some information from the CIA World Factbook. Remember, this comes from the US government. It is not "communist propaganda". The country names link to the pages for that country at the CIA site.
I'm amazed by how some people, especially Americans, attack Castro and Cuba. It seems like an irrational hatred of "communism" and attachment to democracy. The government works. It's like those people value the ability to complain about the government more than the performance of the government. One has to consider what has happened to other countries in the region to get a realistic picture of the alternatives. Haiti and the Dominican Republic have had democratic elections but also coups and other violence. It would probably be unreasonable to imagine that Cuba would have been a stable democracy (like the US or Western Europe) all this time if it wasn't for Castro.
Finally here's some information from the CIA World Factbook. Remember, this comes from the US government. It is not "communist propaganda". The country names link to the pages for that country at the CIA site.
| Cuba | Jamaica | Dominican Republic | Haiti | Puerto Rico | USA | |
| Life expectancy | 77.08 | 73.12 | 73.07 | 57.03 | 78.54 | 78 |
| Infant mortality | 6.04 | 15.73 | 27.94 | 63.83 | 7.81 | 6.37 |
| Literacy | 99.8% | 87.9% | 87% | 52.9% | 94.1% | 99% |
| Unemployment rate | 1.9% | 10.2% | 15.5% | widespread | 12% | 4.6% |
| GDP per capita | $4500 | $4800 | $9200 | $1900 | $19600 | $46000 |
| GDP real growth | 7.0% | 1.5% | 7.2% | 3.5% | -1.2% | 2.2% |
| Public debt % of GDP | 37.2% | 134.3% | 40.4% | 36.8% |
Saturday, February 09, 2008
Generallization fallacies
Quite often, people seem to believe that some method, model or system of beliefs is good because they see instances in which it is good. This can be very false and deceptive, and it is sometimes used as a tool to spread and sell garbage. There are several traps involved here:
- Does even a part of it work reliably? It's easy enough to find a few examples which support something, but that doesn't prove anything. For example someone trying to claim that their stock picking scheme works has a huge amount of market data they can use to try to find good supporting examples. People can also deceive themselves because even a terrible model may sometimes fit reality through coincidence.
- If a part works that doesn't prove the rest. It's easy to package something accurate with a load of garbage and try to sell the whole load of garbage as if it was accurate. Some people will look at the accurate parts and conclude that everything under the same label is accurate.
- If something works and has a new name that doesn't mean it's unique. It's easy enough to try to market something as "new" or "secret". Sure, the idea might work but it might be overpriced and a deceptive source may deceive in other ways. It probably makes more sense to find a source which acknowledges the true history of the idea.
- Proprietary jargon can make something seem unique, sophisticated and special. Use of proprietary jargon can also draw people into a particular system. It is much better to use standard terms. They make understanding easier and open one up to many more sources of information.
Monday, January 28, 2008
"Ignore anyone who is not on my Messenger List"
I've been getting Yahoo! Messenger spam regularly. The current version allows me to report the message as spam, and I did that on every one. Unfortunately that didn't seem to help. All of the spam similar in that it has URLs with garbage characters paired with URL characters, kind of like what happens if you view UTF-16 Unicode as ASCII. I've now reluctantly set Messenger to "Ignore anyone who is not on my Messenger List".
Thursday, January 24, 2008
Why be so hard on Scientology and not those other religions?
Recently I've seen a lot of stores on Reddit about various ways Scientology sucks and about how Anonymous declared a war on Scientology. It seems like bashing Scientology is pretty popular, at least among a certain demographic.
Scientology bashing seems to make sense. They seem have some really weird and unreasonable beliefs which might not even make good science fiction. Also, the church seems to be very litigious. It seems they also seriously financially exploit their faithful followers. However, Scientology doesn't seem to be exceptionally crazy or bad compared to other religions.
For example consider Christianity. There are lots of weird and harmful things there. Even the core idea is weird. Why would God need to send his son to be sacrificed in order for sins to be forgiven? Then there are missionaries who try to help people but in the process convert them to Christianity. People complain about Scientology going after drug addicts and criminals, but going after indigenous cultures is even worse. Let's not forget that many Christian organizations go after drug addicts and criminals too. Many Christian organizations also fight against equal rights for homosexuals and abortion rights. Many are even against condoms even though overpopulation and sexually transmitted diseases are major problems.
For another example consider Islam. I know less about it so I can't criticize it in as much detail. It's pretty obvious that some sects are against women's rights, even to the point of condoning honour killing. Some condone violence, such as going after the "infidels". (I'm not saying that all violence is bad. Some cases, such as the Palestinian Intifada, it might be justified.) Some sects barbarically punish people, and in some cases even rape victims. Then there's the ridiculous reaction to what they perceive is blasphemy, such as with Salman Rushdie and the Muhammad cartoons.
So how come people are going after Scientology but not after other religions?
I guess one issue is that Scientology seems to be a unified organization while most other religions are fragmented into various sects. If you point out something bad and claim it is a property of the religion, people will tell you it's just those particular sects. Even if the problem (like for example the Christian attitudes on homosexuality) exists in most sects, people still claim it's not an overall problem with the religion. Yes, there have been attacks on the worst sects (such as the Taliban and Westboro Baptist Church). However, so much shit from various religions gets tolerated and even protected.
I wonder if Scientology gets attacked just because they're new and small. That seems unfair, like bullying. Also, Christianity got attacked early on and that might have actually helped them grow. I also wonder if Christianity is maybe protected by residual internalized Christianity that's even in those who have rejected it. After being brought up in an environment with lots of Christian stimuli, it may have of worked its way deep into many people, so that they can't really see it as a weird, foreign and harmful cult like Scientology.
Scientology bashing seems to make sense. They seem have some really weird and unreasonable beliefs which might not even make good science fiction. Also, the church seems to be very litigious. It seems they also seriously financially exploit their faithful followers. However, Scientology doesn't seem to be exceptionally crazy or bad compared to other religions.
For example consider Christianity. There are lots of weird and harmful things there. Even the core idea is weird. Why would God need to send his son to be sacrificed in order for sins to be forgiven? Then there are missionaries who try to help people but in the process convert them to Christianity. People complain about Scientology going after drug addicts and criminals, but going after indigenous cultures is even worse. Let's not forget that many Christian organizations go after drug addicts and criminals too. Many Christian organizations also fight against equal rights for homosexuals and abortion rights. Many are even against condoms even though overpopulation and sexually transmitted diseases are major problems.
For another example consider Islam. I know less about it so I can't criticize it in as much detail. It's pretty obvious that some sects are against women's rights, even to the point of condoning honour killing. Some condone violence, such as going after the "infidels". (I'm not saying that all violence is bad. Some cases, such as the Palestinian Intifada, it might be justified.) Some sects barbarically punish people, and in some cases even rape victims. Then there's the ridiculous reaction to what they perceive is blasphemy, such as with Salman Rushdie and the Muhammad cartoons.
So how come people are going after Scientology but not after other religions?
I guess one issue is that Scientology seems to be a unified organization while most other religions are fragmented into various sects. If you point out something bad and claim it is a property of the religion, people will tell you it's just those particular sects. Even if the problem (like for example the Christian attitudes on homosexuality) exists in most sects, people still claim it's not an overall problem with the religion. Yes, there have been attacks on the worst sects (such as the Taliban and Westboro Baptist Church). However, so much shit from various religions gets tolerated and even protected.
I wonder if Scientology gets attacked just because they're new and small. That seems unfair, like bullying. Also, Christianity got attacked early on and that might have actually helped them grow. I also wonder if Christianity is maybe protected by residual internalized Christianity that's even in those who have rejected it. After being brought up in an environment with lots of Christian stimuli, it may have of worked its way deep into many people, so that they can't really see it as a weird, foreign and harmful cult like Scientology.
Subscribe to:
Posts (Atom)