个人工具

模板:U Lucid/Installation

来自Ubuntu中文

跳转至: 导航, 搜索

Installing Ubuntu

Warning: Ubuntu Desktop edition installer no longer allows a custom installation of GRUB, and it now uses GRUB2 (which allows very little customization). DO NOT USE the Lucid Lynx Desktop edition if you use a boot partition, use multiple OS (more than 2), or chainload bootloaders. The Ubuntu installer will overwrite your Master Boot Record and you will later be forced to recreate it manually. This is a serious flaw in both Karmic Koala and Lucid Lynx. Use the Ubuntu Server edition instead (and then later add the ubuntu-desktop).

GRUB2 has caused major problems in installation -- be sure to research the issue before upgrading to Lucid Lynx.

Hardware requirements

Ubuntu Lucid Lynx runs well with as little as 384 Mb RAM. (The installer requires a minimum of 256 Mb RAM, while the alternative installer can run using only 192 Mb RAM.) Netbooks can run Ubuntu Lucid Lynx.

The install takes between 3-4 Gb hard drive space, and 8 - 10 Gb will be needed to run comfortably.

If you have an older computer with less memory than this, consider Lubuntu (if between 256 Mb and 512 Mb RAM) or PuppyLinux or DSL (if less than 256 Mb RAM).

Fresh Installation

See this guide for burning the ISO image to a CD ("LiveCD").
Use the LiveCD for installation.

Dual-Booting Windows and Ubuntu

Rarely, a user may experience problems dual-booting Ubuntu and Windows. In general, a Windows OS should be installed first, because its bootloader is very particular. A Windows installation usually occupies the entire hard drive, so the partition needs to be shrunk, creating free space for the Ubuntu partition. (You should clean up unnecessary files and defragment the drive before resizing.) See changing the Windows partition size.

After shrinking the Windows partition, you should reboot once into Windows prior to installing Ubuntu or further manipulating the partitions. This allows the Windows system to automatically rescan the newly-resized partition (using chkdsk) and write changes to its own bootup files. (If you forget to do this, you may later have to repair the Windows partition bootup files manually using the Windows Recovery Console.)

If done this way, there is no problem installing Ubuntu as the second operating system and it is done automatically from the Ubuntu LiveCD. Allow the Ubuntu LiveCD to install to "largest available free space."

A Windows partition should be at least 20 Gb (recommended 30 Gb for Vista/Windows 7), and a Ubuntu partition at least 10 Gb (recommended 20 Gb). Obviously, if you have plenty of disk space, make the partition for whichever will be your favoured operating system larger. For a recommended partitioning scheme, see this section.

Alternatives include:

  • Wubi (Windows-based Ubuntu Installer), an officially supported dual-boot installer that allows Ubuntu to be run mounted in a virtual-disk within the Windows environment (which can cause a slight degradation in performance). Because the installation requires an intact functioning Windows system, it is recommended to install Ubuntu in this manner for short-term evaluation purposes only. A permanent Ubuntu installation should be installed in its own partition, with its own filesystem, and should not rely on Windows.
  • EasyBCD, a free Windows-based program that allows you to dual-boot Windows Vista and Ubuntu (as well as other operating systems) by configuring the Vista bootloader.

Installing multiple OS on a single computer

Warning: The Ubuntu Desktop edition LiveCD installer no longer allows a custom installation of GRUB, and it now uses GRUB2 (which is difficult to customize). DO NOT USE the Lucid Lynx Desktop edition LiveCD as an installer if you use a boot partition, use more than 2 operating systems, or chainload bootloaders. The Ubuntu installer will overwrite your Master Boot Record and you will later be forced to recreate it. This is a serious flaw in both Karmic Koala and Lucid Lynx Desktop edition installers. Use the Ubuntu Server edition instead (and then later add the ubuntu-desktop).

If you want to install more than 2 operating systems on a single computer, check out these tips.

Use Startup Manager to change Grub settings

Grub is the bootup utility that controls which OS to load by default and other bootup settings. You can change Grub settings from the Startup Manager:

System -> Administration -> Startup Manager

If Startup Manager is not installed, install it:

sudo apt-get install startupmanager
Note: You can also edit the Grub settings manually from the command-line interface.

Dual-Booting Mac OS X and Ubuntu

Mac OS X has a similar structure to Linux (it is BSD Unix based). Dual-booting Mac OS X and Ubuntu detailed instructions can be found here.

Installing Mac OS X after Ubuntu

  • If you decide to dual boot with OS X, choose ext2 as your partition type during the Ubuntu installation. (For this the Super Grub Disk CD is a useful utility. You can download the Super Grub .iso image file at forjamari.linex.org and burn the image to a CD-ROM.)
  • Once you have installed Ubuntu, edit the Grub start-up list:
sudo nano /boot/grub/menu.lst
and add the following lines:
title Mac OS X
root (hd0,0)
makeactive
chainloader +1

Reboot your Mac and go to the terminal in Max OS X (if you have any issues booting, boot from your Mac OS X DVD). Press F8 and enter -s. Enter:

fdisk -e /dev/rdisk0
flag 2 <--note that flag 2 is my Mac partition number two
quit
y
reboot
  • If are still unsure whether it is working correctly, use the Super Grub Disk CD and make grub active.

Installing Ubuntu after Mac OS X

  • If you get an error message during boot such as HFS+error in the bootloader, you can also use the Super Grub Disk for recovering Linux GRUB and the Windows MBR (Master Boot Record).
  • Once you have installed Ubuntu, edit the Grub start-up list:
sudo nano /boot/grub/menu.lst
and add the following lines:
title Mac OS X
root (hd0,0)
makeactive
chainloader +1
If you have issues with Mac OSX or Windows in GRUB, try changing the Mac OS X Grub entry
change root (hd0,0) to root (hd0,1)

This means you will boot into partition number 1. You can try any partition number until you get it right.

Upgrading Jaunty or Karmic to Lucid

There are several methods for upgrades from the command-line interface (Terminal) (which can be used for both the desktop and server editions of Ubuntu/Kubuntu).

  • This is the preferred method:
sudo apt-get install update-manager-core
sudo do-release-upgrade
  • You can also use the update-manager (all editions):
sudo apt-get install update-manager
sudo update-manager -d
  • You can also use:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
(Note: the first two lines simply make sure your current distribution is current before upgrading the entire distribution, and are optional.

Reinstalling applications after a fresh install

If you upgrade your Ubuntu system with a fresh install, it is possible to mark the packages and services installed on your old system (prior to the upgrade) and save the settings ("markings") into a file. Then install the new version of Ubuntu and allow the system to reinstall packages and services using the settings saved in the "markings" file. For instructions, see this Ubuntu forum thread. In brief:

  • On the old system: Synaptic Package Manager -> File -> Save Markings
  • Save the markings file to an external medium, such as USB drive.
  • Complete the backup of your system's other important files (e.g. the /home directory) before the fresh install of the new system.
  • In the freshly installed new system, again open Synaptic Package Manager -> File -> Read markings and load the file on your USB drive (or other external storage) previously saved.

Note: Many packages, dependencies, and compatibilities change between version of Ubuntu, so this method does not always work. Automated updates remains the recommended method.