Hri*_*gar 20 partitioning fstab mount
我在安装过程中没有使用交换分区,所以现在我的 ubuntu 已安装,我使用 GParted 分区编辑器创建一个未分配的分区,我将其格式化为 linux-swap。它没有自动挂载,所以我右键单击它并选择了 swapon。现在,每当我启动笔记本电脑时,分区都不会自动安装。Swapon 仍然有效,但如果分区没有在启动时挂载,它就无用了。我看到一些答案,其说是编辑名为fstab文件一些文件,但我给予一步一步的指示,因为我是一个我不知道什么样的变化,使...请帮我总小白不知道Ubuntu 的 U,我遇到了很多问题...请帮助我!:'( :( 这是我的 fstab 文件包含的内容-
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=33a0fc77-06b0-406c-95fd-15bf7033b619 / ext4 errors=remount-ro 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
Run Code Online (Sandbox Code Playgroud)
Rap*_*ael 23
这是你以前的/etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=33a0fc77-06b0-406c-95fd-15bf7033b619 / ext4 errors=remount-ro 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
Run Code Online (Sandbox Code Playgroud)
现在,要将交换分区添加到其中,请执行以下操作:
打开 Gparted。
右键单击交换分区,然后单击信息。
记下您的 UUID。
现在,/etc/fstab通过执行以下操作来修改您之前的 :
输入以下命令打开文件:
sudo -H gedit /etc/fstab
Run Code Online (Sandbox Code Playgroud)然后,添加这一行,
UUID=THE UUID YOU OBTAINED FROM ABOVE none swap sw 0 0
Run Code Online (Sandbox Code Playgroud)
线后
# a swapfile is not a swap partition, no line here
Run Code Online (Sandbox Code Playgroud)保存文件并重新启动计算机。现在一切都应该正常了。
| 归档时间: |
|
| 查看次数: |
24679 次 |
| 最近记录: |