在独立的 Root 和 Home 硬盘驱动器上安装 Ubuntu
Ubuntu 安装
![](/data/attachment/album/201703/24/092730ntvuegdez34nkw0e.jpg)


安装 Linux 系统时，可以有两种不同的方式。第一种方式是在一个超快的固态硬盘上进行安装，这样可以保证迅速开机和高速访问数据。第二种方式是在一个较慢但很强大的普通硬盘驱动器上安装，这样的硬盘转速快并且存储容量大，从而可以存储大量的应用程序和数据。


然而，一些 Linux 用户都知道，固态硬盘很棒，但是又很贵，而普通硬盘容量很大但速度较慢。如果我告诉你，可以同时利用两种硬盘来安装 Linux 系统，会怎么样？一个超快、现代化的固态硬盘驱动 Linux 内核，一个容量很大的普通硬盘来存储其他数据。


在这篇文章中，我将阐述如何通过分离 Root 目录和 Home 目录安装 Ubuntu 系统 — Root 目录存于 SSD（固态硬盘）中，Home 目录存于普通硬盘中。


### 没有多余的硬盘驱动器？尝试一下 SD 卡（内存卡）！


![](/data/attachment/album/201703/24/092814f3e62sesku6gbo6b.jpg)


在多个驱动器上安装 Linux 系统是很不错的，并且每一个高级用户都应该学会这样做。然而，还有一种情况使得用户应该这样安装 Linux 系统 － 在低存储容量的笔记本电脑上安装系统。可能你有一台很便宜、没有花费太多的笔记本电脑，上面安装了 Linux 系统，电脑上没有多余的硬盘驱动，但有一个 SD 卡插槽。


这篇教程也是针对这种类型的电脑的。跟随这篇教程，可以为笔记本电脑买一个高速的 SD 卡来存储 Home 目录，而不是使用另一个硬盘驱动。本教程也适用于这种使用情况。


### 制作 USB 启动盘


