Sys Army Knife – Finding IP Addresses

Time to pull out your sys army knife and explore how to best use some of the tools available to system administrators out there!

Every system administrator knows that you should always use DNS names (e.g., myserver.mydomain.com) instead of IP addresses (e.g., 192.168.1.4). You should avoid ever using IP addresses in configuration files, URLs, or (heaven forbid!) hard coded into scripts or compiled programs. But every system administrator also knows that there are situations where you simply have to use an IP address (e.g., /etc/resolv.conf). And of course, some people just like to be ornery and use IP addresses even when a DNS name would work perfectly well.

Sooner or later, every system administrator encounters a situation where he needs to change the IP address of a system, or a few systems, or a few thousand systems.

So you’re changing the IP address of a system. You know that there might be things out there that contain that IP address — on the system itself, or perhaps on other systems. You don’t want to break said things. You need a quick and easy way to figure out what things use the current IP address of the system, so that you can change them when you change the IP address. What do you do?

The “grep” command is your friend.

One tool that every system administrator should be familiar with is “grep” and its accompanying versions “egrep” and “fgrep”. “Grep” is short for “get regular expression.” Basically a “regular expression” is a set of criteria for matching text. The “egrep” command is an “extended” grep, offering more text searching functionality and “fgrep” is a “fast” grep, which works more quickly but offers less functionality.

At its simplest, you can use grep to search for an IP address in file like this:

grep 'IP_address' file

For instance:

$ grep '192.168.1.4' /etc/hosts
192.168.1.4     myserver myserver.mydomain.com

As you can see in the example above, we used grep to search for 192.168.12.4 in the /etc/hosts file and it found a line that defined 192.168.12.4 as the IP address for a server named myserver or myserver.mydomain.com.

Limiting your scope – periods are not what they appear.

The example above is not a particularly good one, though, because in grep a period is a “wild card” character. When you include a period in your regular expression, it doesn’t mean “look for a period.” It means “look for any character.”

So given the example above, you could just as easily end up with results that look like this:

$ grep '192.168.1.4' /etc/hosts
192.168.1.4     myserver myserver.mydomain.com
192.168.144.12  otherserver otherserver.mydomain.com

It’s obvious why the “myserver” line shows up, but if you’re not familiar with regular expressions you may wonder why on earth that second line showed up. The answer is simple: That period in your regular expression matches against any character. So it matches against the period in 192.168.1.4, but it also matches against the 4 in 192.168.144.12.

So how do you avoid this undesirable behavior? It’s simple: You just need to “escape” any periods in your regular expression by putting a backslash (\) in front of them. This tells grep that you don’t want the period to act as a wild card, but instead want to literally look for a period. Thus, your new search now looks like this:

$ grep '192\.168\.1\.4' /etc/hosts
192.168.1.4     myserver myserver.mydomain.com

Note that this time your search didn’t pick up the extra line.

Limiting your scope – word boundaries.

Unfortunately, we’re still not done refining our regular expression. Because a regular expression is matched against any part of the line, you still may end up getting results that you don’t want even after you’ve escaped your periods. For example:

$ grep '192\.168\.1\.4' /etc/hosts
192.168.1.4     myserver myserver.mydomain.com
192.168.1.40    workstation1 workstation1.mydomain.com
192.168.1.41    workstation2 workstation2.mydomain.com

Why do these extra lines show up? It’s simple, really: “192.168.1.4” matches the first part of “192.168.1.40” and “192.168.1.41,” so those lines both get picked up as well.

How do you avoid this? The best way is to use egrep (extended grep), which supports more powerful regular expressions. Egrep allows you to use “\b” to match against a word boundary.

Basically, the \b escape means “search for a word boundary here” (remember the mnemonic “\b is for boundary”). A word boundary is the beginning of a line, end of a line, any white space (tabs, spaces, etc.), or any punctuation mark. So if you put a \b in front of the IP address you’re looking for and another \b at the end of the IP address you’re looking for, you’ll eliminate the sort of partial match that happened above:

$ egrep '\b192\.168\.1\.4\b' /etc/hosts
192.168.1.4     myserver myserver.mydomain.com

Voila! Now those pesky extraneous entries no longer show up!

Searching Recursively

