The Debian Universe


/read/online

^contents

25: First Look: Next-Generation Debian Installer

The Debian installer has been considered its Achilles heel for a long time, but in the last couple of months things have really been heating up in Debian-installer-land. Ian Murdock recently announced to the Debian project that Progeny, the Debian-based distro that created the Progeny Graphical Installer, was dropping PGI in favour of porting Red Hat's Anaconda installer to Debian. But things haven't been sitting still within Debian itself either, with frantic work over the last couple of months to get the next-generation Debian Installer to the point where Sarge (Debian 3.1) can be released.

A Debian-Installer Debcamp in Germany in September saw many of the core developers get together for several days of intensive coding, with the result that Beta 1 of the new installer is now ready for the world to come and gawk, and poke, and kick the tyres, and even take it for a spin around the block. It's still changing on a daily basis but the developers want as many people as possible to give it a whirl and report back any problems they have.

So, for your edutainment and complete with pretty pictures, I present to you this first look at the next-generation Debian Installer.

Installer Rationale

To understand some of the design decisions that have been made with respect to the installer and why it's taken so long to get to this point, it's important to know a little about the Debian project itself. For many people this section will be rehashing old ground so if you just want to get to the guts of it skip ahead now to the next section, "Getting The Installer".

The long and the short of it is that Debian is committed to supporting multiple processor architectures. It's famous for being the most broadly deployable Linux distro (and possibly operating system) in existence, running on at least 11 distinct architectures. Nobody has more expertise in porting software to different platforms than the Debian project.

While that causes some problems when distributing normal user-space software, they're difficulties that can be worked around: for example, a package written in C needs to compile on all 11 architectures, but not all architectures use the same C libraries. No problem, Debian's server farm just autobuilds the package with different libraries for each platform.

When it comes to an installer, though, things are different. An installer needs to be bootable on all platforms, but different platforms boot in totally different ways. x86 systems start up and look for local disks in a certain way, Power Macintosh systems do it another way, and S/390 is different again. Then consider that the job of an installer is to figure out what local hardware you have available and setting up the system in a way that will work on that hardware. How does it detect the hardware? Will a detection system that works on one architecture fail horribly on another?

Probably.

But it gets worse: think about what happens when you first launch an installer. It boots up and displays some stuff on screen, right? But some machines use an AGP or PCI graphics subsystem, while others may not have a graphics subsystem at all, only a serial interface with a character-based console. What should the installer do if it starts up and finds the host system doesn't even have a graphics card installed?

The more you think about questions like that, the more it'll bake your noodle when you consider the task faced by the Debian Installer team.

In essence, they are trying to make a universal installer that will run on any architecture with any hardware detection method and any display system.

So people may bitch and moan about how it's taken so long for Debian to produce a "pretty" installer while other distros have had one for years, or they may say that Debian should just adopt a third-party installer like PGI or Anaconda, but that doesn't really take the big picture into account. Debian's mantra is to be the Universal Operating System, and that can't happen without a Universal Installer. Personally I'm in awe of the fact that the installer team have got as far as they have.

There's more I could add here but I'd only be going over old ground, so for now I'll just point you to a couple of references: the introduction to The Debian Universe, where I explain more of the philosophy of Debian, and Installing Debian, where I walk through the Woody installer.

But enough philosophising, lets see that installer!

Getting The Installer

The home page of the Debian Installer sub-project is www.debian.org/devel/debian-installer/. On that page you'll see links to several flavours of Beta 1, as well as daily builds for the particularly adventurous. At present only i386 and PowerPC versions are available, but others should follow soon. By the time Sarge comes around the architecture list will have grown to cover everything officially supported by Debian.

For the purpose of this exercise I'm going to work through the 100MB CD image of the Beta 1 release, which includes enough base packages to get a complete system up and running. Alternatively you can use the 50MB CD image, which is almost the same but is missing the base packages and can't be installed stand-alone: it needs access to the Internet during the install process so it can grab the base packages off a Debian mirror.

So, download an ISO, burn it to CD, and away we go.

Starting The Installer

Pop the CD in your drive, make sure your BIOS is set to boot off CD, and fire it up.

I'm sure the very first thing most people will think is "Huh? This looks just like the old installer."

Well, yes and no. Yes, it'll come up in text mode with a startup screen like this:

But no, that's not all there is to it. Remember what I was just saying about making the installer as universal as possible? In this beta build the installer runs in text mode because it's the most widely supported, but due to its modular design the developers can stick almost any front-end on it they like. There are already test builds using a GTK (ie: Gnome-style) GUI with mouse-driven menus etc, and if you really wanted to you could build a front-end using anything from a Braille device to Macromedia Flash. No doubt once the core functionality of the installer is sorted we'll start seeing some alternative front-ends become available, but for now it's text.

