Saturday, November 30, 2013

No data on T-Mobile 3G or 4G with Nexus 5, but 2G (GPRS or EDGE) works

Problem: data doesn't work on 3G or 4G with T-Mobile on Nexus 5, and most calls drop immediately.

Data and calls work great if you change "Network Mode" from "LTE" to "2G". Oddly, SMS works in all modes and you can use MMI codes like #225#.

Solution: go to "Access Point Names" (APN) in Settings > More > Mobile Networks, and in whatever APN is currently selected (mine was "T-Mobile GPRS"), change the "APN Protocol" from "IPv6" to "IPv4". Make sure to save settings.

You can verify this by going to Settings > About phone > Status.

I'm not sure whom to blame (but I'm leaning towards T-Mobile since nothing changed on my end).

Yet another reason to stick to IPv4 :)

Tuesday, October 8, 2013

FreeBSD's badblocks utility

I had a hard time finding badblocks for FreeBSD 9.2 when Googling for "FreeBSD badblocks": https://google.com/search?&q=FreeBSD+badblocks

pkg_add -r e2fsprogs

If you're in csh or tcsh or zsh, run rehash and you can use badblocks.

Should've realized looking up what package provides it for Linux (also e2fsprogs) would've found me the package for FreeBSD.

Thursday, February 7, 2013

Windows 7 "autochk program not found - skipping AUTOCHECK" on cloned drive or resized partition

I cloned my Windows 7 installation using Paragon Partition Manager, Macrium Reflect, and the manufacturer's (Samsung's) bundled migration utility from an HDD to a smaller SSD. Each resulted in booting to a screen that said:
autock program not found - skipping AUTOCHECK
Sometimes I got a Windows logo, and sometimes I got to Startup Repair, but whether they launched automatically or I launched them from a Windows Installation Disc (or USB), they all failed. Sometimes a blue screen (BSoD) appeared shortly after.

It turns out attributes on an MBR disk apply to all volumes on that disk; attributes on a GPT disk apply only to the volumes selected, so this didn't help: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004505

Suspecting the cloning was problematic, I tried shrinking the Windows C volume using Easeus Partition Master, and that resulted in the original hard drive being unbootable as well.

My drive was encrypted with BitLocker, and I decrypted it prior to shrinking as well as prior to cloning. The data was always visible on the partitions. I tried deleting the BLboot partition, which appeared before my "C" partition, but that didn't help at all. It came back with Startup Repair.

Solution:

From here: http://superuser.com/questions/290612/missing-autochk-program-during-boot, specifically this post: http://superuser.com/a/547260, which I saw was posted 23 hours after my ordeal (the following is based on that post):
  • Boot into Windows Installation Disc (or USB) or WinPE
  • At "Install Windows" screen, click "Next", then press Shift+F10 to launch a command prompt
  • Type "diskpart" to launch diskpart, the Windows CLI disk manager
    • In diskpart, type "list volume" to show you what volumes the installer sees
    • You should be able to identify your real "C" volume by its size even if it bears a different letter, e.g, "D"; note this down
    • If you have a BLboot partition, it'll be 100MiB to 2GiB in size, so relatively small
  • Exit diskpart (type "exit") and launch "regedit" (if you lose your terminal, Shift+F10 will get you another)
    • Select "HKEY_LOCAL_MACHINE"
    • Click "File" > "Load Hive" and open the Windows\system32\config\SYSTEM file on your "C" drive and title it "MyOpenHive" (regardless of what letter your installer thinks your "C" drive currently is, remember what you saw in diskpart---if you don't, Alt+Tab to your command prompt and use diskpart to show you what volumes are present; in my case, the BLboot partition was seen as "C" and the "C" partition was "D" to the installer)
  • Expand "HKEY_LOCAL_MACHINE" by clicking the "+" to its left
    • Within you'll see a folder called "MyOpenHive"; another is called "SYSTEM"
    • "MyOpenHive" shows you what your OS thought it saw (not the installer!), while SYSTEM tells you what the installer sees
    • They both have a directory called MountedDevices; check what device in SYSTEM > MountedDevices corresponds to the drive letter your C partition should bear
    • Going by its ID hex letters and numbers, figure out what volume your C drive is
    • Press F2 on an entry to edit its name; if the wrong drive or partition is listed as "\DosDevices\C:", change its letter to something unused, e.g., "\DosDevices\Z:"
    • Ensure the proper volume (comparing volume IDs and whatever else you can) is named "\DosDevices\C:" (it might be named "\volume{volume_id_of_some_sort}\")
    • Click "MyOpenHive" on the left pane and "File" > "Unload Hive"
    • Exit regedit and reboot your system and go through Startup Repair (it might take a few iterations); make sure to remove the installation disc or USB stick
Some posts suggested deleting all the entries found in the "MyOpenHive" hive I opened; that definitely didn't help. Getting the volume ID from the "mountvol" command didn't work either; the correct IDs (or any semblance of a unique ID based on other columns) are best extracted from regedit.