首先去[这个网站](http://ubuntu.com/download)下载最新的 Ubuntu Linux 版本。然后下载 [Etcher](https://etcher.io/)- USB 镜像制作工具。这是一个使用起来很简单的工具，并且支持所有主流的操作系统。你还需要一个至少有 2GB 大小的 USB 驱动器。


![](/data/attachment/album/201703/24/092837di584422r9sorsvv.jpg)


安装好 Etcher 以后，直接打开。点击 <ruby> 选择镜像 <rt>  Select Image </rt></ruby> 按钮来制作镜像。这将提示用户浏览、寻找 ISO 镜像，找到前面下载的 Ubuntu ISO 文件并选择。然后，插入 USB 驱动器，Etcher 应该会自动选择它。之后，点击 “Flash!” 按钮，Ubuntu 启动盘的制作过程就开始了。


为了能够启动 Ubuntu 系统，需要配置 BIOS。这是必需的，这样计算机才能启动新创建的 Ubuntu 启动盘。为了进入 BIOS，在插入 USB 的情况下重启电脑，然后按正确的键（Del、F2 或者任何和你的电脑相应的键）。找到从 USB 启动的选项，然后启用这个选项。


如果你的个人电脑不支持 USB 启动，那么把 Ubuntu 镜像刻入 DVD 中。


### 安装


当用启动盘第一次加载 Ubuntu 时，欢迎界面会出现两个选项。请选择 “安装 Ubuntu” 选项。在下一页中，Ubiquity 安装工具会请求用户选择一些选项。这些选项不是强制性的，可以忽略。然而，建议两个选项都勾选，因为这样可以节省安装系统以后的时间，特别是安装 MP3 解码器和更新系统。（LCTT 译注：当然如果你的网速不够快，还是不要勾选的好。）


![](/data/attachment/album/201703/24/092908wsh8sa8ztjdhwrbn.jpg)


勾选了<ruby> “准备安装 Ubuntu” <rt>  Preparing to install Ubuntu </rt></ruby>页面中的两个选项以后，需要选择安装类型了。有许多种安装类型。然而，这个教程需要选择自定义安装类型。为了进入自定义安装页面，勾选<ruby> “其他” <rt>  something else </rt></ruby>选项，然后点击“继续”。


现在将显示 Ubuntu 自定义安装分区工具。它将显示任何/所有能够安装 Ubuntu 系统的磁盘。如果两个硬盘均可用，那么它们都会显示。如果插有 SD 卡，那么它也会显示。


选择用于 Root 文件系统的硬盘驱动器。如果上面已经有分区表，编辑器会显示出来，请使用分区工具把它们全部删除。如果驱动没有格式化也没有分区，那么使用鼠标选择驱动器，然后点击<ruby> “新建分区表” <rt>  new partition table </rt></ruby>。对所有驱动器执行这个操作，从而使它们都有分区表。（LCTT 译注：警告，如果驱动器上有你需要的数据，请先备份，否则重新分区后将永远丢失。）


![](/data/attachment/album/201703/24/093031yxypxzj6xc0m5x9c.jpg)


现在所有分区都有了分区表（并已删除分区），可以开始进行配置了。在第一个驱动器下选择空闲空间，然后点击加号按钮来创建新分区。然后将会出现一个“创建分区窗口”。允许工具使用整个硬盘。然后转到<ruby> “挂载点” <rt>  Mount Point </rt></ruby>下拉菜单。选择 `/` （Root）作为挂载点，之后点击 OK 按钮确认设置。


对第二个驱动器做相同的事，这次选择 `/home` 作为挂载点。两个驱动都设置好以后，选择要放入引导装载器的驱动器，然后点击 <ruby> “现在安装” <rt>  install now </rt></ruby>，安装进程就开始了。


![](/data/attachment/album/201703/24/093058e4m49vm4m4qdtq42.jpg)


从这以后的安装进程是标准安装。创建用户名、选择时区等。


**注：** 你是以 UEFI 模式进行安装吗？如果是，那么需要给 boot 创建一个 512 MB 大小的 FAT32 分区。在创建其他任何分区前做这件事。确保选择 “/boot” 作为这个分区的挂载点。（有的发行版不允许使用 FAT32 的分区作为 /boot ，而是将 UEFI 分区放到 /boot/efi 下，因此将 /boot 单独放一个分区或置入 / 分区下比较稳妥。）


如果你需要一个交换分区，那么，在创建用于 `/` 的分区前，在第一个驱动器上进行创建。可以通过点击 ‘+’ 按钮，然后输入所需大小，选择下拉菜单中的<ruby> “交换区域” <rt>  swap area </rt></ruby>来创建交换分区。


### 结论


Linux 最好的地方就是可以自己按需配置。有多少其他操作系统可以让你把文件系统分割在不同的硬盘驱动上？并不多，这是肯定的。我希望有了这个指南，你将意识到 Ubuntu 能够提供的真正力量。


安装 Ubuntu 系统时你会用多个驱动器吗？请在下面的评论中让我们知道。




---


via: <https://www.maketecheasier.com/install-ubuntu-with-different-root-home-hard-drives/>


作者：[Derrik Diener](https://www.maketecheasier.com/author/derrikdiener/) 译者：[ucasFL](https://github.com/ucasFL) 校对：[jasminepeng](https://github.com/jasminepeng)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![](https://www.maketecheasier.com/assets/uploads/2017/02/ubuntu-feature-image.jpg)

When building a Linux installation, there are two options. The first option is to find a super-fast solid state drive. This will ensure very fast boot times and overall speed when accessing data. The second option is to go for a slower but beefier spinning disk hard drive – one with fast RPMs and a large amount of storage. This ensures a massive amount of storage for applications and data.

However, as some Linux users are aware, solid state drives are nice, but expensive, and spinning disk drives have a lot of storage but tend to be slow. What if I told you that it was possible to have both? A super-fast, modern solid state drive powering the core of your Linux and a large spinning disk drive for all the data.

In this article we’ll go over how to install Ubuntu Linux with separate root and home hard drives – with root folder in the SSD and home folder in the spinning disk hard drive.

## No extra hard drives? Try SD cards!

Setting up a multi-drive Linux installation is great and something advanced users should get behind. However, there is another reason for users to do a setup like this – low-storage-capacity laptops. Maybe you have a cheap laptop that didn’t cost much, and Linux was installed on it. It’s not much, but the laptop has an SD card slot.

This guide is for those types of computers as well. Follow this guide, and instead of a second hard drive, maybe go out and buy a fast and speedy SD card for the laptop, and use that as a home folder. This tutorial will work for that use case too!

## Making the USB disk

Start out by heading over to [this website](https://ubuntu.com/download) to download the latest version of Ubuntu Linux. Then [download](https://etcher.io/) the Etcher USB imaging tool. This is a very easy-to-use tool and supports all major operating systems. You will also need a USB drive of at least 2 GB in size.

Install Etcher, then launch it. Make an image by clicking the “Select Image” button. This will prompt the user to browse for the ISO image. Find the Ubuntu ISO file downloaded earlier and select it. From here, insert the USB drive. Etcher should automatically select it. Then, click the “Flash!” button. The Ubuntu live disk creation process will begin.

To boot into Ubuntu, configure the BIOS. This is needed so that the computer will boot the newly-created Ubuntu live USB. To get into the BIOS, reboot with the USB in, and press the correct key (Del, F2, or whatever the key is on your particular machine). Find where the option is to enable booting from USB and enable it.

If your PC does not support booting from USB, burn the Ubuntu image to a DVD.

## Installation

When Ubuntu first loads, the welcome screen appears with two options. Select the “Install Ubuntu” button to proceed. On the next page the Ubiquity installation tool asks the user to select some options. These options aren’t mandatory and can be ignored. However, it is recommended that both boxes be checked, as they save time after the installation, specifically with the installation of MP3 codecs and updating the system.

After selecting both boxes in the “Preparing to install Ubuntu” page, it will be time to select the installation type. There are many. However, with this tutorial the option required is the custom one. To get to the custom installation page, select the “something else” box, then click continue.

This reveals Ubuntu’s custom installation partitioning tool. It will show any and all disks that can install Ubuntu. If two hard drives are available, they will appear. If an SD card is plugged in, it will appear.

Select the hard drive that you plan to use for the [root file system](https://www.maketecheasier.com/use-chroot-linux/). If there is already a partition table on it, the editor will show partitions. Delete all of them, using the tool. If the drive isn’t formatted and has no partitions, select the drive with the mouse, then click “new partition table.” Do this for all drives so that they both have partition tables.

Now that both drives have partition tables (and partitions deleted), the configuration can begin. Select the free space under drive one, then click the plus sign button to create a new partition. This will bring up the “Create partition window.” Allow the tool to use the entire hard drive, then go to the “Mount Point” drop-down menu. Select `/`

as the mount point, then the OK button to confirm the settings.

Do the same with the second drive. This time select `/home`

as the mount point. With both drives set up, select the correct drive the boot loader will go to, then click the “install now” button to start the installation process.

The installation process from here is the standard installation. Create a username, select the timezone, etc.

**Notes:** Are you installing in UEFI mode? A 512 MB, FAT32 partition will need to be created for boot. Do this before creating any other partitions. Be sure to select “/boot” as the mount point for this partition as well.

If you require Swap, create a partition on the first drive before making the partition used for `/`

. This can be done by clicking the “+” (plus) button, entering the desired size, and selecting “swap area” in the drop-down.

## Conclusion

The best thing about Linux is how configurable it is. How many other operating systems let you split up the file system onto separate hard drives? Not many, that’s for sure! I hope that with this guide you’ll realize the true power Ubuntu can offer!

Would you use multiple drives in your Ubuntu installation? Let us know below in the comments.

Our latest tutorials delivered straight to your inbox