So, let's move on.

Boot options

At this point you could just hit "Enter" to go straight into the installer, but if you feel like poking your nose into things you can press "F1" to go to the installer help screen:

In the help screen you'll find all sorts of things like boot options, information on accessing Debian mailing lists for additional support, and copyright information. For example by pressing "F4" you can access information about boot arguments to run the installer in verbose or debug modes:

Typical users shouldn't need to care about any of that though, and just press "Enter" to let the installer get started.

Language Setting

As with previous installers the first real question is what language you want to choose. Makes sense, right? Nobody wants to try to navigate an installer in a foreign language, and since Debian has a particularly international following proper i8ln support in the installer is vital.

The language selection dialogue defaults to "English (USA)":

Be warned, though, there is a big catch here: some of the language options don't default to a Qwerty layout! In the past you were asked what keyboard layout to use but now it just makes a guess based on the language setting. If you select "English (USA)" you'll be safe, but be warned that if you choose "English (Australia)" or "English (United Kingdom)" your keyboard will switch to the Dvorak layout! Not quite what most people expect.

I must admit it made me smile a bit though, because I just happen to use the Dvorak layout:

You could avoid this issue by doing a verbose install and going through the menus to set the keyboard variant manually, but for now the simplest solution is just to choose "English (USA)" if you want a standard Qwerty layout, or "English (Australia)" if you want a sensible layout like Dvorak ;-)

Sequential versus Menu Mode Installers

Right about now is where you'll suddenly see a major difference between the new and the old installers. You'll probably remember that the old installer used a rather unusual menu system that allowed you to complete various tasks in the order you choose, rather than forcing a sequence of events on the user. That can be very powerful if you know what you are doing but it's not what most people expect so in the new installer the development team have provided the best of both worlds: by default it just steps you through sequentially in the way people expect, but if something goes wrong it drops back to the old-style menu mode so you have access to the tools you need to fix things up. Advanced users can also choose to go straight to the menu mode if they want to, by setting boot arguments as mentioned above.

Autodetection

The new installer does such a great job of hardware autodetection that most people will probably just sit back and let it do its job. I had to be really quick with the camera to capture these next shots because they're gone in the blink of an eye, but if you watch carefully you'll see the installer load up the modules it needs for autodetection:

And then without even asking it just goes about its business, figuring out your hardware requirements all by itself. It even defaults to looking for a DHCP server to configure the network, and if it finds one it moves right along without requiring you to touch a single key. It even sets up all the necessary kernel modules for you:

Talk about easy!

I've written a lot of words to get you up to this point, but if you've accepted the defaults you've probably hit a total of 2 keystrokes by now: "Enter" at the boot prompt, and "Enter" at the language settings. Yet by this time the installer has detected your hardware, set up the necessary kernel modules, and configured your network ready to fetch and install packages.

Nice.

Configuring The Network

If your system found a DHCP server and skipped merrily along you can miss this step and move on to distribution selection, but if you don't happen to have a DHCP server available on your network the installer will sit for quite a while looking for one:

Before finally failing with a rather alarming-looking error message:

If this happens to you don't panic, it just means you'll need to set the network manually. Hit "Enter" to get rid of the restful red failure message and the installer will drop you to menu mode:

Just use the arrow keys to move down to "Configure a static network" and hit "Enter" to be asked a series of questions about what hostname, IP address etc to use:

The questions here are generally quite straightforward, so I won't bother going through them all in detail.

If you don't want to set up a network connection at all you can instead use the menu to just skip the network setup entirely by selecting the next step, "Detect CDROM devices and mount the CD".

Choose Your Distribution

As I explained in a previous article Debian has multiple distributions available simultaneously: Unstable (Sid), Testing (currently Sarge), and Stable (currently Woody). The installer gives you the option of choosing which one you want to install:

For this example I'll choose Sarge, since that's the current release candidate.

Disk Partitioning

And now we get to the bane of every beginner's installation experience: disk partitioning. The new installer finds available disks and asks which one you'd like to partition:

Something you'll notice in that dialogue is that it uses devfs naming conventions to label the disks, which will probably hit most people for a six if they're expecting to see something like "/dev/hda" as an option. If you've only got one disk though it should be pretty obvious what to choose!

Next the installer throws you into cfdisk to set up the actual partitions:

Personally I think a very good thing would be an option at this point to ask if you want the installer to take care of the partitioning for you. While many people will want to configure the partitions themselves, most new users (and many experts for that matter) just want a standard set of partitions that work in 95% of cases. Having a "Please decide for me" button that just nukes the disk and sets up a standard partition set would be very useful at this point.