In all the examples above, I show grep/egrep searching for an IP address in just one file — /etc/hosts. Realistically, though, you’re far more likely to need to search all the files in an entire directory tree for the IP address. For instance, you might know that the IP address you’re changing could be in some configuration files somewhere in the /etc directory or one of its subdirectories. Or you might know that the IP address could be in the source code files associated with a particular application. Or you might even just know that the IP address could be used somewhere in some file on your machine — but it could be literally anywhere on the machine.

You can give the grep/egrep command a list of multiple files to check. For instance, you could search for your IP address in the /etc/hosts and /etc/resolv.conf file like this:

$ egrep '\b192\.168\.1\.4\b' /etc/hosts /etc/resolv.conf
/etc/hosts:192.168.1.4 myserver myserver.mydomain.com
/etc/resolv.conf:nameserver 192.168.1.4

You could even search all of the files in /etc like this:

$ egrep '\b192\.168\.1\.4\b' /etc/*
/etc/hosts:192.168.1.4 myserver myserver.mydomain.com
/etc/resolv.conf:nameserver 192.168.1.4

However, it’s important to note that that will only search for files in /etc. It won’t search for files in /etc/subdir, /etc/deeper/subdir, and so on.

The grep commands support a “-r” option to recursively search all the files in a given directory and all of its subdirectories. For example:

$ egrep -r '\b192\.168\.1\.1\b' /etc
/etc/hosts:192.168.1.1 myrouter myrouter.mydomain.com
/etc/ntp.conf:server 192.168.1.1
/etc/resolv.conf:nameserver 192.168.1.1
/etc/sysconfig/network:GATEWAY=192.168.1.1

One Caveat and Final Thoughts

There’s one important caveat to all of this: This post is about using GNU’s version of the grep tools, which are used by all Linux distros and are available for basically every other platform you can think of (I even use it on Windows). If you’re stuck on a system that only has old-school Unix grep commands installed, though, your mileage may vary. In particular, the -r option is not implemented on older Sys-V grep implementations.

And of course, this only shows how to search for a single IP address. When I get a chance, I’ll add another blog entry describing how to look for a list of IP addresses on a system, and how to search for anything that’s an IP address. I also intend to do a write-up on how you can do automatic search-and-replace of IP addresses using sed, another tool that should be part of every system administrator’s sys army knife.

Biting off more than one can chew…

The astute reader may realize that it’s been several weeks since my last post, and that my detailed review of the rewritten Anaconda installer in Fedora 18 has not been going anywhere particularly fast. The even more astute reader may realize that Fedora 19 was released today, making the completion of that review something of a moot point.

A couple things I’ve learned so far in my foray into blogging:

Good, detailed blog entries take time.

If you think that you can write a quick blog entry on a complicated subject, think again, especially if you’re a detail oriented person like I am.

I initially took about two pages of notes and twenty screen shots of my Fedora 18 install experience. I figured I could churn out a one or two part blog post based on that in a few hours. After spending something like eight to ten hours on the first three parts of the review I realized that it would probably take me at least another three parts and a roughly equal amount of time to complete the review. This kind of put a damper on my enthusiasm.

Real life has a tendency to interfere with blogging.

If you have kids, they tend to have a lot of activities lumped together at the end of the school year. Then summer means they’re home all the time, and if you work from home a lot that creates its own problems (“Dad! Can you help me with…”). And, of course, if you change jobs and suddenly find yourself on the road about half the time working 10-12+ hour days, blogging suddenly drops way down on the priority list.

I’ll be taking small bites.

Going forward, in the hopes of actually getting back on track with my original goal of posting something once a week, I’ll be taking small bites. Perhaps I’ll share a hint about a favorite Unix/Linux command line trick, or briefly talk about some new toy, like the Ouya that I just got.

Red Hat Linux 5.2

In a break from my Fedora 18 Installer review, I thought I’d share something that I found this week while cleaning my computer room. This was tucked away in a pile of old CD’s:

Red Hat Linux 5.2

Click to view full size.

Your immediate reaction may be “So what? Yeah, Red Hat Enterprise Linux is now up to version 6.4, and 5.x is up to 5.9, but 5.2 isn’t really that old.”

Take a closer look. That’s not Red Hat Enterprise Linux. That’s plain old Red Hat Linux, which was discontinued in 2003 and replaced with the Fedora Project. Red Hat Linux 5.2 was released in 1998, and has since been superseded by 27 releases of Red Hat Linux and Fedora.

If I recall correctly, I bought this particular CD set off the shelf at a Best Buy as a late Christmas present for myself in early 1999, and installed it on an old 100 Mhz Pentium (yes, megahertz, and yes, the original Pentium processor) system that I had lying around.

Inside the package

Click to view full size.

This particular package included the Red Hat 5.2 distribution on one CD (yes, the whole thing fit on a single CD), and a second CD containing source RPMs. It also included a third CD that had several e-books in Adobe Acrobat format (Maximum RPM, Red Hat Linux Unleashed, Special Edition: Using Linux, and Sam’s Teach Yourself Linux in 24 Hours).

Man! What a blast from the past!

 

Fedora 18 Installer: Part 3

This is Part 3 of a multi-part review of Fedora 18’s updated and redesigned installer:

This review specifically covers how the Fedora 18 installer works for a relatively complex installation: What happens if you have an existing server with multiple disks, multiple RAID arrays, multiple volume groups and logical volumes, and you want to install Fedora 18 in addition to what’s already on the system without wrecking the existing setup?

Technical content: HIGH
This post is primarily aimed at experienced Linux system administrators.

Installation Options Dialog

After you’ve selected at least one storage devices on the Installation Destination screen, you’ll notice that the Continue button in the lower right corner becomes available. Once you’ve selected the storage devices that you want to use, you have two options: You can either click the Done button in the upper left corner, or the Continue button in the lower right corner.

If you click the “Done” button in the upper left, the installer will assume that you want to use automatic partitioning (with it’s potential attendant pitfalls, as discussed in Part 2). If, instead, you click on the Continue button, you’ll be presented with the Installation Options dialog box:

Installation Options Dialog

Click to view full size.

Thumbs UpFirst of all, this dialog box provides summary information about your planned install and the disks that you’ve selected. It’s nice to have all this information in one place, especially at this point in the install. It’s particularly nice that the very first thing this dialog tells you is exactly how much space your install will need, and it’s also nice that it tells you straight out whether or not you have enough free space available on the selected storage devices to proceed.

Unfortunately, once again there are far more things wrong with this dialog than right with it.

Thumbs DownFirst of all, somebody clearly skipped “Information Presentation 101″ class. The dialog says “The disks you’ve selected have the following amounts of free space:”, but then tells you whether or not you have enough space before it actually provides information on the amount of free space. I know this is just a nit-pick, but simple layout errors like this really make it clear that the new installer just isn’t ready for prime-time.

More importantly, it’s not clear where some of these numbers come from, and they completely ignore obvious unallocated space that the install could take advantage of (more on that in a moment).

Below all the disk space statistics, there’s an expandable section of the dialog entitled “Partition scheme configuration.” If you open this up, you’re presented with a single field, “Partition type” that gives you a choice between “Standard Partition,” “BTRFS,” and “LVM” (with LVM selected by default):

Partition Scheme

Click to view full size.

I’m at a loss as to why they chose to make an expandable section that only contains a single field, when just putting the field on the dialog would have been much simpler. It seems to be yet another design decision betraying an immature product. Worse, there’s absolutely no information as to what this field means or what selecting any of these items will do.

As an expert user, I can guess that this simply adjusts how the system will do things if you let it perform automatic partitioning. Selecting “Standard Partition” will create and use partitions for your major filesystems. BTRFS, will use the new BTRFS filesystem to allocate storage in some sort of (presumably) redundant and expandable fashion. And of course, LVM will use the current standard default of using logical volume management for your filesystems.

If you’re a non-expert user, though, this field is going to be completely incomprehensible, with no help in sight. (Frankly, even the online documentation on the web isn’t very good at describing exactly what these options do.)

Below the Partition scheme configuration section, you can check a check box that says “I don’t need help; let me customize disk partitioning.” This does exactly what it sounds like, and expert users will want to use this for anything other than a simple configuration.

Finally, at the bottom of the dialog, there are three buttons:

“Cancel & add more disks” does exactly what it sounds like, but I don’t know why they didn’t just leave it as a simple “Cancel” button.

The “Modify software selection” button will take you to the Software Selection screen that’s available from the main Installation Summary screen (and will take you back to the Installation Summary screen when you’re done rather than bringing you back to this dialog). This button frankly seems a little out of place here, but I’m guessing it’s here in case you suddenly realize the amount of software you’re trying to install exceeds the amount of disk space you have available.

Finally, there’s a “Reclaim space” button. As others have pointed out, this is probably the scariest button in the entire installer. There’s absolutely no information about what pressing this button will do. If you click this button are you telling the installer to just go ahead and start messing with your partitions and filesystems to reclaim space? What if you have no need or desire to reclaim any space at all on the system?

The simple fact is that the “Reclaim space” button is nothing more or less than a simple “Continue” or “Next” button, and should have been labeled exactly that. Labeling it “Reclaim space” was a terrible decision.

Where exactly is that reclaimable space?

As I mentioned above, it’s not clear where some of the numbers on the Installation Options dialog box come from. On my install, it said that there was “903 MB Free space unavailable but reclaimable from existing partitions,” but provided no information on where this space might come from.

It turns out that the only way to find out is to click on the “Reclaim space” button without checking the “let me customize disk partitioning” check box. If you do so, you’ll get to a Reclaim Disk Space dialog box:

Reclaim Disk Space Dialog

Click to view full size.

As you can see, in my particular case, that 903 MB of reclaimable space is what the installer could get if it shrunk my existing /boot partition down to eliminate the free space on the filesystem.

But what about those empty partitions?

Meanwhile, the installer completely ignored the terabytes of space available in the many unused and empty partitions on my test system.

There are two schools of thought you can subscribe to here: The first is that the installer should only tell you about stuff that it absolutely understands. Thus, a partition containing an ext4 filesystem with unused space on it is fair game. However, a partition that appears to be empty might actually contain a filesystem, RAID setup, or logical volume that the installer is simply unable to comprehend, and should thus be left safely alone. The other school of thought is that you should at least point out apparently empty partitions for potential reclamation.

Clearly, the Fedora maintainers chose to go with the safer option. Given that the new installer appears to be aimed at neophyte users, and that most expert users with complicated installs will manually partition, this is a rational decision.

But what about unallocated LVM extents?

However, my test machine also had LVM volume groups with terabytes of unallocated extents on them. I simply cannot comprehend why the installer assumed those were off-limits. If you have unallocated space on volume groups, one of the main reasons for doing so is to let you later use that space for new filesystems — such as for an updated OS install. Why on earth doesn’t the installer offer to put your install on that free space?

I thought you said it was reclaimable?

A much bigger problem, though, is that the installer doesn’t seem to actually be able to reclaim the space that it says is reclaimable. If you highlight that /boot partition, the dialog box gives you two options: Preserve or Delete. There’s no option to “shrink” the partition or “reclaim space” from the partition. Just Preserve or Delete.

You may think “Okay… So maybe the button is just misleadingly named, like other buttons in this installer. Maybe the delete button will just delete the free space.” If you hit the Delete button, though, absolutely nothing happens. The “Reclaim space” button in the lower right of the dialog box stays grayed-out, and the only thing you can do is hit the Cancel button:

You cannot reclaim disk space.

Click to view full size.

You simply cannot do anything with that partition.

If you click delete on one of the “Unknown” partitions, it at least lights up the Reclaim space button at the bottom and lets you proceed. However, when I actually tried to reclaim space by deleting unused partitions here, I never got it to work. One time it sent me back to the Installation Summary screen and gave me the same error that I’d seen when I simply didn’t select any disks. Another time, the installer sent me back to the Installation Summary screen and then locked up. And a third time, the installer crashed with an “An unknown error has occurred” dialog.

An unknown error has occurred

Click to view full size.

Perhaps the space reclamation capabilities are implemented and work properly for Windows (FAT/NTFS) partitions, but I didn’t test that. Based on my experience with the rest of the Reclaim Disk Space dialog, I’d personally be very hesitant to try it out on any filesystem containing data I cared about keeping.

Manual Partitioning

If you check the “let me customize disk partitioning” check box, the Installation Options dialog will gray out the “Cancel & add more disks” and “Modify software selection” buttons, leaving only the “Reclaim space” button available.

Why gray those button out? Who knows — it’s yet another poor design decision.

And of course, as discussed earlier, what if you have no desire to actually reclaim any disk space? What if you’re just going to use free space on existing volume groups? Your only choice is to click on that poorly named “Reclaim space” button.

When you do so, you’ll go to a Manual Partitioning screen:

Manual Partitioning

Click to view full size.

Originally, I tried to fit manual partitioning into this section, but it became too large, so I’m going to discuss manual partitioning in its own section, next.

Fedora 18 Installer: Part 2

This is Part 2 of a multi-part review of Fedora 18’s updated and redesigned installer:

This review specifically covers how the Fedora 18 installer works for a relatively complex installation: What happens if you have an existing server with multiple disks, multiple RAID arrays, multiple volume groups and logical volumes, and you want to install Fedora 18 in addition to what’s already on the system without wrecking the existing setup?

Technical content: HIGH
This post is primarily aimed at experienced Linux system administrators.

Storage Device Selection

In the Fedora 18 installer, once the initial Installation Summary screen finished probing hardware and checking software dependencies, there were no greyed-out sections left on the screen, and only one warning icon left. This was next to “Installation Destination.” Thus, logically, the first thing to do is to click on that.

When you do so, you’re presented with a screen showing all the storage devices in your system, and a warning at the bottom: “No disks selected; please select at least one disk to install to.”

Installation Destination screen

Click to view full size

Thumbs UpOnce again, this screen has some pros and cons.

What’s good about this screen is that it provides a visually pleasing and simple view of the storage devices in your system. It tells you what kind of devices they are, and how big they are.

I wish that I had more good things to say about this screen, but that’s really about it.

Thumbs DownHonestly, there are far more bad things to say about it:

First of all, if you have multiple identical storage devices in the system, it’s not immediately apparent which device is which: It’s not clear if they’re listed with sda at the left and sdz at the right or vice-versa (and indeed, some people have reported their devices showing up in reverse order from what’s expected). You can figure out which device is which by hovering your mouse over each icon. A tool-tip will tell you the device name and ID. You shouldn’t have to do that, though. That should be immediately visible on the screen.

Second, there’s absolutely no indication of whether any given storage device has anything on it or not. If you have six devices that are completely allocated, or six devices with absolutely nothing on them, they look identical on this screen. The pretty icons are nice, but wouldn’t you rather see a bar or pie chart showing how much of each storage device is already allocated? Better yet would be something that shows you what’s actually on the device (e.g., 30% Windows, 40% Linux, 10% Other, 20% Free).

The final problem is the navigation buttons. Both the naming and placement of the buttons is poorly thought out. It’s pretty much a standard convention to put all your navigation buttons together at the bottom of a given screen or dialog box, usually either centered or to the right. In this case, however, you have a “Continue” button in the bottom right corner (which is greyed out until you select at least one storage device) and a “Done” button in the upper left.

Why on earth aren’t the navigation buttons together at the lower right?!?

Worse yet is that “Done” button. What happens if you bring up this screen and then realize that you’re not ready to do your storage configuration yet? What if you want to go back to the installation summary screen and pick packages first? There’s no “Quit” or “Back” button. Instead, the only button you can push is “Done,” even if you’re clearly not done.

If you click that “Done” button without doing any storage configuration, it’ll take you back to the Installation Summary screen, where the Installation Destination icon will be greyed-out with an ominous sounding “Failed to save storage configuration” message:

Failed to save storage configuration

Click to view full size.

It’s pretty clear that the installer doesn’t keep track of storage device state information internally. Instead, it appears to rescan the devices at various points, such as when exiting the Installation Destination screen and returning to the Installation Summary screen. This temporarily causes completely unnecessary and potentially anxiety-inducing warning icons to pop up on the Installation Summary screen.

The “Failed to save storage configuration message” will clear after a short while and be replaced with a “No disks selected” message. Installation Destination will then be available again.

If you just click “Done” on the Installation Destination screen, the installer’s behavior is not particularly nice. However, it can get much worse if you select a storage device before clicking that Done button.

If you select one or more devices and then click the Done button instead of the Continue button, the installer will assume that you want to use automatic partitioning. If the storage device in question is blank or has enough space to handle an install, this works well, and it returns you to a nice clean Installation Summary screen:

Automatic Partitioning

Click to view full size.

However, it’s not obvious on the Installation Destination screen that “Done” means “Go ahead and do the rest automatically” whereas “Continue” means “I may want to do some customization.” As an expert user, I don’t like the fact that the installer doesn’t ask whether I really wanted to use automatic partitioning.

You may argue that doing automatic partitioning is a good idea if you just select some storage devices and then click Done, especially for inexperienced users. I can certainly see the logic of that argument. However, most inexperienced users will be probably installing on a system that already has a fully allocated disk. What happens if you just click Done in that scenario?

It’s not pretty. Upon returning to the Installation Summary screen, you’ll again get that ugly “Failed to save storage configuration.” However, this time it won’t revert to a simple “No disks selected” message. Instead, it will say “Error checking storage configuration”:

Error checking storage configuration

Click to view full size.

So… back to the Installation Destination screen you’ll go.

As you click on storage devices to select them, the number of disks selected, total capacity, and amount of space free will update in the lower left corner:

Selecting disks

Click to view full size.

Thumbs DownHowever, even after selecting storage devices, that’s all the information that you get. On this screen you can’t get any more detailed information about partitions that already exist on the devices, RAID or LVM configuration, etc. Even right-clicking on a storage device does nothing.

You get number of disks selected, total capacity, and total amount of space free. That’s it.

Selected Disks Dialog

There is a “Full disk summary and options…” link in the lower left corner of the screen. This is another example of the relative immaturity and inconsistency of the new installer design, as this isn’t a button. Instead, it has the appearance of a hyperlink — the only one to be found anywhere in the installer.

You might think that this will bring up additional detail on existing partitions, etc. for the storage devices. It doesn’t. If you click on that link, it brings up a dialog box that provides exactly two pieces of information not available on the previous screen: It tells you how much free space there is on each device, and it’ll tell you if one of the devices is set as your boot device. (It also shows the ID for each device, but that’s available in a tool-tip if you hover over the disk in the main screen.) Remarkably, even this dialog doesn’t show the device name (e.g., sda, sdb, etc.):

Full disk summary and options dialog

Click to view full size.

This dialog exhibits some potentially problematic behavior when it comes to automatically selecting and remembering the boot device:

When you bring up the Selected Disks dialog it will remember if a boot device was previously specified. If that storage device is still selected it will keep that as the boot device. If, however, no boot device has been specified, or if a device that was previously specified as a boot device is no longer selected, it will automatically select the first storage device from the devices that are currently selected as the boot device.

This may seem like obvious and correct behavior, but it can have some unintended side effects if you happen to bring up the Selected Disks dialog before you’ve selected the storage device that you want as your boot device.

For instance, if you select only sdf on the Installation Destination screen and then bring up the Selected Disks dialog, it will automatically select sdf as your boot device:

Only sdf selected

Click to view full size.

If you then close the Selected Disks dialog, select additional storage devices, and bring up the Selected Disks dialog box again, the installer will still think that sdf should be your boot device:

Additional disks selected

Click to view full size.

This is admittedly a fringe case, but it’s another example of an area where the new installer simply isn’t mature. Personally, I’d suggest that better behavior would be to only remember a selected boot device if the user manually specifies one. If the user didn’t manually specify a boot device, then the installer should re-select the best boot device from the selected storage devices each time the dialog is brought up.

One final note on the Selected Disks dialog: In playing around with the installer, this is one area where I encountered bugs on a few occasions. For instance, at one point I managed to somehow confuse the installer into having no boot device selected:

No boot device selected

Click to view full size.

I haven’t yet been able to figure out how I managed to do this or reproduce the problem, but at least the installer seemed to recognize that there was a problem, as it draped an orange warning bar across the bottom of the screen complaining that “You have chosen to skip bootloader installation. Your system may not be bootable.”

At another point, I managed to confuse the system into apparently thinking that the part of the screen where it could display the storage device selection list was smaller than the rest of the screen, resulting in a weirdly formatted, chopped off looking screen. Again, I haven’t been able to reproduce this problem (and unfortunately didn’t grab a screenshot).

This concludes Part 2. Next: Installation Options and Reclaim Disk Space dialogs.

Fedora 18 Installer: Part 1

This is Part 1 of a multi-part review of Fedora 18’s updated and redesigned installer:

The new installer has been talked about in several Fedora 18 reviews. Opinions range from Igor Ljubuncic’s verdict of “Worst ever” and Alan Cox’s pronouncement that “The new installer is unusable” to Rob Zwetsloot saying “the new installer is a wonderful, minimalist designed app” and Hedayat Vatankhah’s statement that “with a new UI, it now looks good too.

This review will specifically cover how the installer works for a relatively complex installation: What happens if you have an existing server with multiple disks, multiple RAID arrays, multiple volume groups and logical volumes, and you want to install Fedora 18 in addition to what’s already on the system without wrecking the existing setup?

Technical content: HIGH
This post is primarily aimed at experienced Linux system administrators.

In a Nutshell

If you want a review in three sentences, here you go:

The Fedora 18 installer has some good points as well as some serious flaws. Overall, I think it is not as good as the existing installer, but that’s because it is a new, immature product. In the long term, I think it has the potential to become better than the current installer once all of the kinks and flaws get worked out.

A few specific items:

  • Some people may prefer the new look — it has a clean and simple design. It is, however, a shocking departure from the expected for people who’ve been using Red Hat distros for any length of time.
  • There are some poor flow, layout, and button naming decisions. These will probably be fixed as the new installer design matures.
  • The installer seems to have more of an “assume the installer is dumb” philosophy than previous versions. This may be helpful for Linux neophytes if done right (I’d argue that it’s not), but can be frustrating for experienced Linux admins.

Background

I maintain a “do everything” server in my home. It stores and serves files (including CD and DVD images), does PC backups, runs bittorrent, provides a squid caching web proxy, handles e-mail, runs an Apache web server, runs virtual machines (including a PBX In a Flash Asterisk server), and more.

This server runs Fedora. Every three versions of Fedora, I “upgrade” my server. “Upgrade” is in quotes because I don’t do a standard upgrade. Instead, I leave the existing install alone and intact, and install the new version of Fedora alongside it. If I have problems, I can just revert to the existing install. When everything’s functioning the way I want it, I permanently switch to using the new version. This approach has worked well for me through Fedora 6, 9, 12, and 15.

Now that Fedora 18’s out, it’s time to “upgrade” again.

My Test Setup

In the past, I’ve done my upgrades without testing beforehand. Given some of the things I’d read about Fedora 18, though, I decided this time around to test things out using a virtual machine first. Thus, I started by building a simplified virtual replica of my server in VirtualBox. This review is based on my experience on that virtual machine. If anything changes when I do the install on my actual server hardware, I’ll post an update.

Here’s how I set things up:

I installed Fedora 15 on the virtual machine. During setup, the six virtual hard drives on the machine (four 2 TB and two 1.5 TB) were partitioned as follows:

# Usage sda sdb sdc sdd sde sdf
1 /boot 1 GB 1 GB - - - -
5 md51 (RAID-5) 250 GB 250 GB 250 GB 250 GB 250 GB 250 GB
6 Unused 250 GB 250 GB 250 GB 250 GB 250 GB 250 GB
7 Unused 250 GB 250 GB 250 GB 250 GB 250 GB 250 GB
8 Unused 250 GB 250 GB 250 GB 250 GB 250 GB 250 GB
9 Unused 250 GB 250 GB 250 GB 250 GB 250 GB 250 GB
10 Unused 250 GB 250 GB 250 GB 250 GB 250 GB 250 GB
11 Unused 250 GB 250 GB 250 GB 250 GB 250 GB 250 GB
12 md10 (RAID-10) 134 GB 134 GB 134 GB 134 GB 112 GB 112 GB
13 md0 (RAID-0) 234 GB 234 GB 234 GB 234 GB - -

Logical volume management was set up as follows:

Volume Group Devices Logical Volumes Size Mount Point
vg.raid0 md0 lv_r0 980 GB /r0
vg.raid5 md51 lv_r5 50 GB /r5
vg.raid10 md10 lv_home 25 GB /home
lv_root 50 GB /
lv_swap 2 GB swap

On my actual server, partition sizes were slightly different, and the unused partitions contain additional RAID-5 arrays which are also part of the vg.raid5 volume group. This was done so that if I later decided that I wanted to switch some or all of my storage to RAID-10 or btrfs that could be more easily accomplished.

Starting the Install

After an initial isolinux boot process, the anaconda installer starts up, and you’re presented with a screen where you select what language to use:

Language Selection

Click to view full size.

So far, this is pretty much exactly the same as any previous Fedora install. However, once you’ve selected your language, things suddenly get very different. In previous releases of Fedora you would next select your keyboard type, and then the installer would walk you through storage configuration, package selection, etc.

In Fedora 18, you’re instead immediately presented with this screen:

Initial install screen

Click to view full size.

Thumbs UpThis new setup is nice for a couple reasons:

First, it lets you skip configuration steps. For advanced installers, not needing to hit ENTER or click an extra “Next” button when you just want to accept default settings is nice.

Second, it shows at a glance if there is anything that you haven’t configured yet but are required to configure. No orange warning icons? Great — just click “Begin Installation” and be on your merry way!

Thumbs DownOn the other hand, there are a few problems:

Remember how I said above that you can skip configuration steps? Well… That can cause issues too. New users might accidentally neglect to change a setting that they really want to set. For instance, a user with a French keyboard who’s just using the mouse for the install might forget to change the keyboard type.

Others have also pointed out that a big orange bar and warning symbols dotting the screen isn’t exactly user-friendly. It can give users the impression that they’ve done something wrong and need to fix it.

Perhaps the biggest issue, though, is a (hopefully unintended) result of the way that the new installer does things in parallel. The installer throws screens up as quickly as it can, and lets the user start interacting with them even while it’s still doing things behind the scenes. In principle, this is a great idea, but it’s not implemented very well here.

When you first see the “Installation Summary” screen, it looks like the screen shot above, complete with a warning icon next to “Software Selection” and several greyed out sections. After a short while, the installer finishes probing storage and the “Installation Destination” section suddenly becomes available:

Installation Destination available

Click to view full size.

Then, after the installer finishes chugging through its software dependency checking, the “Installation Source” and “Software Selection” sections become available. The little orange warning icon next to “Software Selection” also magically disappears:

Installation Source and Software Selection available

Click to view full size.

This is just plain bad design.

Users should never be told that they need to do something when it’s really the program that needs to do something. And if that warning suddenly disappears after a few seconds when the program gets its act together, it may just confuse the user more.

Also, if a section is greyed out because the program is doing something, this needs to be made abundantly and obviously clear to the user. The installer does show status messages like “Probing storage,” “Downloading package metadata,” and “Checking software dependencies,” but these are themselves greyed out. A much better choice would be to display a progress bar or hourglass next to sections that will become available after the program finishes doing its behind-the-scenes work.

This concludes Part 1. Next: Part 2: Storage Device Selection and Selected Disks Dialog.

Hard Disk Insanity

The other day I found myself looking at an 8GB micro-SD card and marveling at how much storage has shrunk over the years. That in turn got me thinking back to the first computer I owned that had a hard drive: It was a Tandon (not Tandy) clone of the original IBM XT, with an 8088 processor. It looked something like this (apologies for the image quality — it was the only one I could find, and I’m guessing it was scanned from an old newspaper advertisement):

Tandon Computer

Image courtesy of The Probert Encyclopaedia.

This particular computer had a hard drive that was, to me at the time, unfathomably huge: Ten whole megabytes! Megabytes?!? That was more space than thirty floppy disks, and I didn’t have anything for my PC at the time that needed more than a single floppy!

Needless to say, the feeling that ten megabytes was a lot of space didn’t last long. Today my home file server has eleven terabytes of disk space. It would take 1.1 million of my first hard drive to provide that much storage. That got me thinking… Exactly how much space would 1.1 million of those ten megabyte drives take up?

Well, that first hard drive looked something like this:

ST-225

Image courtesy of Computer History Museum.

That drive is actually a 21 megabyte Seagate drive, whereas mine was a ten megabyte off-brand drive, but the size is about right — roughly 5.75″ wide, 1.63″ high, and 8″ deep, for a total of about 75 cubic inches. For comparison to modern equipment, it’s about the size of an older CD-ROM or DVD-ROM drive.

1.1 million of those drives would take up about 82,478,000 cubic inches of space (or 47,730 cubic feet, or 1,768 cubic yards, or 1,352 cubic meters). That’s a lot of space. But how do you put it in terms that are easy to visualize?

Well, how about cargo containers? You know… the type you might see on a train, or on the back of a semi-truck, or stacked up on a boat or at a port?

According to Wolfram Alpha, it would take 25 forty-foot cargo containers to hold those hard drives. So picture 25 of these (actually, I’m pretty sure that’s a twenty-foot container, so picture something twice as big):

TEU

Image courtesy of Wikimedia Commons.

Alternately, according to Wolfram Alpha, this is roughly the equivalent of 0.73 times the cargo capacity of a Boeing 747 large cargo freighter, or 0.54 times the volume of an Olympic sized swimming pool.

And my current file server stores that same amount of data on six 3.5″ hard drives.

Whoah.


References:

… so it begins.

On December 21, HostGator had a tongue-in-cheek “End of the World” sale, celebrating the day when so many had claimed the Mayans thought the world would end. I’d been meaning to grab the pdwaterman.com domain for a while to use for blogging and otherwise tooting my own horn providing information about myself.

Well, now that more than a month has gone by, I’ve finally decided that it’s time to start putting up some entries. For now, I’ll simply be using this domain to do some simple blogging. Most of it will probably be technical in nature. Since I’m a Linux geek, the majority of it will be Linux related, although I may occasionally divert into things like the Asterix PBX, Perl, XBMC, etc.

My goal right now is to get a new blog entry up on a weekly basis. We’ll see how well that goes. :)