Android ROMs explained

To the uninitiated, the world of Android ROMs can be more than a little confusing. Since Android is based on Linux and therefore large portions of it are licensed under the GPL, enthusiasts are free to create and release their own builds.

That’s where some of the confusion comes from. When you buy an Android device, it comes with Android pre-loaded of course. Then, when Google releases a new version of Android, it releases it to the vendors and to the phone companies. If your device is really popular and you’re really lucky, you’ll get an update from either the carrier or the vendor. Usually the update comes with some ridealong software, which you may or may not find useful.

Enthusiast-built Android ROMs tend to come out much sooner than official ROMs sanctioned by the manufacturer, and they don’t come with the bloatware either, so they tend to run a lot better. My venerable Samsung Galaxy S4G phone, which is nearly three years old, runs better on an enthusiast-built ROM than it ever ran with the vendor-provided one, and the enthusiast-built ROMs are much more up to date. Read more

I’m taking everyone’s advice and doing what I love

I cracked out my IBM PC/AT-turned-K5/100 today and fired it up for the first time since I bought my house. I wanted to download some ISOs and play with some things like DietLinux and Knoppix, but my aged AT is the only system I have with a usable CD burner. The hard drive in my box that contains my good CD burner died back in February or so, and I had other priorities (ahem), so I never replaced the drive. Now I’ve got different other priorities (which I won’t talk about just yet), but even if I had another drive, I can’t seem to find my Nero CD. So it just makes more sense to pull the AT off the bench.
I must have pillaged it for parts at one point because the SCSI host adapter and NIC were both missing. So I replaced them, and fired it up and the HD was gone. I know I saw an HD in there, so I checked the BIOS and found it wasn’t set up right. So I autodetected everything, rebooted, and Linux refused to boot. I popped out the Debian installation CD, selected the “mount a previously initialized partition” option, and saw the partitions on /dev/hdc, rather than /dev/hda where I would expect them. When I was pillaging, I must have pulled the IDE cables and plugged them back in the wrong place when I was finished. I can’t remember those kinds of details anymore. I’d rather spend those neurons remembering details about a girl (like, say, that she likes Tori Amos and Train and Delerious?) than obscure details about a computer I rarely use.

I probably could have fixed it by editing /etc/fstab (actually /target/etc/fstab when you’re booted from the Debian installer) and then re-running LILO, but I’ll always be more confident in my knowledge of hardware than of any operating system, so I reached for a screwdriver and went for the sure thing. Popping the case for the 12th time and rearranging the cables rendered the system bootable again.

The machine’s hostname is burn. Nice. That’s one of my favorite songs by The Cure. I tried a couple of the usual suspects for the root password, and I was in.

Incidentally, I’m doing all of this stuff in pursuit of answers. You’ll be hearing from me again later this weekend.

Sorcerer: An easier way to get Linux your way

I’ve talked about Linux From Scratch before, and I like how it gives you just what you want, compiled how you want, by your system, for your system, but it doesn’t actually give you a very useful system in the end.
Sure, you’ve got a text-based system with all the standard Unix utilities, and it boots like greased lightning, but there’s still a fair bit of configuration you have to do afterward. And the attitude of the committee that wrote it seems to be that if the documentation to do something exists elsewhere, it shouldn’t be repeated there. Speaking as a published author, I don’t agree with that absolute. Sure, a table listing DOS commands and their Unix equivalents is out of place in that kind of book, because that’s non-essential for getting a working system. But the two paragraphs required to tell you how to get your network card configured isn’t a big deal. Just do it!

I could spend way too much time ragging on the project, and it wouldn’t accomplish anything productive. Linux From Scratch is a fabulous way to learn a lot about the inner workings of a Linux system, and it’s an opportunity few, if any, other operating systems give you. And I guess since it makes you work so hard and look in other places for information, you learn more.

But if your main goal is a lean, mean system built the way you want it, rather than education, and you’re willing to give up a little control, there’s another way: Sorcerer Linux.

