我最近开始使用 Ubuntu 16.04,并进行了全新安装。每当我重新启动计算机时,/dev/sda 都会被卸载。因此,我无法通过 UI 登录,每次都必须手动安装磁盘并登录
以下是 mount -l 命令的结果
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1956636k,nr_inodes=489159,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=395132k,mode=755)
/dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd,nsroot=/)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids,nsroot=/)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio,nsroot=/)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices,nsroot=/)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory,nsroot=/)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio,nsroot=/)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct,nsroot=/)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb,nsroot=/)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event,nsroot=/)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,nsroot=/)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer,nsroot=/)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=395132k,mode=700,uid=1000,gid=1000)
/dev/sda6 on /home type ext4 (rw,relatime,data=ordered)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
以下是 fdisk -l 的输出:
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8365a1f1
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 80324 80262 39.2M de Dell Utility
/dev/sda2 81920 8081407 7999488 3.8G 82 Linux swap / Solaris
/dev/sda3 8083454 976771071 968687618 461.9G 5 Extended
/dev/sda5 8083456 105738239 97654784 46.6G 83 Linux
/dev/sda6 105740288 976771071 871030784 415.3G 83 Linux
/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/sda5 during installation
UID=5396e03e-8e0a-4845-95da-31290534e988 / ext4 errors=remount-ro 0 1
/home was on /dev/sda6 during installation
swap was on /dev/sda2 during installation
UID=ded1a4ee-5091-46c2-8be8-a537f11a53c3 none swap sw 0 0
提前致谢!
答案1
将您的 /dev/sda6 添加到您的/etc/fstab
,它将在启动时自动安装。
找出分区的 UUID:
sudo blkid /dev/sda6
然后在下方添加此行
#/home was on /dev/sda6 during installation
UID=inserthereUUID /home ext4 defaults 0 0
您可以尝试手动卸载它,然后在终端中输入,
sudo mount -a
如果它已正确安装,它将始终在启动时安装,它是否有效。