个人工具

“UbuntuHelp:Installation/FromLinux”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第2行: 第2行:
 
{{Languages|UbuntuHelp:Installation/FromLinux}}
 
{{Languages|UbuntuHelp:Installation/FromLinux}}
 
== Live CD ==
 
== Live CD ==
The Live CD is also known as the "Desktop Installer".  It is the default Ubuntu installation CD.  The ISO you downloaded has the name "desktop" in its name, these are the instructions to use.  If your ISO has "alternate" in its name, you are using an alternate installation CD and should see the next section.  
+
The Live CD is also known as the "Desktop Installer".  It is the default Ubuntu installation CD.  The ISO you downloaded has the name "desktop" in its name, these are the instructions to use.  If your ISO has "alternate" in its name, you are using an alternate installation CD and should see the next section.
UNetbootin is an installer that can do the following automatically. It is available for download at http://lubi.sourceforge.net/unetbootin.html.
+
[[http://unetbootin.sourceforge.net/|UNetbootin]] is a utility that can do much of the following automatically.
 
If you already have a working linux system, installing without external media is easy. You need to create a new partition, copy the CD contents over to it, boot from the new partition, and proceed as if you were installing from a CD. Note that you can't use what will be the root partition for the CD contents, as the installer is stubborn on formatting it (it will fail).
 
If you already have a working linux system, installing without external media is easy. You need to create a new partition, copy the CD contents over to it, boot from the new partition, and proceed as if you were installing from a CD. Note that you can't use what will be the root partition for the CD contents, as the installer is stubborn on formatting it (it will fail).
 
The benefits of installing without external media are that it can save you time if you are already familiar with the process, and you get a very usable system upon booting into the installer because it is running from a hard drive rather than a CD.
 
The benefits of installing without external media are that it can save you time if you are already familiar with the process, and you get a very usable system upon booting into the installer because it is running from a hard drive rather than a CD.
'''Step 1.''' [[Anchor(step1)]] Use gparted to create a new primary partition and format it to <code><nowiki>ext3</nowiki></code>. You need slightly more than 700MB of free space on it. 750MB should be sufficient. Let's say the name of the partition is <code><nowiki>/dev/sda1</nowiki></code>. If your new ubuntu install is going to coexist with your old system, you might find it convenient to create space for your new system as well at this point using gparted.
+
'''Step 1.''' Use gparted to create a new primary partition and format it to <code><nowiki>ext3</nowiki></code>. You need slightly more than 700MB of free space on it. 750MB should be sufficient. Let's say the name of the partition is <code><nowiki>/dev/sda1</nowiki></code>. If your new ubuntu install is going to coexist with your old system, you might find it convenient to create space for your new system as well at this point using gparted.
 
'''Step 2.''' Copy CD contents over to the new partition using the command
 
'''Step 2.''' Copy CD contents over to the new partition using the command
 
<pre><nowiki>
 
<pre><nowiki>
 
  mkdir /tmp/install_cd
 
  mkdir /tmp/install_cd
  mount ubuntu-7.04-desktop-i386.iso -o loop /tmp/install_cd
+
  sudo mount disk-image.iso -o loop /tmp/install_cd
  mkdir /mnt/installer
+
  sudo mkdir /mnt/installer
  mount /dev/sda1 /mnt/installer
+
  sudo mount /dev/sda1 /mnt/installer
  cp -r /tmp/install_cd/* /mnt/installer
+
  sudo cp -r /tmp/install_cd/* /mnt/installer
  cp -r /tmp/install_cd/.disk /mnt/installer
+
  sudo cp -r /tmp/install_cd/.disk /mnt/installer
  umount /tmp/install_cd
+
  sudo umount /tmp/install_cd
 
</nowiki></pre>
 
</nowiki></pre>
 
Replace the name of the iso to whatever you downloaded and <code><nowiki>/dev/sda1</nowiki></code> with whatever your new partition is.
 
Replace the name of the iso to whatever you downloaded and <code><nowiki>/dev/sda1</nowiki></code> with whatever your new partition is.
第24行: 第24行:
 
kernel          /casper/vmlinuz boot=casper root=/dev/ram ramdisk_size=1048576 rw
 
kernel          /casper/vmlinuz boot=casper root=/dev/ram ramdisk_size=1048576 rw
 
initrd          /casper/initrd.gz
 
initrd          /casper/initrd.gz
 +
 
</nowiki></pre>
 
</nowiki></pre>
 
The first line after the title tells grub which partition contains the installer. <code><nowiki>hd0</nowiki></code> stands for "first hard disk," and the 0 following it standards for first partition. You will need to change this if your installer partition is different from <code><nowiki>/dev/sda1</nowiki></code>. <code><nowiki>sdaN</nowiki></code> becomes <code><nowiki>(hd0, N-1)</nowiki></code>, <code><nowiki>sdbN</nowiki></code> becomes <code><nowiki>(hd1,N-1)</nowiki></code> and so on. As you can see, grub starts counting from 0, which can be confusing.
 
The first line after the title tells grub which partition contains the installer. <code><nowiki>hd0</nowiki></code> stands for "first hard disk," and the 0 following it standards for first partition. You will need to change this if your installer partition is different from <code><nowiki>/dev/sda1</nowiki></code>. <code><nowiki>sdaN</nowiki></code> becomes <code><nowiki>(hd0, N-1)</nowiki></code>, <code><nowiki>sdbN</nowiki></code> becomes <code><nowiki>(hd1,N-1)</nowiki></code> and so on. As you can see, grub starts counting from 0, which can be confusing.
 
'''Step 4.''' Reboot, and choose "installer" from the grub boot menu, and continue as if you were installing from CD.
 
'''Step 4.''' Reboot, and choose "installer" from the grub boot menu, and continue as if you were installing from CD.
 
== Alternate CD ==
 
== Alternate CD ==
As of December 29th 2007, the instructions above do not apply to the alternate CD provided for Ubuntu 7.10 (Gutsy Gibbon). Significant changes are required.  Procedure 1 below has been used successfully with Gutsy (Ubuntu 7.10) and Procedure 2 with Hardy (Ubuntu 8.04). I ([[UbuntuWiki:LouisDominiqueDubeau|LouisDominiqueDubeau]]) tried to use the procedure above and  boot using the vmlinuz and initrd.gz files provided on the alternate ISO but that would result in the installer always asking for a CD.  Perhaps if the machine has no CD drive the installer does not ask for the CD but if the machine has a CD drive which for whatever reason is not usable for installing Ubuntu, then the installer keeps asking for the CD.  On the internet there are places where people suggest using the INSTALL_MEDIA_DEV boot parameter but that did not help. 
+
As of December 29th 2007, the instructions above do not apply to the alternate CD provided for Ubuntu 7.10 (Gutsy Gibbon). Significant changes are required.  Procedure 1 below has been used successfully with Gutsy (Ubuntu 7.10) and Procedure 2 with Hardy (Ubuntu 8.04).
 
Before going any further please note that the alternate CD contains documentation which can help with fixing problems or adapting solutions to your own situation.  The documentation is located in <code><nowiki>doc/install/manual/</nowiki></code> on the alternate CD.  Please refer to that documentation as needed.
 
Before going any further please note that the alternate CD contains documentation which can help with fixing problems or adapting solutions to your own situation.  The documentation is located in <code><nowiki>doc/install/manual/</nowiki></code> on the alternate CD.  Please refer to that documentation as needed.
 
Note that Procedure 2 is potentially less disruptive because it does not call for a new partition.
 
Note that Procedure 2 is potentially less disruptive because it does not call for a new partition.
 +
For a simpler installation method which generally does not require repartitioning, and downloads the packages at install time rather than requiring an ISO, see [[Installation/NetbootInstallFromInternet]].
 
=== Procedure 1 ===
 
=== Procedure 1 ===
 
I used the following procedure for Gutsy.  It can also be used for Hardy.
 
I used the following procedure for Gutsy.  It can also be used for Hardy.
'''Step 1.''' See [[step1 step 1]] above.
+
'''Step 1.''' Use gparted to create a new primary partition and format it to <code><nowiki>ext3</nowiki></code>. You need slightly more than 700MB of free space on it. 750MB should be sufficient. Let's say the name of the partition is <code><nowiki>/dev/sda1</nowiki></code>. If your new ubuntu install is going to coexist with your old system, you might find it convenient to create space for your new system as well at this point using gparted.
 
'''Step 2.''' Copy your alternate ISO to the root of the partition you created in step 1.  You need to copy '''the ISO''' itself rather than the contents of the ISO.
 
'''Step 2.''' Copy your alternate ISO to the root of the partition you created in step 1.  You need to copy '''the ISO''' itself rather than the contents of the ISO.
 
'''Step 3.'''  Grab the initrd.gz and vmlinuz files found in the following subdirectory of a Ubuntu mirror:
 
'''Step 3.'''  Grab the initrd.gz and vmlinuz files found in the following subdirectory of a Ubuntu mirror:
第44行: 第46行:
 
'''Step 4.''' Edit your grub configuration file (typically <code><nowiki>/etc/grub.conf</nowiki></code> or <code><nowiki>/boot/grub/menu.lst</nowiki></code>) to boot from the new partition by adding the lines:
 
'''Step 4.''' Edit your grub configuration file (typically <code><nowiki>/etc/grub.conf</nowiki></code> or <code><nowiki>/boot/grub/menu.lst</nowiki></code>) to boot from the new partition by adding the lines:
 
<pre><nowiki>
 
<pre><nowiki>
title installer
+
title           installer
root (hd0,0)
+
root           (hd0,0)
 
kernel          /install/vmlinuz root=/dev/ram ramdisk_size=1048576 rw
 
kernel          /install/vmlinuz root=/dev/ram ramdisk_size=1048576 rw
 
initrd          /install/initrd.gz
 
initrd          /install/initrd.gz
 
</nowiki></pre>
 
</nowiki></pre>
[[Anchor(altproc1step4)]]If you use LILO, see the official documentation on the alternate CD for how to configure LILO.  Or you can adapt the lines above for LILO if you know Grub and LILO well.
+
<<Anchor(altproc1step4)>>If you use LILO, see the official documentation on the alternate CD for how to configure LILO.  Or you can adapt the lines above for LILO if you know Grub and LILO well.
 
The first line after the title tells grub which partition contains the installer. <code><nowiki>hd0</nowiki></code> stands for "first hard disk," and the 0 following it standards for first partition. You will need to change this if your installer partition is different from <code><nowiki>/dev/sda1</nowiki></code>. <code><nowiki>sdaN</nowiki></code> becomes <code><nowiki>(hd0, N-1)</nowiki></code>, <code><nowiki>sdbN</nowiki></code> becomes <code><nowiki>(hd1,N-1)</nowiki></code> and so on. As you can see, grub starts counting from 0, which can be confusing.  The paths for the kernel and the initrd were set to start with <code><nowiki>/install/</nowiki></code> in my setup but you could put those files in the root of the install partition and have them be <code><nowiki>/vmlinuz</nowiki></code> and <code><nowiki>/initrd.gz</nowiki></code> if you so wish.
 
The first line after the title tells grub which partition contains the installer. <code><nowiki>hd0</nowiki></code> stands for "first hard disk," and the 0 following it standards for first partition. You will need to change this if your installer partition is different from <code><nowiki>/dev/sda1</nowiki></code>. <code><nowiki>sdaN</nowiki></code> becomes <code><nowiki>(hd0, N-1)</nowiki></code>, <code><nowiki>sdbN</nowiki></code> becomes <code><nowiki>(hd1,N-1)</nowiki></code> and so on. As you can see, grub starts counting from 0, which can be confusing.  The paths for the kernel and the initrd were set to start with <code><nowiki>/install/</nowiki></code> in my setup but you could put those files in the root of the install partition and have them be <code><nowiki>/vmlinuz</nowiki></code> and <code><nowiki>/initrd.gz</nowiki></code> if you so wish.
 
As specified in the above, the installer will run without a preseed file.  The preseed tells the installer what kind of system you are trying to install and it automatically selects some options for you during installation.  For instance, using the <code><nowiki>ubuntu.seed</nowiki></code> file tells the installer that you want to install a full "desktop" system, with Gnome and everything.  If you do not select a preseed file, it is unclear what the installer thinks.  In my ([[UbuntuWiki:LouisDominiqueDubeau|LouisDominiqueDubeau]]) experience, it installs some sort of cli or server form of Ubuntu.  This is not disastrous but it may not be what you want.  In Hardy in particular, running the installer without a seed results in LILO installed as the boot loader rather than Grub.  Ugly...  So it is better to select a seed.  Adding the parameter <code><nowiki>file=/cdrom/preseed/ubuntu.seed</nowiki></code> to the <code><nowiki>kernel</nowiki></code> line above should take care of the problem.  If installing Kubuntu, select <code><nowiki>kubuntu.seed</nowiki></code> instead.  Adapt to other situations as needed.
 
As specified in the above, the installer will run without a preseed file.  The preseed tells the installer what kind of system you are trying to install and it automatically selects some options for you during installation.  For instance, using the <code><nowiki>ubuntu.seed</nowiki></code> file tells the installer that you want to install a full "desktop" system, with Gnome and everything.  If you do not select a preseed file, it is unclear what the installer thinks.  In my ([[UbuntuWiki:LouisDominiqueDubeau|LouisDominiqueDubeau]]) experience, it installs some sort of cli or server form of Ubuntu.  This is not disastrous but it may not be what you want.  In Hardy in particular, running the installer without a seed results in LILO installed as the boot loader rather than Grub.  Ugly...  So it is better to select a seed.  Adding the parameter <code><nowiki>file=/cdrom/preseed/ubuntu.seed</nowiki></code> to the <code><nowiki>kernel</nowiki></code> line above should take care of the problem.  If installing Kubuntu, select <code><nowiki>kubuntu.seed</nowiki></code> instead.  Adapt to other situations as needed.
第55行: 第57行:
 
=== Procedure 2 ===
 
=== Procedure 2 ===
 
In this procedure you do not create a new partition to hold the installer.  This procedure was used for Hardy.  It may be adaptable for Gutsy.
 
In this procedure you do not create a new partition to hold the installer.  This procedure was used for Hardy.  It may be adaptable for Gutsy.
'''Step 1.''' Copy your alternate ISO to the root '''any partition''' that the installer can mount. You need to copy '''the ISO''' itself rather than the contents of the ISO. The important part here is that you must find a partition that the installer can mount. If you use the traditional partitioning system used by DOS since ages immemorial, then any filesystem supported by Ubuntu should work. In particular ext2/ext3/ntfs/fat/vfat should all works. If you use LVM, things are trickier. As of April 26th 2008, the installer is unable to find an ISO stored on a partition managed in LVM. The installer '''can''' install Ubuntu in an LVM partition but in the stage at which it looks for the ISO it has not yet loaded the LVM modules so it cannot '''find the ISO''' if it is on an LVM parition. An enterprising person should be able to work around that problem but by default the installer won't find the ISO if it is on an LVM partition. If you have Windows installed, then the Windows partition, which normally is not managed by LVM (because I don't think Windows supports LVM), can hold the ISO.
+
'''Step 1.''' Copy your alternate ISO to the root of '''any partition''' that the installer can mount. You need to copy '''the ISO''' itself rather than the contents of the ISO. The important part here is that you must find a partition that the installer can mount, as it will search during the install procedure. If you use the traditional partitioning system used by DOS since ages immemorial, then any filesystem supported by Ubuntu should work. In particular ext2/ext3/ntfs/fat/vfat should all work. If you use LVM, things are trickier. As of April 26th 2008, the installer is unable to find an ISO stored on a partition managed in LVM. The installer '''can''' install Ubuntu in an LVM partition but in the stage at which it looks for the ISO it has not yet loaded the LVM modules so it cannot '''find the ISO''' if it is on an LVM partition. An enterprising person should be able to work around that problem but by default the installer won't find the ISO if it is on an LVM partition. If you have Windows installed, then the Windows partition, which normally is not managed by LVM (because I don't think Windows supports LVM), can hold the ISO.
 
'''Step 2.'''  Grab the initrd.gz and vmlinuz files found in the following subdirectory of a Ubuntu mirror:
 
'''Step 2.'''  Grab the initrd.gz and vmlinuz files found in the following subdirectory of a Ubuntu mirror:
 
<pre><nowiki>
 
<pre><nowiki>
第62行: 第64行:
 
For example in the UK the files may be found at
 
For example in the UK the files may be found at
 
http://gb.archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/hd-media/
 
http://gb.archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/hd-media/
You will want to put these files in your <code><nowiki>/boot/</nowiki></code> directory.  It may be a good idea to create a subdirectory like <code><nowiki>newinstall</nowiki></code>, <code><nowiki>hardy-install</nowiki></code>, or something similar.
+
You will want to put these files in your normal <code><nowiki>/boot/</nowiki></code> directory.  It may be a good idea to create a subdirectory like <code><nowiki>newinstall</nowiki></code>, <code><nowiki>hardy-install</nowiki></code>, or something similar.
'''Step 3.''' Read the information at [[altproc1step4 step 4 of procedure 1]] above and then come back here: the information there will tell you what hd0,0 means and will inform you about seeds, etc.  Edit your grub configuration file (typically <code><nowiki>/etc/grub.conf</nowiki></code> or <code><nowiki>/boot/grub/menu.lst</nowiki></code>) to boot from the new partition by adding the lines:
+
'''Step 3.''' Read the information at [[[altproc1step4|step 4 of procedure 1]]] above and then come back here: the information there will tell you what hd0,0 means and will inform you about seeds, etc.  Edit your grub configuration file (typically <code><nowiki>/etc/grub.conf</nowiki></code> or <code><nowiki>/boot/grub/menu.lst</nowiki></code>) to boot from the new partition by adding the lines:
 
<pre><nowiki>
 
<pre><nowiki>
title New Install
+
title installer
kernel (hd0,0)/boot/newinstall/vmlinuz
+
root (hd0,0)
initrd (hd0,0)/boot/newinstall/initrd.gz
+
kernel /boot/newinstall/vmlinuz
 +
initrd /boot/newinstall/initrd.gz
 
</nowiki></pre>
 
</nowiki></pre>
 
If you want a preseed file, change the kernel line to:
 
If you want a preseed file, change the kernel line to:
 
<pre><nowiki>
 
<pre><nowiki>
kernel (hd0,0)/boot/newinstall/vmlinuz file=/cdrom/preseed/ubuntu.seed
+
kernel (hd0,0)/newinstall/vmlinuz file=/cdrom/preseed/ubuntu.seed
 
</nowiki></pre>
 
</nowiki></pre>
Adapt as needed to your situation.
+
Note that some users report working installs with grub without seeds and/or seeds not working with this method. Adapt as needed to your situation.
'''Step 4.''' Reboot, and choose "installer" from the grub boot menu, and continue as normal.
+
'''Step 4.''' Reboot, and choose "installer" from the grub boot menu, and continue the installation as normal.
 
== Alternate CD Alternate Method ==
 
== Alternate CD Alternate Method ==
I have a CD-ROM less machine with a network connection, and I struggled with these instructions for many days. Finally, I stumbled upon a straightforward solutions which appears to be working for me.
+
I have a machine without a CD-ROM drive but with a network connection, and I struggled with these instructions for many days. Finally, I stumbled upon some straightforward solutions which appear to work for me.
 
1. Obtain Alternate CD. (This method may work for other CDs, I have not tried)
 
1. Obtain Alternate CD. (This method may work for other CDs, I have not tried)
 
2. Mount at a temporary location, as described previously.
 
2. Mount at a temporary location, as described previously.
第88行: 第91行:
  
 
So far so good! I'll let you know if it breaks later :P
 
So far so good! I'll let you know if it breaks later :P
 +
== Without CD ==
 +
You can install Ubuntu directly from Ubuntu using debootstrap. Debootstrap installs some essential packages in a directory for use with chroot. Note that the essential packages does not in itself make the system bootable. It just installs what you need to chroot to that directory and use apt-get to install other packages witch makes ubuntu usable.
 +
First check that you have debootstrap installed:
 +
<pre><nowiki>{
 +
sudo apt-get install debootstrap
 +
</nowiki></pre>}
 +
1. Partition your filesystem (as explaned above)
 +
2. Mount that new partition
 +
 +
<pre><nowiki>{
 +
sudo mkdir /mnt/installer
 +
sudo mount /dev/sda1 /mnt/installer
 +
</nowiki></pre>}
 +
3. Create the new install
 +
 +
<pre><nowiki>{
 +
sudo debootstrap hardy /mnt/installer
 +
</nowiki></pre>}
 +
4. Copy files to the new install
 +
 +
<pre><nowiki>{
 +
sudo cp /etc/resolv.conf /mnt/installer/etc/resolv.conf
 +
sudo cp /etc/apt/sources.list /mnt/installer/chroot/etc/apt/ # If you want to keep your repositories
 +
</nowiki></pre>}
 +
5. Chroot to your new install
 +
 +
<pre><nowiki>{
 +
sudo mount --bind /dev mingw/dev
 +
sudo chroot /mnt/installer
 +
</nowiki></pre>}
 +
6. Upgrade the new install
 +
 +
<pre><nowiki>{
 +
apt-get update
 +
apt-get upgrade
 +
</nowiki></pre>}
 +
7. Install Grub and Linux
 +
 +
<pre><nowiki>{
 +
apt-get install grub linux-image
 +
grub-install /dev/sda
 +
</nowiki></pre>}
 +
It is now safe to reboot
 +
8. Install ubuntu-desktop
 +
 +
<pre><nowiki>{
 +
apt-get install ubuntu-desktop
 +
</nowiki></pre>}
 +
9. Reboot and keep those fingers crossed.
 +
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年10月19日 (日) 12:22的版本

Live CD

The Live CD is also known as the "Desktop Installer". It is the default Ubuntu installation CD. The ISO you downloaded has the name "desktop" in its name, these are the instructions to use. If your ISO has "alternate" in its name, you are using an alternate installation CD and should see the next section. [[1]] is a utility that can do much of the following automatically. If you already have a working linux system, installing without external media is easy. You need to create a new partition, copy the CD contents over to it, boot from the new partition, and proceed as if you were installing from a CD. Note that you can't use what will be the root partition for the CD contents, as the installer is stubborn on formatting it (it will fail). The benefits of installing without external media are that it can save you time if you are already familiar with the process, and you get a very usable system upon booting into the installer because it is running from a hard drive rather than a CD. Step 1. Use gparted to create a new primary partition and format it to ext3. You need slightly more than 700MB of free space on it. 750MB should be sufficient. Let's say the name of the partition is /dev/sda1. If your new ubuntu install is going to coexist with your old system, you might find it convenient to create space for your new system as well at this point using gparted. Step 2. Copy CD contents over to the new partition using the command

 mkdir /tmp/install_cd
 sudo mount disk-image.iso -o loop /tmp/install_cd
 sudo mkdir /mnt/installer
 sudo mount /dev/sda1 /mnt/installer
 sudo cp -r /tmp/install_cd/* /mnt/installer
 sudo cp -r /tmp/install_cd/.disk /mnt/installer
 sudo umount /tmp/install_cd

Replace the name of the iso to whatever you downloaded and /dev/sda1 with whatever your new partition is. Step 3. Edit your grub configuration file (typically /etc/grub.conf or /boot/grub/menu.lst) to boot from the new partition by adding the lines

title           installer
root            (hd0,0)
kernel          /casper/vmlinuz boot=casper root=/dev/ram ramdisk_size=1048576 rw
initrd          /casper/initrd.gz

The first line after the title tells grub which partition contains the installer. hd0 stands for "first hard disk," and the 0 following it standards for first partition. You will need to change this if your installer partition is different from /dev/sda1. sdaN becomes (hd0, N-1), sdbN becomes (hd1,N-1) and so on. As you can see, grub starts counting from 0, which can be confusing. Step 4. Reboot, and choose "installer" from the grub boot menu, and continue as if you were installing from CD.

Alternate CD

As of December 29th 2007, the instructions above do not apply to the alternate CD provided for Ubuntu 7.10 (Gutsy Gibbon). Significant changes are required. Procedure 1 below has been used successfully with Gutsy (Ubuntu 7.10) and Procedure 2 with Hardy (Ubuntu 8.04). Before going any further please note that the alternate CD contains documentation which can help with fixing problems or adapting solutions to your own situation. The documentation is located in doc/install/manual/ on the alternate CD. Please refer to that documentation as needed. Note that Procedure 2 is potentially less disruptive because it does not call for a new partition. For a simpler installation method which generally does not require repartitioning, and downloads the packages at install time rather than requiring an ISO, see Installation/NetbootInstallFromInternet.

Procedure 1

I used the following procedure for Gutsy. It can also be used for Hardy. Step 1. Use gparted to create a new primary partition and format it to ext3. You need slightly more than 700MB of free space on it. 750MB should be sufficient. Let's say the name of the partition is /dev/sda1. If your new ubuntu install is going to coexist with your old system, you might find it convenient to create space for your new system as well at this point using gparted. Step 2. Copy your alternate ISO to the root of the partition you created in step 1. You need to copy the ISO itself rather than the contents of the ISO. Step 3. Grab the initrd.gz and vmlinuz files found in the following subdirectory of a Ubuntu mirror:

dists/gutsy/main/installer-i386/current/images/hd-media/

For example in the UK the files may be found at http://gb.archive.ubuntu.com/ubuntu/dists/gutsy/main/installer-i386/current/images/hd-media/ Put these files in your newly created partition. They can be in the root of the partition or in a subdirectory. Step 4. Edit your grub configuration file (typically /etc/grub.conf or /boot/grub/menu.lst) to boot from the new partition by adding the lines:

title           installer
root            (hd0,0)
kernel          /install/vmlinuz root=/dev/ram ramdisk_size=1048576 rw
initrd          /install/initrd.gz

<<Anchor(altproc1step4)>>If you use LILO, see the official documentation on the alternate CD for how to configure LILO. Or you can adapt the lines above for LILO if you know Grub and LILO well. The first line after the title tells grub which partition contains the installer. hd0 stands for "first hard disk," and the 0 following it standards for first partition. You will need to change this if your installer partition is different from /dev/sda1. sdaN becomes (hd0, N-1), sdbN becomes (hd1,N-1) and so on. As you can see, grub starts counting from 0, which can be confusing. The paths for the kernel and the initrd were set to start with /install/ in my setup but you could put those files in the root of the install partition and have them be /vmlinuz and /initrd.gz if you so wish. As specified in the above, the installer will run without a preseed file. The preseed tells the installer what kind of system you are trying to install and it automatically selects some options for you during installation. For instance, using the ubuntu.seed file tells the installer that you want to install a full "desktop" system, with Gnome and everything. If you do not select a preseed file, it is unclear what the installer thinks. In my (LouisDominiqueDubeau) experience, it installs some sort of cli or server form of Ubuntu. This is not disastrous but it may not be what you want. In Hardy in particular, running the installer without a seed results in LILO installed as the boot loader rather than Grub. Ugly... So it is better to select a seed. Adding the parameter file=/cdrom/preseed/ubuntu.seed to the kernel line above should take care of the problem. If installing Kubuntu, select kubuntu.seed instead. Adapt to other situations as needed. Step 5. Reboot, and choose "installer" from the grub boot menu, and continue as normal.

Procedure 2

In this procedure you do not create a new partition to hold the installer. This procedure was used for Hardy. It may be adaptable for Gutsy. Step 1. Copy your alternate ISO to the root of any partition that the installer can mount. You need to copy the ISO itself rather than the contents of the ISO. The important part here is that you must find a partition that the installer can mount, as it will search during the install procedure. If you use the traditional partitioning system used by DOS since ages immemorial, then any filesystem supported by Ubuntu should work. In particular ext2/ext3/ntfs/fat/vfat should all work. If you use LVM, things are trickier. As of April 26th 2008, the installer is unable to find an ISO stored on a partition managed in LVM. The installer can install Ubuntu in an LVM partition but in the stage at which it looks for the ISO it has not yet loaded the LVM modules so it cannot find the ISO if it is on an LVM partition. An enterprising person should be able to work around that problem but by default the installer won't find the ISO if it is on an LVM partition. If you have Windows installed, then the Windows partition, which normally is not managed by LVM (because I don't think Windows supports LVM), can hold the ISO. Step 2. Grab the initrd.gz and vmlinuz files found in the following subdirectory of a Ubuntu mirror:

dists/hardy/main/installer-i386/current/images/hd-media/

For example in the UK the files may be found at http://gb.archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/hd-media/ You will want to put these files in your normal /boot/ directory. It may be a good idea to create a subdirectory like newinstall, hardy-install, or something similar. Step 3. Read the information at [[[altproc1step4|step 4 of procedure 1]]] above and then come back here: the information there will tell you what hd0,0 means and will inform you about seeds, etc. Edit your grub configuration file (typically /etc/grub.conf or /boot/grub/menu.lst) to boot from the new partition by adding the lines:

title installer
root (hd0,0)
kernel /boot/newinstall/vmlinuz
initrd /boot/newinstall/initrd.gz

If you want a preseed file, change the kernel line to:

kernel (hd0,0)/newinstall/vmlinuz file=/cdrom/preseed/ubuntu.seed

Note that some users report working installs with grub without seeds and/or seeds not working with this method. Adapt as needed to your situation. Step 4. Reboot, and choose "installer" from the grub boot menu, and continue the installation as normal.

Alternate CD Alternate Method

I have a machine without a CD-ROM drive but with a network connection, and I struggled with these instructions for many days. Finally, I stumbled upon some straightforward solutions which appear to work for me. 1. Obtain Alternate CD. (This method may work for other CDs, I have not tried) 2. Mount at a temporary location, as described previously. 3. Copy vmlinuz and initrd.gz from mounted installation media to normal location on current linux root (the one to be replaced) 4. Unmount CDROM image. 5. Copy image as is to selected partition (i.e. cat "image" > /dev/hdXX 6. Configure grub or LILO as above 7. Reboot. 8. When choosing CDROM drive, choose manually, do not install a driver, for the device enter the partition to which you copied the image. 9. Continue installation as normal.

So far so good! I'll let you know if it breaks later :P

Without CD

You can install Ubuntu directly from Ubuntu using debootstrap. Debootstrap installs some essential packages in a directory for use with chroot. Note that the essential packages does not in itself make the system bootable. It just installs what you need to chroot to that directory and use apt-get to install other packages witch makes ubuntu usable. First check that you have debootstrap installed:

{
sudo apt-get install debootstrap
}

1. Partition your filesystem (as explaned above) 2. Mount that new partition

{
sudo mkdir /mnt/installer
sudo mount /dev/sda1 /mnt/installer
}

3. Create the new install

{
sudo debootstrap hardy /mnt/installer
}

4. Copy files to the new install

{
sudo cp /etc/resolv.conf /mnt/installer/etc/resolv.conf
sudo cp /etc/apt/sources.list /mnt/installer/chroot/etc/apt/ # If you want to keep your repositories
}

5. Chroot to your new install

{
sudo mount --bind /dev mingw/dev
sudo chroot /mnt/installer
}

6. Upgrade the new install

{
apt-get update
apt-get upgrade
}

7. Install Grub and Linux

{
apt-get install grub linux-image
grub-install /dev/sda
}

It is now safe to reboot 8. Install ubuntu-desktop

{
apt-get install ubuntu-desktop
}

9. Reboot and keep those fingers crossed.