For Sorcerer, you download an ISO image that contains the essentials like a kernel, file utilities, a C compiler, and necessary libraries, all compiled for i586. This gives a good balance of compatibility and performance. When you install it, it compiles a kernel for your system, then it copies everything else to the drive.

The heart of Sorcerer is a set of shell scripts that automatically downloads current versions of software, checks dependencies, and compiles and installs them for you. It’s not as convenient or as polished as RPM, but it’s usable and the benefits, of course, are tremendous. You get the newest, most secure, most stable (and, usually, fastest) versions of the software you need, compiled for your particular architecture rather than the lowest common denominator.

I had some trouble installing Sorcerer at first. I found that after compiling the kernel, I had to answer Yes to the question, “Edit /etc/lilo.conf?” and make a change. The default /boot parameter didn’t work for my system. I had to change it from /devices/discs/disc0/part7 to /devices/discs/disc0/disc.

To avoid having to recompile the kernel over and over to get to that menu option that let me edit LILO’s parameters, here’s what I did:

chroot /mnt/root
mount -t devfs /devices /devices
nano /etc/lilo.conf
lilo -f
exit

Sorcerer doesn’t currently have spells (sorcerers cast spells, therefore, Sorcerer packages are called spells, get it?) for every package under the sun, but most of the essentials are covered. I’ll have to write spells for a few of my faves and contribute them.

Building a dual-boot W2K/Mandrake 8 box

We descended on Steve DeLassus’ place yesterday afternoon for a hair-pulling configuration adventure. Steve introduced me to two Linux gurus he knows from work, Adam and Jamin.
Steve told me once that there’s a story with Jamin’s name, but I didn’t think to ask Jamon for his version. No surprise; we had battles to fight and eventually win.

Adam’s big story is his degree. He put in his five years and completed all of his coursework, only to find that it’s necessary to file an intent to graduate. I seem to remember that where I went to school, signing up for the required classes and then showing up served as ample intent to graduate, but maybe my school wasn’t that enlightened. So, since Adam didn’t find out until it was too late that he had to file a piece of paper before he could get that piece of paper that tells people you know something, he’s enrolled in summer school, taking zero credit hours. But he filed his piece of paper, so another more expensive piece of paper should be coming his way soon.

I gave Steve’s new FIC AZ11-based Duron PC a once-over in the BIOS. I disabled all the ROM shadowing and ROM caching, since neither Windows nor Linux make use of it, and why waste cache bandwidth–even just a little bit of it–on something you’ll never use? Then I put in some more aggressive memory timings–CAS 2, turbo, FSB+33 MHz (since this is PC133 memory on a Duron).

Then, since this is a dual-boot system, we installed Windows 2000. While Steve wasn’t looking, it asked for locale settings. I decided to be nice–I could have set it to Hebrew, Arabic, or all kinds of goofy stuff. I set it to Zimbabwe English. I didn’t specify a timezone, so for whatever reason, it defaulted to Tijuana.

Steve saw it later because Windows put a locale icon in the toolbar. He hovered over it and it said “Zimbabwe English.” He said something, with some new word I’d never heard before that starts with “f,” and it appeared to be every part of speech in the sentence. I’ll have to ask him sometime what that means.

With Windows installed and properly configured for use in English-speaking Zimbabwe, we turned to Mandrake 8. All went well until the time came to configure LILO. The defaults would have worked but they seemed wrong, so we changed them. The machine booted into Windows. We booted off the Mandrake 8 CD and chose recovery mode. We spent half an hour dinking around and not really getting anywhere. So Steve and I made a boot disk with his other Mandrake box (the mkbootdisk command is your friend). Adam was adamant that we didn’t need that. We’d fixed the textfile that needed fixing (/etc/lilo.conf) but running LILO to activate it was the problem–we couldn’t mount the drive at /. Finally Adam or Jamin stumbled on the -r switch for LILO, which fixed the problem.