But for now, I'll walk you step by step through cfdisk.

The screen will be black, and you'll see a list of partitions on your disk. If the disk is new, the list will be empty except for an item listed as Free Space.

To drive cfdisk use the up and down arrows to select the partition you want to act on, and the left and right arrow keys to select an action from the menu at the bottom of the screen. If you need to delete old partitions to create new ones, select each one in turn, then select "[Delete]" at the bottom and press "Enter". After you've deleted all the partitions, you'll end up with only Free Space in the list.

Now, there are many ways you can partition a disk depending on what you will be using the computer for. Servers often have separate partitions for different purposes, for example. However, I'm going to keep it simple by using a very basic partitioning scheme.

Creating A Boot Partition

First we'll create a small partition at the start of the disk to hold the kernel image, etc. This is to avoid any possible problems with the bootloader not being able to find the kernel and therefore not able to boot your computer. With the Free Space item selected, move to the "[New]" menu item and press "Enter". Next it will ask you what type of partition to create: select "[Primary]" (the default) and press "Enter". Next it will ask for the size of the partition, and will have pre-entered a default that will use up the entire disk. We don't want that, so type "50" (no need to delete the default, it will just vanish) and press "Enter". Next it will want to know where to put the partition: select "[Beginning]" and press "Enter".

The final thing to do for the boot partition is to flag it as bootable: select the first partition and "[Bootable]" and press "Enter". You'll see an entry called "Boot" appear under the "Flags" column.

Creating A Root Partition

Next we'll create the root partition, which is the main partition that will hold most of your filesystem.

Use the arrow keys to select Free Space, move across to "[New]", and press "Enter". Select "[Primary]" as before. Next you need to set the size: once again we need to change the size, but first pay attention to the total space available. On my 80GB disk it shows 79974.40 MB available after creating the boot partition. We need to leave some space to make our third and final partition, so take about 1000 off the available size (no need to be precise) and enter that amount. I'll type in 79000 here. Now press "Enter".

Select "[Beginning]", press "Enter", and you're done for the root partition.

Creating A Swap Partition

The last partition is the swap partition, which is the space on disk that Linux will use to store items that can't fit into memory. This is often referred to as "virtual memory".

You know the procedure by now: move down to Free Space, select "[New]", then select "[Primary]". Next is setting the size. This time we just want it to use all the space left on the disk, so leave whatever default it puts in there, but check that it's about 1000: if it's way off, you may have made a mistake setting the size of the root partition. Press "Esc", delete the root partition, and create it again. If all is well, just press "Enter" to have it create the final partition.

One other thing you need to do now is change the type of the swap partition: it uses a special partition type, but cfdisk will have created it with the default type. Make sure it's selected in the list, then move across to "[Type]" but remember to only use the left and right arrows: it's on the second row of menu items, but if you use the up and down arrows you'll just change the selected partition. The menu items wrap at the end of the line.

When you have the last partition and "[Type]" selected in the menu, press "Enter". You'll see a bewildering list of partition types listed in hexadecimal notation, but the one you want is type 82 (Linux swap). Press any key to exit the list and go to a prompt that says "Enter filesystem type:". 82 is probably already selected for you since it's the most common choice but if it's not, just type 82 and press "Enter".

You'll then be returned to the main cfdisk screen, and you should see the last partition has now been changed to type "Linux swap".

Do a final sanity check on the partitions: make sure
o There are 3 partitions in total and no free space
o The first 2 partitions are of type "Linux"
o The first partition has the "Boot" flag set and is about 50MB
o The last partition is of type "Linux swap" and is about 1000MB

If there are any mistakes go back and correct them now. If necessary you can just delete all the partitions and start again.

This is the moment of truth: the point where the disk is irreversibly changed, and previous data may not be recoverable. If you change your mind totally at this point you can select "[Quit]" to bail out of cfdisk without saving your changes.

However, if everything looks OK and you want to go ahead with the changes, select "[Write]" in the menu and press "Enter". You'll then see a scary looking warning to confirm that you really want to do it. Type "yes" in full and press "Enter" to commit the changes.

After a few seconds of disk activity you'll end up back at the cfdisk main screen. Select "[Quit]" from the menu now, and you'll be back in the Debian installer.

Mount Partitions

Whew! Hopefully you're still with us after cfdisk.

Next the installer will want us to set up each partition with a filesystem and a mount point:

Select each partition in turn, and hit "Enter" to set the options for it:

The installer supports a number of filesystem types, including Ext2, Ext3, and ReiserFS. Probably the best choice for a general purpose filesystem is Ext3 at the moment, although I also use ReiserFS on many of my systems.

After setting a filesystem type for the partition, it asks where you would like the partition mounted:

