个人工具

UbuntuHelp:Installation/FromLinux

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月13日 (日) 10:57的版本 (New page: {{From|https://help.ubuntu.com/community/Installation/FromLinux}} {{Languages|php5}} If you already have a working linux system, installing without external media is easy. You need to crea...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

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. 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
 mount ubuntu-7.04-desktop-i386.iso -o loop /tmp/install_cd
 mkdir /mnt/installer
 mount /dev/sda1 /mnt/installer
 cp -r /tmp/install_cd/* /mnt/installer
 umount /tmp/install_cd
</code>
Replace the name of the iso to whatever you downloaded and <code>/dev/sda1</code> with whatever your new partition is.

'''Step 3.''' Edit your grub configuration file (typically <code>/etc/grub.conf</code> or <code>/boot/grub/menu.lst</code>) to boot from the new partition by adding the lines
<pre>
title installer
        root (hd0,0)
        kernel /casper/vmlinuz boot=casper root=/dev/ram ramdisk_size=1048576 rw
        initrd /casper/initrd.gz
</code>
The first line after the title tells grub which partition contains the installer. <code>hd0</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>/dev/sda1</code>. <code>sdaN</code> becomes <code>(hd0, N-1)</code>, <code>sdbN</code> becomes <code>(hd1,N-1)</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.

[[category:UbuntuHelp]]