12/29/2000

Mailbag:  Free FDISK; Reiser

ReiserFS experiments. I spent a good deal of time yesterday figuring out how to convert an ext2 system to a Reiser system (for greater speed and fault-tolerance) when Brian Bilbrey pointed out how to create an all-Reiser system from the get-go with Mandrake 7.2.

The trick is to pick expert mode when you get to the Setup filesystems portion of installation, click on some free space (making some if necessary), then click create. Under the Filesystem type drop-down list, you can select Linux native, Linux swap, ReiserFS, or FAT32. Pick Reiser, and you’re set.

Now the big question… How to partition? I like to put /boot on a FAT partition just in case something goes horribly wrong, then I can recover the system even if my Linux boot disk fails by using any old DOS boot disk. It doesn’t have to be very big. ReiserFS may make you nervous since it hasn’t been officially blessed by the kernel team, but at the very least use it for the /tmp partition, and I’d use it for /var as well. Since /tmp and /var are where lots of little files get written constantly, they’re ideal for Reiser, and since those files tend to have short lifespans, it’s good to use a partition to isolate them from the rest of your files. Fragmentation isn’t much of a problem with Linux; partitioning wisely makes it even less so. Neither of these partitions has to be huge; a few hundred megs ought to be plenty. The two biggest partitions should be / and /home. The / partition, of course, holds the OS, while /home holds user data. If you wish, you can place /usr on a separate disk if you want apps on a separate disk from the OS for performance’s sake.

And remember, the disk is faster towards the front, so put speed-critical partitions like /root and /home up front. Put /boot right up front unless you’re using a modern distribution that uses the new GRUB bootloader; LILO has problems with high partition numbers. If you’re using GRUB (Mandrake 7.2 does), you can put /boot at the very end. Since these files are accessed at boot time and then never again, they don’t have to have the greatest speed.

Mailbag:  Free FDISK; Reiser

Pentium 4 performance is precedented

Thoughts on the Pentium 4 launch. No big surprises: a massively complex new processor design, limited availability, and systems from all the usual suspects, at high prices of course. And, as widely reported previously, disappointing performance.
This isn’t the first time this has happened. The Pentium Pro was a pretty lackluster performer too–it ran 32-bit software great, but Win9x was still the dominant OS at the time and it still has a lot of 16-bit code in it. So a 200 MHz Pentium Pro cost considerably more than a 200 MHz Pentium and for most of the people buying it, was significantly slower. History repeats itself…

Intel revised the Pentium Pro to create the Pentium II, with tweaks to improve 16-bit performance, but of course massive clock speed ramps made that largely irrelevant. Goose the architecture to 600 MHz and you’re going to blow away a 200 MHz previous-generation chip.

That’s what you’re going to see here. Intel fully intends to scale this chip beyond 2 GHz next year, and that’s when you’ll see this chip come into its own. Not before. And by then Intel will probably have changed their socket, (they intend to change it sometime next year) so buying a P4 today gives you no future-proofing anyway.

It never makes sense to be the first on the block with Intel’s newest chip. Never. Ever. Well, if you’re the only one on the block with a computer, then it’s OK. The P4 has issues. The P3 had issues (remember the serial number?) and was really just a warmed-over P2 anyway. The P2 was a warmed-over Pentium Pro. The Pentium Pro had serious performance issues. The Pentium had serious heat problems and it couldn’t do simple arithmetic (“Don’t divide, Intel inside!”). The last new Intel CPU whose only issue was high price was the 486, and that was in April 1989.

Unless you’re doing one of the few things the P4 really excels at (like encoding MP4 movies or high-end CAD), you’re much better off sticking with a P3 or an Athlon and sinking the extra money into more RAM or a faster hard drive. But chances are you already knew that.

Time to let the cat out of the bag. The top-secret project was to try to dual-boot WinME and Win98 (or some other earlier version) without special tools. But Win98’s DOS won’t run WinME, and WinME’s DOS seems to break Win98 (it loads, but Explorer GPFs on boot).

