Build A Linux Distro With SUSE Studio
SUSE-based Linux distributions can be built with little more than a working knowledge of the open source operating system.
Choose from SUSE Studio's set of basic system templates. |
---|
Once, if you wanted to create your own Linux distribution, you had to jump through more hoops than your average Cirque du Soleil performer.
Now it's possible to automate the vast majority of the process, thanks to a Web service created by Novell and SUSE: SUSE Studio. All you need to create your own SUSE-based distro is a Web browser that runs Flash, a decently fast Internet connection, and some working knowledge of Linux.
My quick-and-dirty video walkthrough of SUSE Studio gives the fundamentals, but this article is a more detailed rundown of the feature set and the quirks of the system. Since I made the video, some system bugs have been fixed and capacity has been improved. Note that capacity on SUSE Studio is still limited, so you might have to wait a bit to have your account approved when you first create it.
SUSE Studio Basics
When you create an account with SUSE Studio, you're allocated 15GB of space to use for creating Linux system images. Each image you create can be rendered into one or more builds, which can be executed in different ways -- a disk image, an .ISO, etc. Think of it in the same sense that a book can be printed in multiple bindings and type sizes but still contain the same text. Any build older than seven days is automatically deleted, so be sure to download builds after making them.
There's a good chance the kind of Linux system you want to build falls into one of a number of basic categories. To save you the trouble of building things completely from scratch, SUSE Studio comes with several basic system templates onboard. They can be further customized, but contain more than enough default functionality to get you started.
The first clutch of templates use openSUSE 11.1 as their base distribution:
Just enough OS (JeOS): A minimal appliance-style distribution, useful for headless installs where you only talk to the server through a command line or remote connection.
Server: A text-only (command-line) server that comes with a firewall but little else installed by default. Start with this if you want something extremely minimal and want to build it up package-by-package.
Minimal X: A simple graphical desktop using the tiny and light IceWM window manager. Good for building something where you want a GUI but don't want to go all-out and use KDE or GNOME.
GNOME desktop: A graphical desktop that uses GNOME 2.x, and includes the base roster of utilities for GNOME (desktop widgets, etc.)
KDE 3/4 desktop: Graphical desktops that use either KDE 3 or KDE 4. Many people have a strong preference for one version over the other, so both are supported.
If you'd rather use SUSE Linux Enterprise 10 or 11 -- Enterprise as opposed to openSUSE -- there's templates for both of those, with 11 sporting a slightly broader gamut of choices. Finally, you'll want to choose your architecture, 32-bit (x86) or 64-bit (x64), and pick a name for the whole thing.
The Software tab provides an editable list of available packages. |
---|
Adding Software
When you pick one a template, many packages are installed by default, but they may not be the exact ones you want. You might want to add packages not normally included with a given template, or even roll in your own from another repository entirely, apart from what SUSE provides. The Software tab lets you take fine-grained control over what packages and repositories are included in your distro.
The "Software sources" section of the page lets you control which repositories are being scanned for software to include. It also lets you manually upload RPM files to be included in your distro, in case you have something that's not available through a software channel (e.g., something you've custom built).
"Selected software" lets you see, at a glance, what software packages and patterns are available. Patterns are collections of packages and configuration files, sometimes not normally bundled together, that are provided to allow easy setup for certain things. Common patterns include x11 (for X Windows) and gnome (for GNOME, of course). Click on the name of a pattern and you'll see what's included by default, as well as some suggested optional packages that aren't installed by default.
The bottom of the page, the "Search for software" section, lists all the software currently in your distro via a number of different categorizations. By typing in the search box, you can narrow the scope of the view; the matches show up in real time as you type.
Configuration And Customization
This is where you configure the behavior of the system in ways that packages don't directly address. For instance, in the first sub-tab, General, you'll probably want to set the default locale and time zone for your distribution. (SUSE Studio doesn't attempt to set the default timezone from where you might be logged in; it's always Europe/Germany, which reflects SUSE's own origins.) The General tab also lets you set up default users, some basic firewall behaviors, and the network configuration -- again, mostly options that can be left as-is unless you have specific preferences as to how they should be configured.
Personalize lets you have some fun with the basic look-and-feel of your distribution by changing logos, backgrounds and boot/login displays. This is a quick way to apply corporate branding to your distribution. Custom imagery for this section can be easily created and uploaded.
Startup lets you control the initial run level or change whatever EULA you might present to the end user, and Server automatically starts any server daemons that might need to run (e.g., MySQL).
Desktop allows you to set an auto-login for a given user, and automatically start any programs that should kick in when the user logs in. Storage and Memory are for allocating how much disk image space or virtual memory are assigned to the build when you create disk images and virtual appliances, respectively. Finally, the Scripts tab lets you add your own custom scripts to run when the build ends or whenever the distro boots. This could be anything from a custom program run during the boot process to on-the-fly configuration changes. Obviously this one's for pros.
Use overlays to add files outside the scope of the package management system. |
---|
Overlaying Files
This tab allows you to add files to your build, but layers them in after all the selected packages are installed; hence the term "overlay." You'll want to use this to add files that are not touched by the package manager, such as customizations for specific end users or applications. These files can be uploaded through your Web browser or pulled in from somewhere else on the Web. This is handy if you already have an archive packed up somewhere and don't want to download it and then upload it all over again.
Note that if you want to upload a whole bunch of files at once, your best bet is to make an archive with the file hierarchy and permissions you want and upload that. You might need to experiment a bit to get the file hierarchy in the archive to match up with the results on your system image, but if you're familiar with the Linux file system, it shouldn't be too tough.
Select a build type from the various options. |
---|
Building The Distro
This is where it all comes together. Under "Create Appliance," you'll be able to select the format of your distribution's build: USB stick or hard disk image; live CD or DVD; VMware virtual machine; or Xen virtual machine. You can also set a version number for the build, although this is more for the sake of your own personal bookkeeping than anything else. You can build multiples of the same image -- for example, a live CD image and a VMware image, in parallel -- but each copy you build will use up available space you have on the service.
Building some types of system images may cause the builder to squawk about the package selection for your image. These warnings will show up in the left-hand column of the page, and are typically accompanied by a recommended action to correct the problem -- e.g., remove a package or swap it for another, more relevant one.
The "Testdrive" option is easily the single coolest thing about SUSE Studio. |
---|
Click "Build" and the build process will start. The build's progress will be tracked in realtime on the page, and once you're done you can click "Testdrive" to boot the image in your browser, or "Download" to retrieve a copy. You can also obtain MD5/SHA1 checksums for the files in question to insure that they're downloaded properly.
Note that sometimes the build process can get stuck at 100%; if this happens, sign out and back in again to force the build tab to update. (This is probably a beta issue that will be fixed before much longer, and it happens only rarely.) Also keep in mind that disk images are compressed, so they might not take up as much space as you might think they should.
Test Drive Your Distro
The "Testdrive" option is easily the single coolest thing about SUSE Studio. Click on "Testdrive" in the Build tab and you'll be taken to a screen where the selected image will be booted up and running in a window, courtesy of the magic of Flash. Mouse and keyboard actions within the console behave as you'd expect for the most part. Special key commands (e.g., Ctrl-Alt-Del) can be sent manually via the buttons to the left of the virtual console.
Test-driven machines have several limitations. For one, there is no outbound network access -- you can't fire up a Web browser within a testdrive session and browse Websites. There is limited inbound network access via SSH, but you have to explicitly enable it (click on "Networking:" at the top to do this). You can, however, set up inbound HTTP connections to your device -- great for testing a Web appliance, for instance.
The biggest limitation: every test drive session can only run for a maximum of 60 minutes. This prevents any one user from hogging too much of SUSE Studio's CPU resources. Any extended testing should be done locally, anyhow; the testdrive function is mostly there to do quick-and-dirty checks and insure that things are in order before you go through the trouble of downloading the image.
I've built several systems with SUSE Studio -- desktop machines and mini-servers alike -- and the results are impeccable. Obviously, you'll get the best results if you are generally experienced with Linux. Come to think of it, this isn't a bad way to get that experience in the first place -- in an environment where you can impose the kind of control you'll want.
InformationWeek has published an in-depth report on application development. Download the report here (registration required).
For Further Reading
About the Author
You May Also Like