After you've set up each partition it will take you back to the partition list screen, and when you've done them all you can select "Finish" to actually write the filesystems to disk. You'll get a big warning:

after which your computer will sit and spin its wheels for a while as it builds the filesystems and mounts everything in the right places.

Installing The Base System

This is another one of those steps where you sit back and watch the installer do its magic. First it fetches the packages required for the base system:

Then it configures them:

Then installs them:

And it's done! At this point your box actually has pretty much everything on it for a basic Debian system, it's just not yet configured and it's missing a bootloader. So, the next step is

Installing The Bootloader

The installer uses Lilo by default. Yes, I know, lots of people prefer Grub but hey, Lilo does the job. If you really want a different bootloader you can fix that up yourself once the installer has finished.

So when the installer asks you where to install Lilo:

Just hit "Enter" and let it go ahead and do it.

Reboot

So now we've got a base system installed and the bootloader is ready to go. Next we need to reboot the system so it boots off the disk we just set up, allowing us to finish the setup:

The old installer had a really annoying bug at this point where you couldn't get the CD out until it had started rebooting, but the new installer takes care of that: it even ejects the CD for you! Grab the disk out of the drive so it isn't sucked back in and booted again when the machine restarts, and a minute later you should have booted into your new system and be greeted with the welcome screen:

Hold on, we're almost there!

Timezone

We need to tell the system how to determine its timezone etc, so first we tell it about the system clock setting:

Then the country, following by the city:

Setting Up Users

Next you need to set a root password:

The system then gives you an option of creating a normal (non-root) user. Do that now.

Configuring Apt

Apt can obtain packages from a number of sources, such as from a local CDROM, from a local filesystem, or from package servers via the Internet. The installer asks you what source you would like to use:

For now you can just leave it set to "cdrom" for it to use the base packages off your installer CD (in which case you should stick it back in the drive now so it can be scanned since it was removed at reboot), or you can select "http" if you want to fetch packages via the net.

You will then be given the option to have your system track security updates from the central Debian servers. Right now it doesn't actually matter what you set here because until it's officially released there are no security updates for Sarge. Once Sarge has been released, though, tracking security updates would be a very good idea.

Now that Apt knows what sources you want it to use it will go ahead and try to access any remote sources to verify that everything is set up properly. If you selected HTTP, it will try to connect to your nominated servers and retrieve package lists. It will also try to contact the security servers if you said to track security updates.

Apt should now have a list of packages available for you to install.

Tasksel And Dselect

In my Woody installer walkthrough I recommended just skipping tasksel and dselect and leaving installation of additional packages until after your base system was configured. I'm repeating that advice now, so when you get to the next screen where the installer asks you what program to run for package selection:

just say "nothing".

Final Configuration

We're in the home stretch! If you got this far you're within moments of a fully installed Sarge system, so don't give up just yet. First though we've got to get through configuration of a couple of final packages. After leaving the screen shown above your system will start unpacking and setting up a couple of packages including PCMCIA and the Exim mail server.

If you're running a desktop system you probably don't need PCMCIA support at all, but next you'll get a couple of potentially confusing screens about how to handle PCMCIA upgrades. My advice is to trust the defaults when in doubt, so just go with the suggested option of "ask":

Then when it asks about restarting services after an upgrade, accept the default ("Yes") again.

The final step is configuring the Exim mail server. For many people this series of questions could be very confusing too, but first you need to answer a fundamental question: do you want to run your system as a mail server? If so, you'll need to understand what the configuration options mean.

If you're just running this machine as a workstation, though, you probably don't want to run it as a local mail server since your incoming and outgoing mail will all pass through another mail server anyway. If that's you, select "Satellite system" and you're done:

Hey, we're there! The very last screen you should see will look like this:

Hit "Enter" one final time and you're ready to log into your newly installed Debian Sarge system.

Reporting Bugs

The whole point of the beta release of the installer is for the development team to get feedback from a large number of people running as many different kinds of systems as possible. So please do them a favour, and if you notice any problems running the installer make sure you report them. Go along to the Debian Installer home page and look for the heading "What can I do to help?". You'll see references there to the mailing list and bug tracking system (BTS). Make sure you use them!

Chickenrun Revisited

Heard the joke about how Debian is so easy to install that even a chicken could do it, because all you have to do is keep hitting "Enter"? Well, with its super-dooper hardware autodetection the new installer is even more chicken-friendly. Once again the chicken-stopper would be cfdisk, but apart from that it sanely defaults in most places.

Give it a try, I think you'll find it quite simple to drive.

Copyright 2003-2004Jonathan Oxer. All rights reserved.
-:Site powered by Internet Vision Technologies:-