The best method I can come up with is to use the GPL boot manager XOSL. It just seems like more of an achievement to do it without third-party tools, but at least it’s a free third-party tool. You could also do it with LILO or with OS/2’s Boot Manager, but few people will have Boot Manager and LILO will require some serious hocus-pocus. Plus I imagine a lot of people will like XOSL’s eye candy and other gee-whiz features, though I really couldn’t care less, seeing as it’s a screen you look at for only a few seconds at boot time.

Wednesday mailbag

Short stuff today. There’s mail on nostalgia and my infamous books today, so let’s get right to them.
———-

From: “Jeff Hurchalla”

Subject: optimizing windows – ramdisk

Hello Dave,

First I wanted to thank you for the great book on optimizing windows. I’ve read it all now and picked up quite a bit. I think the book nicely fills a niche for windows tweakers- I know I was looking for it for a while. One thing I noticed, if you do a second ed. you might include information on hard disk setups -how IDE and SCSI work, RAID, and what cable and role(master/slave) to use for that new second IDE hard drive.

One tip to add could be the format /z command when using fat32. This undocumented /z switch sets the cluster size in number of sectors.. so “format /z:64” would create 64 sectors/cluster or 32k clusters. I got this from prorec.com a while back. You might want to check out their site just for the music recording discussions, never mind that they do a great job describing how to optimize for digital audio(I think the advice is generally applicable for any computer).

I really want to ask you about a problem I’m having when I run windows95(osr2) from ramdisk. I have it working, mostly as described, but user.dat and system.dat are pesky. I had to put these both into the ramdisk hard drive directory(the one with himem.sys. setver.exe, etc) to get it to boot. Io.sys looks at the registry early in the boot process way before it gets to autoexec.bat(where the ramdisk is created). So it’s not trivial to find a way to create the ramdisk and get the registry in there, where I think it belongs, in time to satisfy io.sys. The solution to put the registry in the ramdisk directory isn’t very good because windows constantly updates the registry(and usually for no apparent reason). Do you have any ideas for how to get the registry in the ram early, or how to get windows to switch to using the registry in the ramdisk later on? It would also be ok, though maybe not as satisfying, to somehow set windows to stop automatically updating the registry just because it’s apparently noticed 15 seconds of time has passed. I also thought to use lilo (possibly modified) to do some work with a ramdisk and then load a bootsect.dos, but I don’t know enough to tell if it could work. I used to have linux set up, but everything’s standard right now.

I read in your views that the outlook for your linux/win2k book is not very good. That’s a shame. I’d really like to read it in the future. I hope something works out.

Take care, Jeff

———-

Well, first off, thanks for the compliments. It’s things like that that make the time and effort that go into writing a book worthwhile.

I had forgotten the FAT32 cluster trick; that is a good one but you might as well just use FAT16 if you’re going to make big clusters–unless the 2GB limit bites you. So, yes, I can see it being useful.

I believe I did talk about hard drive setups, but I may have neglected it. Rather than look it up, I’ll be lazy and just state it: Hard drives should always be masters. If you must put two drives on a channel, make the newer, more modern drive the master. RAID would certainly be a good topic, and one that’s sorely missed from the book. I think I did a decent job of predicting some of the up-and-coming stuff, but two things that I missed were IDE RAID and USB networking. They didn’t exist in the summer of 1999 when I wrote the bulk of the book, and I didn’t anticipate them.

The chances of a second edition appear to be pretty slim, unfortunately. I could write another book for another publisher, provided I’m very careful not to violate the copyright I sold to O’Reilly, but I would almost certainly burn some bridges by doing that and that’s not exactly something I want to do, whether I agree with how O’Reilly marketed the book or not. I’m almost hesitant to say anything about it or even mention that possibility.

