Sunday, August 2, 2009

Linux Update does not own my machine

In an earlier post, I compared boot times between Windows Vista and Fedora 11 (Linux) on the same laptop, a Dell D430. In that post, Linux was booting from a Live USB.

Since then, I've realized that if I can boot a Live USB on this laptop, I can certainly boot a USB drive with Linux installed on it. And that is what I have done. I am using an 8GB USB flash drive, about the same capacity as you'd find in a netbook, for example. (I boot into Linux on weekends, on my own time.) Works great! So I hope to use this as a way to directly show the differences between Linux and Windows.

Here's an example: remember a few weeks ago when I discussed how Windows Update isn't finished installing updates even after it's installed the updates? At the end of my post, I wrote:
In stark contrast, when I ran Linux at work, I could install updates while using the system. If the system update tool wanted to reboot afterward, it was usually because I'd received a kernel update, and you do need to reboot for the new kernel to take effect. But on Linux, you can keep using the old kernel until you're ready to shutdown/reboot. And I always had the option to shutdown or reboot later, when I was ready to.

And in Linux, when you reboot or shutdown, you actually reboot or shutdown. None of this "let me install a few updates before you really get to shut down your system." Reboot means "reboot", and shutdown means "shutdown".

I guess I got spoiled for how cleanly Linux systems apply updates. Microsoft sure could take a lesson from that.
I'd like to demonstrate this in action: This morning, I booted my laptop using the Linux USB drive. Not long after I'd booted, I was greeted with a message that I needed to install updates. (This is not surprising, since I only get to boot Linux on weekends, so there's a week or more of patches to install.) As usual, I let the system install updates while I was working.

After the updates were installed, I got another message saying that some of the updates would take effect after I logged out and logged back in:

It's rare to have to do anything in Linux after installing updates. Usually it's only when I install kernel updates, which always needs a reboot unless you use something like Ksplice.* But there were several gvfs updates in there (gvfs allows you to access a network resource as a virtual file system) and I suspect gvfs needed to be reloaded for the changes to be visible. gvfs runs at the user level, so the system only needed to log out / log in for the changes to take effect.

I wasn't really finished working, so I could have clicked "Close" and continued my work. But I realized that this was an excellent opportunity to directly compare the difference between installing updates in Linux, versus in Windows. So I opted to log out and shut down, just like in Windows.

And when I clicked "Log Out", I got the usual dialog:

Care to guess what happened after I clicked "Shut Down"? My Linux system actually let me shut down. Like, right then. None of this "let me install a few updates before you really get to shut down your system", like in Windows. I wasn't held hostage by an update process that insisted on owning my machine for another hour. The system just shut down, normally.

Linux "System Update" was done when it said it was done. That is how modern systems are supposed to work!


  1. The saddest thing is, most Windows users think the behavior of Windows is normal. First time I did an update in Ubuntu, I wasn't sure it had actually worked. It didn't give me a cruel five second countdown to an involuntary shutdown, it didn't spend an hour with three dots blinking in and out (like XP does) and no other feedback, and it didn't crash when I restarted.

  2. It's rare to have to do anything in Linux after installing updates

    Indeed. One rarely has to do anything at all. A given piece of software that is updated may have to be restarted, but it never has to be turned off before updating (notable in comparison with windows). Kernel updates require reboot. But a log-off log-on is actully very rare indeed. I don't think I've ever had to do it. Your explanationis probably correct.

    I don't like the fact that some Linux distros now give you this 60 second thing. Too windowfied. If I say shut down, I want a shut down system right away.

    By the way, I've tested this further: I've don an update, then gone to the update manager, forced it to redo it's repositories, then forced it to check for updates, to see how often some un done update is hidden. I've not seen any in about two years. A couple of years ago I had foudn that if you pull the wall socket out of the back of the computer while it is finishing an instll you may have to run an update to get everytyhing current (but pulling out the wall socket does not mess up the install. If that happens, something else is wrong, probably hardware).

  3. The "Install updates and shut down" option is cruellest on laptops. You need to grab the thing and GO, and it's sitting there saying; "Don't mess with me" and giving no clue to when it will be ready for you to leave the room. And you don't dare interrupt it, either.

    NoobixCube, LOL about the first time Linux updates ran when you weren't sure it actually worked. It seems strange to be able to keep working while updates are in progress, and not worry. I've seen windows updates shut down a computer in the middle of a presentation.

  4. I like the 60 seconds before shutdown thing. Its a small interruption, but I've accidentally clicked shutdown in the menu when I wasn't paying attention. Saved me an actual reboot by having the option to stop it, didn't really mean to shut down.

  5. And then there's the related issue of Windows not letting you use a file with two applications at the same time. And the message windows that you can't resize. So frustrating.

  6. I also like the way Linux doesn't try to install new "features" that you don't want.

    I have some sympathy with an OS throwing a bit of a wobbly if you power off the computer in the middle of an update, although on the "grown-up" systems I used to work on it was only really an issue with firmware.

    I have very little sympathy with an OS attempting to do something I haven't asked for. Sure: do what you can to protect me from my own idiocy but don't try to sneak stuff past me.

  7. I have some sympathy for the OS too ... unplugging the laptop during an update was a dumb thing (and I admitted as such... "I did the unthinkable, and unplugged the power.")

    But I was left with no choice - it was time to go home, my wife was waiting in the car, but Windows wanted to "finish" installing updates (about an hour!) as I tried to shut down.

    That's the bit that really gets me ... Windows wasn't really done installing updates, even though the Windows Update process said it was finished (and only needed to "reboot" so changes could "take effect.)

    I like that Linux doesn't do that. When the Linux System Update process was finished installing updates, it was done. When I shut down, the system really did shut down without trying to install a few more updates.

  8. Pulling out the wall socket can mess up an upgrade, if it's a particularly large update involving grub and you hit it at PRECISELY the wrong moment. I run Ubuntu alphas a lot so I do LOTS of updating, and this has happened to me on a system that's lost power at an inopportune moment. I had to hand-tweak grub-conf with a live CD to get it booting again.

    Tell you what, if you want to become an expert Debian sysadmin then run Ubuntu alphas ...

    But yeah, generally it's sweet ;-)

  9. I think you missed the message of the post. It wasn't that he complained about windows breaking bc he pulled the plug during update. Its because windows wasn't done installing updates after Win Update finished.

    But linux update is done when it says it is. Hence the title, linux update does not own my machine.

  10. @Greg: If I say shut down, I want a shut down system right away.

    Ah; difference in opinion then. I actually very much DISLIKE the shutdown sequence you like. There are sort of two separate problems I have. First is the same thing the first anon poster said -- I'll occasionally hit "shut down" by accident, and the "would you like to shut down" dialog stops that from being a big problem. The Windows approach is usually OK too because Firefox is usually running and gives a "would you like to close this window with 17 tabs? really?" dialog, and when Windows tries to close Firefox and fails, it'll display the "these programs are keeping your computer from shutting down" dialog, and I can cancel the shutdown from there. Either solution works decently well in practice for me, though the Linux one is better because there WILL still be some programs that bite the dust before Windows gets around to letting me cancel the shutdown.

    Note too that Vista and Win7 aggrevate the "I clicked the shutdown button by accident" problem tremendously as I got to hit the little right arrow so I can put it asleep and miss to the left. In fact, whining about it just now made me go figure out whether I can change what the default power button does -- you can, so I set it to sleep.

    Anyway, the second reason that I don't like Linux's shutdown system applies (at least AFAIK) to all distributions, including those with shutdown confirmation dialogs. And this is the problem of unsaved data. Say I have some program open (e.g. Emacs, though I'm not 100% sure it will exhibit this behavior) and there is unsaved data. I shut down. Both Linux and Windows will send the application a "shut down" message (I think they are SIGINT on Linux and WM_QUIT on Windows). Emacs says "okay, there's unsaved data, so I'm going to display a query to the user to ask what to do (save/don't/cancel)." Where the OSs differ is what happens next. On Windows, the shutdown stops until you, as a user, deal with this dialog (or minibar message). On Linux, you get lost data. Or at least have to go through obnoxious, application-specific, and not-guaranteed-to-exist recovery procedures. (Emacs has recover-file, Word has autosaves, but the Gimp doesn't AFAIK.)

    We could obviate the need for this feature if programs had better session-recovery features, but as it stands now, I'll take the need to babysit the shutdown process a little bit that you get with Windows as opposed to data loss/having to work to avoid data loss that you get with Linux. I almost never have a need to "shut down as fast as possible right now at any cost".

    @Anonymous: "And then there's the related issue of Windows not letting you use a file with two applications at the same time."

    This is only sort of true. This behavior is selectable when you open a file on Windows; however the default is to not share the file.

  11. Update manager is one of the most annoying bits of Ubuntu. It interrupts more than it should, takes focus when it isn't necessary, over-uses resources, and sometimes requires a password to check for updates.

    ...but that's only comparing it with other Linux apps. Compared to Windows Update, it is fantastic.

  12. Ok, I had to post about this one. This is not an excuse, but an explanation. Linux uses a kernel type called microkernel. It means that there is a main kernel and all the other parts are separated processes within the system. Windows uses something called monolithic kernel. It means ALL parts run on the same process as a whole. This is both one of the main reasons for so many bugs and the need to reboot after nearly every update. It is as simple as that.

    On Linux, you need to reboot if you update the kernel.
    On Windows, you need to reboot if you update the kernel.

    It IS the same. What changes is the scope of "what is" kernel. I read that Microsoft finnaly changed this on Windows 7, but don't quote me on that, as it wasn't from reliable sources.


Note: Only a member of this blog may post a comment.