在 Ubuntu 18.04 与 Windows 10 双启动时遇到一些困难后,我注意到我的 /home 分区未挂载。我该如何挂载它。我想过使用内置的磁盘程序并更改挂载点,但我不想弄乱我不完全理解的东西。
我的系统安装在 /dev/sda7 上,我的主分区应该是 /dev/sda9
cat -n /etc/fstab 得出:
1 # /etc/fstab: static file system information.
2 #
3 # Use 'blkid' to print the universally unique identifier for a
4 # device; this may be used with UUID= as a more robust way to name devices
5 # that works even if disks are added and removed. See fstab(5).
6 #
7 # <file system> <mount point> <type> <options> <dump> <pass>
8 # / was on /dev/sda7 during installation
9 UUID=332e4fb1-3da1-43cb-b158-0dbdb8887bc7 / ext4 errors=remount-ro 0 1
10 # /boot/efi was on /dev/sda1 during installation
11 UUID=98DD-02CA /boot/efi vfat umask=0077 0 1
12 /swapfile none swap sw 0 0
sudo blkid:
/dev/loop0:TYPE="squashfs" /dev/loop1:TYPE="squashfs" /dev/loop2:TYPE="squashfs" /dev/loop3:TYPE="squashfs" /dev/loop4:TYPE="squashfs" /dev/loop5:TYPE="squashfs" /dev/loop6:TYPE="squashfs" /dev/loop7:TYPE="squashfs" /dev/sda1:LABEL="ESP" UUID="98DD-02CA" TYPE="vfat" PARTLABEL="M-bM-^MM-(M-CM-8" PARTUUID="7e18bfc7-7115-469d-b722-7e80db8155b8" /dev/sda3:UUID="01D3A8477E4D35D0" TYPE="ntfs" PARTUUID="4482f98a-1b98-4fcb-bf67-4f0dc973d1af" /dev/sda4:UUID="9CEE3032EE3006D4" TYPE="ntfs" PARTUUID="9b075908-0490-4e45-bdd8-4e3ecc895b74" /dev/sda5:UUID="96DA05C7DA05A499" TYPE="ntfs" PARTLABEL="\"" PARTUUID="73b356fb-4440-483b-b58c-2ea3ca8cd3db" /dev/sda6:LABEL="WINRETOOLS" UUID="B00827F30827B76E" TYPE="ntfs" PARTLABEL="M-jM-=M-^TM-WM-^IM-hM-)M-^PM-IM--" PARTUUID="a6c7aa22-508b-4a31-8470-873ca170fd18" /dev/sda7: UUID="332e4fb1-3da1-43cb-b158-0dbdb8887bc7" TYPE="ext4" PARTUUID="754ea8a9-ccc1-4d19-95ce-9419cc072051" /dev/sda8: UUID="53f4d8c7-7344-4c7e-b4d9-7f547e5d598d" TYPE="swap" PARTUUID="0dcf2301-0ebc-4f6e-aa8a-9fef96063523" /dev/sda9: UUID="28caf3ca-ee0a-4a5a-b26c-4cc64afd858d" TYPE="ext4" PARTUUID="4d2f23bf-69a1-4bad-8b64-59ba843bdbe0" /dev/loop8: TYPE="squashfs" /dev/loop9: TYPE="squashfs" /dev/loop10: TYPE="squashfs" /dev/loop11: TYPE="squashfs" /dev/loop12: TYPE="squashfs" /dev/loop13: TYPE="squashfs" /dev/loop14: TYPE="squashfs" /dev/loop15: TYPE="squashfs" /dev/loop16: TYPE="squashfs" /dev/loop17: TYPE="squashfs" /dev/loop18: TYPE="squashfs" /dev/loop19: TYPE="squashfs" /dev/loop20: TYPE="squashfs" /dev/loop21: TYPE="squashfs" /dev/loop22: TYPE="squashfs" /dev/loop23: TYPE="squashfs" /dev/loop24: TYPE="squashfs" /dev/sda2: PARTUUID="af660048-4afc-4e30-a581-971e43bd3d7a"
lsblk-f:
名称 FSTYPE 标签 UUID 挂载点 loop0 squashfs /snap/canonical-livepatch/50 loop1 squashfs /snap/gnome-logs/37 loop2 squashfs /snap/ruby/113 loop3 squashfs /snap/gtk-common-themes/319 loop4 squashfs /snap/gnome-logs/45 loop5 squashfs /snap/discord/82 loop6 squashfs /snap/gtk-common-themes/818 loop7 squashfs /snap/gnome-3-26-1604/74 loop8 squashfs /snap/gnome-characters/103 loop9 squashfs /snap/core/6034 loop10 squashfs /snap/gnome-system-monitor/51 loop11 squashfs /snap/canonical-livepatch/54 loop12 squashfs /snap/gnome-system-monitor/57 loop13 squashfs /snap/core/4917 loop14 squashfs /snap/gnome-calculator/180 loop15 squashfs /snap/gnome-characters/139 loop16 squashfs /snap/gnome-calculator/260 loop17 squashfs /snap/core/6130 loop18 squashfs /snap/discord/84 loop19 squashfs /snap/spotify/30 loop20 squashfs /snap/postman/81 loop21 squashfs /snap/postman/80 loop22 squashfs /snap/spotify/28 loop23 squashfs /snap/gnome-3-26-1604/70 loop24 squashfs /snap/discord/86 sda
═─sda1 vfat ESP 98DD-02CA /boot/efi ═─sda2
═─sda3 ntfs 01D3A8477E4D35D0
═─sda4 ntfs 9CEE3032EE3006D4
═─sda5 ntfs 96DA05C7DA05A499
═─sda6 ntfs WINRETOOLS B00827F30827B76E
═─sda7 ext4 332e4fb1-3da1-43cb-b158-0dbdb8887bc7 / ═─sda8 swap 53f4d8c7-7344-4c7e-b4d9-7f547e5d598d└─sda9 ext4 28caf3ca-ee0a-4a5a-b26c-4cc64afd858d
答案1
- 通过以下方式查找 sda9 的 UUID
命令:
sudo blkid
然后通过命令打开fstab文件:
sudo gedit /etc/fstab
在掉期条目行下方添加此行。
UUID=xxxx /home ext4 defaults 0 2
将 xxxx 替换为 sda9 的 UUID。
测试
sudo mount -a
然后重启
- 您也可以通过“磁盘”进行此操作。
答案2
嗯,在你的 fstab 中你需要一个像这样的条目:
UUID=28caf3ca-ee0a-4a5a-b26c-4cc64afd858d /home ext4 defaults 0 2
如果该 UUID 确实符合您的要求,那么就可以这样做。