As for the Linux/W2K book, it’s tough to say what to do with it. There are a lot of things I’d love to say about it, but again, I’d burn some bridges that I probably shouldn’t. A year ago when it looked like both W2K and Linux 2.4 would be released within six months, it looked like a blockbuster book. With 2.4 delayed and W2K failing to take over the world, it’s becoming a tough sell, and frankly I’m getting really sick of the topic. I also know I tend to take some unpopular stances on the issues involved, which probably doesn’t help. If I thought the book would cover the expenses I’d have to outlay to write it, I’d be much more inclined to do it. So far for me, writing for O’Reilly has proven to be a very expensive hobby. (And if anyone from O’Reilly reads my site and doesn’t like hearing me say that, tough.)

I’ll probably re-evaluate after the 2.4 kernel starts firming up some more, and once my wrists start looking like they’ll hold up or I get the hang of NaturallySpeaking. As for my next book, if there is another one, I don’t want it to involve Linux, and I want to write for a small indie publisher who only releases a half-dozen or so books a year.

As for the registry problem in your ramdisk, did you make the modifications to msdos.sys? Specifically, the line WinBootDir parameter must point to the ramdisk, while WinBootDir points to your directory containing the boot files.

The only other thing that I can think of that might cause those symptoms would be if when you installed Windows to the surrogate partition, Setup may have found your old registry and grabbed some data from it, forcing you to keep the registry on your HD rather than in ram.

I messed around with the ramdisk trick for an entire weekend (literally–I didn’t do anything else for two and a half days) getting it to work right, and for all I remember, I may have spent a few evenings preceeding that weekend working on it. I do know this: Microsoft never intended for anyone to do that, which of course just made me all the more determined to do it.

Let me know if that doesn’t fix the problem, because I’m really curious now what may have caused it. I’ll think on it some more.

———-

From: “Gary M. Berg”

Subject: Pascal on the Mac

You can always pick up Turbo Pascal 5.5 from Borland for free: http://community.borland.com/article/0,1410,20803,00.html

———-

Thanks. For that matter, Borland made older versions of Turbo C and Pascal available for DOS too, which isn’t bad for quick-and-dirty stuff. I found the older versions of Turbo Pascal for DOS produced smaller, tighter executables than the later versions (I mostly used version 7, back in 1992-93). And I believe at least one of their Windows C compilers is available for free now too.
———-

From: “Brent Dickerson”

Subject: voice recognition stuff

In case your interested in reading another’s short eval. The link may not work after today. brentfd

http://www.gazette.com/weekly/ibiz/biz9.html

———-

Thanks. That’s the first positive piece I’ve read on VoiceXPress, but their findings on ViaVoice are certainly consistent with my experience and with what I’ve read elsewhere–though ViaVoice improves considerably with a good mic. I still prefer NaturallySpeaking though, and I get better results than he did, but again, with a highly recommended mic and sound card combo.
———-

From: Robert Bruce Thompson

Subject: RE:

Hmm. When I was in high school, the first integrated circuits were still in R&D labs. That was 1971 or thereabouts.
———-

By the time I was in high school (1989-1993), “build your own computer” meant driving up to Gateway Electronics, buying a 386sx motherboard, I/O card and video card, some memory and a case, then assembling it all yourself. This was slightly more exotic than today when you can go down the street to get your parts.

I was an anomaly in that I owned an Amiga, whose system boards didn’t change much and were very well documented, so there were literally dozens of hacks available on BBSs to add features to them–most involved at least a little soldering and some involved discrete components. So that’s where most of my experience with discrete components comes from.

Most twentysomethings like me never had to build our own circuit boards and can’t imagine doing so. I was surprised to see modifications requiring soldering to start popping up on the hardware sites, because I know an awful lot of overclockers are my age and have never soldered delicate electronics before.

I dated a girl a few years ago who vaguely remembered her dad building a computer from a kit in the late 1970s. He’d tell her what component he needed, and she’d find it from the pile and give it to him. With me being a computer professional, she was pretty proud of that. She knew not many people in our generation had even that experience.