smxi dist-upgrade/ maintenance script, kernel install
Posted: Apr 13, 06, 12:28
techAdmin
Status: Site Admin Joined: 26 Sep 2003 Posts: 4128 Location: East Coast, West Coast? I know it's one of them.
(Page last updated 2011-06-03)
smxi and related scripts
NOTE: this page is not maintained, please use the smxi.org resources listed below for reasonably up to date documentation.
smxi stands for a variety of things, like system maintenance, sid maintenance, or whatever else you want it to stand for. The 'xi' in smxi does not stand for anything in particular, but you can make up anything you like. The name smxi does fit nicely with two stand-alone smxi modules: sgfxi, the smxi graphics installer engine script, and svmi, the smxi virtual machine installer engine script.
:: Code :: If you like this script, and want to donate something, please feel free to do so using the black/yellow "Make a Donation" link above. Donations of any size are very much appreciated, and help keep my systems running, as well as offsetting some of the expenses I incure hosting this stuff.
Smxi supports Debian, and Debian derived distros (like Antix, Aptosid, LMDE - Mint, Crunchbang).
smxi is a general utility script that handles the standard system upkeep for Debian Sid (and Sid based, distros like Aptosid), Debian Testing (and Testing based distros like Antix or LMDE), and Debian Stable - kernel installs, dist-upgrade/upgrade, package installs, cleanup, and graphics install. Has full logging, and will create logs on error of key parts. For non sidux systems, like Debian, you can select whether to use aptitude or apt-get, as well as dist-upgrade or upgrade, as smxi defaults when you first start the script.
script information and resources:
- New home, smxi.org for smxi/sgfxi/svmi scripts!
- script documentation. This will be worked on as time and enthusiasm permit. Useful items:
- script svn - Google's svn stuff is pretty pleasant to work with, especially when compared with other sites, and is actually quite useful. Home to smxi, svmi, and sgfxi code. This is always the current code. Includes most script development tools, patches, and all script files.
- script changelog - this is usually the most up to date changes, but the svn site will also have information.
- #smxi on irc.oftc.net - irc smxi / sgfxi / svmi support for all Debian based distro users trying out smxi or other scripts - bughunters with output welcomed. If someone is in the channel, ask a question, then check back later, it might take some time to get an answer. To check available factoids from the Amy bot, type in: !categories in your irc client.
Script Install and execution procedure
Script Installation
- Easiest Manual Way:
As root user, do these steps. As a one liner, to just copy and paste into console and hit enter (to copy and paste, highlight the oneliner, then click in your terminal window, and click your center mouse button, and it will paste it in:
:: Code :: cd /usr/local/bin;wget smxi.org/smxi.zip;unzip smxi.zip;smxi
And here are the steps line by line.
:: Code :: # as root user, do these steps:
cd /usr/local/bin
wget smxi.org/smxi.zip
unzip smxi.zip
# then to start smxi or any of the contained scripts:
smxi
## or if you want just sgfxi
sgfxi
## or if you just want svmi
svmi
That's it! The zip file contains the main three starter scripts: smxi; sgfxi; svmi, and they are set to be executable, so you don't need to do anything else.
- Individual script launch: you can use wget to download the script directly [hint: copy and paste this directly into your console window, after logging in as su in console, then just run the lines below:
As a one liner copy and paste into console:
:: Code :: cd /usr/local/bin;wget -Nc http://smxi.org/smxi;chmod +x smxi;smxi
Here's the steps individually, line by line, if you prefer:
:: Code :: cd /usr/local/bin
wget -Nc http://smxi.org/smxi
# Then make it executable:
chmod +x smxi
# then start it up
smxi
- Only if available in your distro: Use the built in script installers.
To start smxi, sgfxi, or svmi, simply type in its name as root, in init 3: smxi and it will download and install itself automatically.
Script must be located in /usr/local/bin to run correctly. Please do not put it anywhere else!
Script Execution
- Script must run in root user mode, and with X shutdown
To stop X, imply enter into console using something like ctrl+alt+F1, or console login using kdm/gdm, and smxi will kill x for you if it's running.
You can do that by:
:: Code :: # use the: ctrl+alt+f1 method to enter console.
login as: root
smxi
or, for systems like sidux with default startup runlevel of 5, you can just type the number 3 when you boot, in grub. This will add 3 to the end of your default boot string, which will make you boot into runlevel 3. This is my preferred method, since it's 100% fool proof. Login as root, then:
- execute the script
Important things to do and know
- Please read through this page before proceeding.
- See the bottom of this page for a sample script -h (help) menu, which will give a list of currently available script options.
- Do the full upgrade at your own risk. This script makes it safer for newer users than it would be normally, but there is no guarantee, of course.
- For sidux / Debian Sid users: Check the sidux forums and home page for the latest word on the safety of doing the dist-upgrade.
- The script is updated regularly with new fixes, new kernels, etc, and the Warning system is also updated when required, so it's not a bad idea to use this script fairly regularly if you want to keep your system up to date. Separate warnings are sent for Sid, Testing, and Stable (not that Stable needs warnings usually).
- smxi will do a full upgrade of all necessary components up to the latest Sid, Testing, or Stable stuff, including things like XOrg , kde, and so on.
- Running smxi using Debian Sid/Testing/Stable. If you want build your own install from scratch, read this debian businesscard + smxi thread before you proceed!!. Debian Sid/Testing support is being actively developed and is working quite well now. Conversions are not officially supported by sidux, but users report success, if you follow the steps correctly. However, the official sidux policy is to not support crossgrading from other distros. Please respect that, ie, do what you want, but don't ask them for help if it messes up.
Conversion offers following (under active development) options:
1. No distro conversion, just run with smxi alone
2. Install sidux sources, and use script for kernels/fixes from sidux (for Sid based, or converting to Sid systems).
3. Convert to use core sidux scripts, and sources
- Backup your root directory before beginning if you want to be safe always when doing dist-upgrades. Here's a good how-to for making rdiff-backups. Or, even more convenient, just use the new rdiff-backup script, rd-h2.sh. That's a complete package that will get you set up and ready to backup with a few quick edits.
Script X based utilities
smxi has a few options you can run inside of X / desktop. Besides -h (help), which lists all options, with the correct syntax to run them with, there are two other main ones that are fairly useful:
- -v Prints out some system information, last system upgrade with smxi, script version, and some other useful information.
- -W (requires one more parameter: c, w, or wc). -W c prints out latest config file y/n information. -W w prints out latest alert/warning information. If you start smxi as root in console/terminal, the -W option will also do a live update of this data, otherwise it will use the last config/alert/warning data present in your system.
This is a new option, if -W returns an error, you need to first update smxi to support it, like this: as root, do: smxi -U (this updates smxi). To update the config/warning files in your system the first time, do, as root: smxi -W wc (this will download all the required files to your system, then print them out).
Remember, for latest configs/warnings, you have to start as root, otherwise it will show the last configs/warnings smxi used.
Features:
- Script options. To see the list of available options, run the script with the -h option, like so: smxi -h
This will show a menu of the current options. Most of the options let you skip steps you might not need to use, for example: -ki would skip the kernel install and system information.
- Logging: all primary actions and data, plus primary function errors, are logged to: /var/log/smxi.log
- Error Handling: apt-get update error handling. Hopefully this will help deal with those persistent corrupted bzip files in update pdiffs.
- Tests for all required programs the script uses as it runs, like unzip, grep, basename. If missing, offers to install, or exits.
- Script stores user choices so you don't get asked repeatedly to do one time only operations like fix-xorg and so on.
- Script tests for active internet connection, if absent, gives user a chance to install wifi modules if they just did a kernel install and lost internet. Also tests for nvidia or ati card and only offers correct driver choice now.
- Script checks for updates of itself automatically and installs them, then restarts again.
- Advanced and Standard kernel install options, let's you pick which kernel version you want to install, from very latest to an older one. Supports autodetection for 32 / 64 bit.
- Debian Mirror Updating: The first time you run the script you will see an option to pick your debian source mirror location. After the first time, you can start the script with the -m option change the Debian mirrors used in /etc/apt/sources.list / /etc/apt/source.list.d/debian.list. You will see a list of all available country mirrors, select the number you want, and your sources.list will be updated for you. Changing your mirror is highly recommended for people who do not live in Germany. Sidux uses German mirrors unless you change them.
- Related to Debian Mirror switcher is Sidux repo mirror switcher. Allows you to add an extra non core sidux mirror. You see this on first run of smxi, and you can use it any time with -M option. Highly recommended is to set one core sidux repo and one non-core. Non core are especially useful for users in the Americas. Sidux repos are sadly not very reliable, so you'll find that it's quite useful to restart smxi with -M if a sidux repo fails.
- The first time you run smxi, you will be asked if you want to use kernel metapackages, or use manual install. The option will explain pluses and minuses of either method. You can change your preferences any time by starting script with -N option. Basically, if you keep metapackages, every time you dist-upgrade, if there is a new kernel, it will install, whether you want it or not, and you have to reboot. If you remove them, you can install new kernels when you want. I have found it's unnecessary to install every version of the kernels, unless something isn't working for you re hardware support.
- upgrade warning system. Warns users about major issues that may break their installs. Stops dist-upgrade from proceeding when there is a warning flag present.
- apt-get features - keyring install, gpg setting, apt-get update with error handling, dist-upgrade with error handling, fixes for sid problems run either before or after the main dist-upgrade.
- Miscelleous Tweaks: Many options now, with subsections. Some favorites: Dump gtk - get rid of the firefox/thunderbird/icedove/iceweasel default gtk file handler dialogue boxes, you know the ones, where you have to click too many times to get anywhere in your file system, with the silly useless autocomplete etc. Run it and those gtk dialogues are replaced by some more useable ones. Check out the other options, like installing the original cool sidux grub black/red graphical boot screen.
- Package Install: Openoffice.org installer. Full featured, lets you select your language, then automatically installs any related language items like thesaurus, dictionary, or ooo help. Also option for which desktop integration package you want, kde or gnome.
- System cleanup. With apt-get clean and autoclean option, kernel-removal options, and script backup file cleanup option, and Remove extra unused xorg modules. Xorg module removal tool will let you keep any or all of the unnecessary modules. All modules removed are logged to: /var/log/smxi.log so you can easily reinstall them.
- New Kernel Options: kernel module installer: installs from list of kernel modules to your RUNNING kernel. Not all modules avaialable at all times. Module remover: remove installed kernel modules, one by one, using selection list, will remove ALL installed modules from all kernels for each module selected. For sidux users: Debian Kernel installer, in advanced kernel install options, let's you install the latest debian kernel. For Debian based systems, this option, if you have have sidux sources installed, will show install-sidux-kernel instead of default Debian in standard kernel install.
You can select your default kernel type, depending on your base system, in Miscellaneous Tweaks, Advanced Tweaks, set kernel default. This also lets you turn off the kernel question altogether if you want.
- Graphics Install: Makes an attempt to show currently installed fglrx/nvidia driver version number. Should work for most users most of the time, but not always. Graphics Install supports ATI fglrx and nVidia binary driver install. You will see a list of the drivers, legacy to latest release, that your card supports, please read any warnings or advice before you proceed.
Potential Issues
- If you use wifi, installing a new kernel may require that you also manually install new wifi modules using dpkg. If you lose your wifi connection after kernel upgrade, the script will detect that, and offer you a range of wifi module options, including madwifi or ndiswrapper. You must know what module you need for this to work, the script cannot detect this for you.
dpkg -i modules*.deb
- The CUPS printing system may not work correctly for your printer after the dist-upgrade. Please read this cups / printer thread to see how to resolve that issue. The solution posted by piper seems to work for most people.
- Radeon/ati/fglrx driver install advisory Please be aware that radeon/fglrx support is erratic from ATI, and many more users experience problems with the ati drivers and the kernel. For example, for the period (April-May 2007) ATI had NO fglrx driver that worked at all for xorg 7.2 / Linux. During this period, users of ATI cards less than R400 could use the free xorg radeon driver, but users of > R400 cards, especially R500 cards, had to use xorg vesa only, and then only got 2d.
2.6.25 and later sidux kernels are NOT working with fglrx. This is quite typical, fglrx does not run well on cutting edge systems, nor is it intended to do so. You can however use smxi to install the latest Debian kernels (kernel install, advanced kernel options, install-debian-kernel).
The new radeonhd/radeon free xorg drivers are getting better and better all the time, in May 2008, initial radeonhd 3d support for R500 cards started working, so that's quite promising.
It's up to you to decide. For best results, use either Nvidia cards, or the new open source Intel 9xx video stuff, or if you prefer, try the radeon/radeonhd options, which will be slower, but will usually more or less work, although radeonhd is still under development. 2d works, 3d is coming along slowly. radeon is not bad, but not as fast as fglrx would have been.
Script Functions
The script will do everything that is required, you will be presented with a series of options along the way, some are from dist-upgrade and installs, some are from the script.
Note that you can view the new script options by running the script with the -h option. You do not to need to be logged in as root, or to be in init 3, to do that.
How to use the script choices
Type in either the number of the choice in the script, or type in lower case 'y' or 'n' to answer the questions, followed by <enter>.
The script options you will see are as follows [you may not see all of these, since some only run for a specific version or versions of legacy systems]:
Update script steps
- Script checks user is root, and that no X session is running. Shuts them down if you say 'y' when it asks.
- Script checks for internet connection.
- Script checks that it is the latest version of itself, then upgrades itself if not.
- Script tests for distro version, and exits if it's older than the currently supported previous version.
- If it's the first time you've run the script, it will alert you about how it will keep your settings/choices. This feature will make it only ask certain questions one time. If you want to delete these settings, simple delete this file: /etc/smxi.conf and it will go back to default. Or you can edit a specific choice. This is not usually needed though.
- If it is the first time you run the script, script will let you change your default Debian apt mirror source location. The default is ftp.de.debian.org, but it's usually faster to use your local ones. You can always change to any mirror you want by starting the script using the -m option. It will also give you the choice of adding another non core sidux mirror, and changing the core sidux mirror. You can make the script show this with -M option after the first run too.
- First time users, or starting with -N, gives option to change from kernel metapackages / manual script install. Manual means you select when to install kernels with smxi, metapackages means any time you dist-upgrade and a new sidux kernel is in apt, it installs.
- Install kernel is an option if you want to upgrade your kernel first. New kernel will not be live until you reboot. New Latino authored feature: You can now install video drivers before rebooting, and finish your dist-upgrade etc.
Features an advanced option that lets you pick from a list of other kernels, older, in case your latest kernel doesn't work, breaks, or has some problem with your hardware which was working fine before.
NOTE: kernel material will be placed in /usr/src/kernel-downloads/<kernel name, like: 2.6.20.slh.2>. This is where all the extra modules etc for that kernel are located.
- Script stops to deliver warnings of dist-upgrade dangers, and give a short warning message about what the danger is, with options of what to do next.
- Script does apt-get update, and updates your pgp keyrings [sidux-keyrings] and updates again.
- After this, dist-upgrade will begin.
Important - KEEP CURRENT CONFIG FILES: Right before the dist-upgrade begins, you may see a list of files to say 'y' to when the dist-upgrade process asks if you want to use the new version or keep your current configuration file (y means use new version, and n means keep currently installed config file.) Please take a look at those before you proceed.
The default is keep yours, that's usually right, but it pays to note the config files before you proceed, it's hard to remember them all. Normally, with fresh sidux installs, you rarely will see this question, but with older installs, you'll see it now and then.
For all other configuration file options, always choose the 'n' option, or keep current config file. Sometimes you say 'ok' to do that, sometimes 'cancel', but usually it's the plain text 'n' that you want.
You may also see questions in blue boxes, that asks if you want to update or change your keyboard layout and other things, default is no, keep it as no or you may run into issues. Make sure to read those, and chose the option that makes you keep your current configs.
- After the first dist-upgrade finishes, you will see either an error message letting you know you need to run install -f / dist-upgrade again, or just the normal continue screen with the list of options available. If no error occured (errors appear in yellow text), it's usually safe to just enter the 'continue' option.
If you got errors on dist-upgrade, run the apt-get install -f '1' / dist-upgrade '2' options as many times as you need to run it to get rid of errors. Keep running these until you get no errors. Nothing happens when you run it again if it's done, so do it one extra time to make sure.
The script has error handling, so unless you see a yellow error warning after update or dist-upgrade, it's fairly safe to assume that it finished fine.
- Once you're sure the whole dist-upgrade is set, and click either 'continue' to proceed to the next step, or use the option to check your startup functions, before you continue.
- Next you will see some Post Dist-upgrade options:
- Install packages lets you install or reinstall packages like skype, streamtuner, ekiga/gnomemeeting.
- Remove packages lets you completely remove packages like koffice, gnomemeeting, isdn, etc.
- fix-fonts, with or without the -e option, adjusts your system fonts. If you want to do that, do it. If you are moving up a major xorg version, run the -e option. I only do this once in a while, after a major xorg update. If you've never done an upgrade, you should probably run this, otherwise, if you've run it before, try not using it.
- Miscellaneous Tweaks: You can do various things. Options added as required. Lots of fun stuff, different grub graphics, firefox/iceweasel tweaks, and much more.
- System Cleanup: cleanup system, non needed kernel removal tools, remove backups of files.
- The last real step is to install your nvidia or radeon/fglrx drivers. Type in the menu number + <enter> to choose the driver you want to install, or to continue to end. You can also run this graphics installer as a standalone application, by typing in: sgfxi but you won't see as many options or features.
If you don't see any drivers offered for your card, it means that your card is not supported and will need to use the native xorg nv or ati drivers, which are fine for older cards.
- And that's it. You can choose to start your windows manager after you're done if you want, or just exit the script.
If you also installed a new kernel, and are installing a non free nvidia or fglrx driver, you will be given the choice of rebooting after the driver install is done.
To finish it up
This script is tested heavily on a wide range of hardware and computers. All bug reports, if real, are handled as quickly as possible.
It's easy to run this script, and reduces the chance of error for most users who can't spend all their time tracking sid and update issues and fixes.
As far as I can tell, you can repeat the running of this script as many times as you want with no ill side affects, and it doesn't matter much which options you pick, except for making sure the dist-upgrade actually is fully completed. However, if the script reports no error on the upgrade, it's fairly safe to assume it went through fine, but feel free to run the 1 or 2 options (install -f and dist-upgrade) again just to make sure.
Script help menu and options
You can see the following information any time by simply running this command, assuming that the script has already been installed on your system: smxi -h
That will show you the help menu.
A very convenient option you can run in X/kde is: smxi -v
This shows you the last time you ran a dist-upgrade, the last time you ran smxi, and some other useful information, along with the currently installed smxi version (but not, note, the latest available version, you have to be root to update it).
These are the options (as of this home page last updated date):
:: Code :: ==================================================================
OPTION HELP MENU: smxi
==================================================================
Options: together: -deghiklmrstuwx or separated: -giktw -f -x
You can run this script with any combination of these options.
You can put them together, like this: -ik, or separate, like this: -w -x
Each option, or group of options, must begin with a -
Example: smxi -ikw skips the system info, kernel install, and warning.
------------------------------------------------------------------
The following allow you skip parts of the du script:
-d Skips dist-upgrade if you also select the w option.
-e Skips some of the 'Please hit enter to continue' questions.
-g Skips the graphics install question.
-i Skips the system information section.
-k Skips the kernel install question.
-R Skips check for latest, restart, and downloading latest script version.
This skips the Restart of the script, that is. Not recommended for most users except
when they are rebooting from a fresh kernel install and running the script again.
-s Skips some parts of script that require an internet connection.
Avoid using this since it disables almost all script functionality.
-S Skips the internet connection test. Use this if script fails connection test
but you know your connection is fine.
-t Skips the Post dist-uprade/upgrade options section.
-w Skips the du warnings section. Starts the pre-upgrade fixes and
dist-upgrade sections automatically if used without -d. Be careful!
The following are advanced script options:
-j Turns off all text/output script colors, sets to console/tty default.
-m Runs the option to change debian mirrors in /etc/apt/sources.list
-M Runs the option to change default sidux-apt/kernel Mirrors
-N Runs the option to change kerNel metapackage status prior to dist-upgrade.
-p Runs apt-get update without using pdiffs. Good for fast connections.
-P Run script with Proxy settings for connection, requires this syntax:
-P http://[<username><:password>@]<server><:port> Argument is required.
-U Forces an Update of script before it runs again.
-x Runs extra script features that are not core to central functionality.
-X Download and run a custom user script. Syntax: -X userscript-name#userscript-url
Example: -X my-cleanup-script#somewebsite.com/my-cleanup-script
The script will show as an additional option in the Post upgrade section.
The following can be run in X/kde:
-h Prints this help menu.
-v Prints version and system information, including distro version,
current kernel, apt update and dist-upgrade last used, and last use of smxi.
-W Requires argument: c (print current configs) OR w (print warnings) OR
wc (prints first warnings, then configs). Like this: smxi -W wc
Note: if you want to get the live, current configs/warnings, and not the ones left from
your last smxi use, you must be root in terminal/console.
-! 20 - Triggers update of ALL smxi components, including sgfxi, svmi, and inxi.
-! 21 - Downloads and installs rbxi package to /usr/local/bin.
------------------------------------------------------------------
Remember: to scroll up or down in terminal window, use: shift+pageup/pagedown
------------------------------------------------------------------
That's about it, have fun.
Back to top
|