将 HDD 添加到 Ubuntu

将 HDD 添加到 Ubuntu

我是一名初学者。我已经将 Ubuntu 20.4 LTS 作为双启动安装到我的机器上。我已将其安装到 SSD 中,如下所示,位于 nvme0n1p4 分区。但是,我想在我的 Ubuntu 中添加一个 HDD 分区 sda6。我找到了它的 UUID 并相应地编辑了 fstab,如下所示。但是,我现在有两个问题。

1-当我尝试在 UbuntuStorage 分区中存储某些内容时,它拒绝了我。我给出了以下错误。我该如何解决?

efe@efeASUS:~/Downloads$ mv /home/efe/Downloads/Quartus-pro-18.1.0.222-linux.tar /storage 
mv: cannot create regular file '/storage/Quartus-pro-18.1.0.222-linux.tar': Permission denied

2-此外,我无法在文件 GUI 中找到此分区。我该如何找到它?我可以从终端找到它,但无法从 GUI 找到它。

efe@efeASUS:~/Downloads$ lsblk -f
NAME        FSTYPE   LABEL         UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0       squashfs                                                          0   100% /snap/canonical-livep
loop1       squashfs                                                          0   100% /snap/chromium-ffmpeg
loop2       squashfs                                                          0   100% /snap/core/10823
loop3       squashfs                                                          0   100% /snap/snap-store/518
loop4       squashfs                                                          0   100% /snap/snapd/11036
loop5       squashfs                                                          0   100% /snap/vlc/2103
loop6       squashfs                                                          0   100% /snap/core18/1988
loop7       squashfs                                                          0   100% /snap/gnome-3-34-1804
loop8       squashfs                                                          0   100% /snap/gtk-common-them
loop9       squashfs                                                          0   100% /snap/gnome-3-28-1804
sda                                                                                    
├─sda1      ntfs     Recovery      A0425D5B425D36EE                                    
├─sda2      vfat                   605E-DF19                                           
├─sda3                                                                                 
├─sda4      ntfs     Arşiv         7250BDD450BD9F73                                    
├─sda5      ntfs                   8AE4DCF2E4DCE20D                      102,4G    74% /media/efe/8AE4DCF2E4
└─sda6      ext4     UbuntuStorage 83b4cd29-d013-4cc7-836c-8de0e027d8a6    138G     0% /storage
nvme0n1                                                                                
├─nvme0n1p1                                                                            
├─nvme0n1p2 ntfs                   182E0ED52E0EAC36                                    
├─nvme0n1p3 vfat                   C708-8912                             504,2M     2% /boot/efi
└─nvme0n1p4 ext4                   7142db43-56d2-40c9-b9b9-ec1a44cb0505     11G    65% /
efe@efeASUS:~/Downloads$ cat /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/nvme0n1p4 during installation
UUID=7142db43-56d2-40c9-b9b9-ec1a44cb0505 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p3 during installation
UUID=C708-8912  /boot/efi       vfat    umask=0077      0       1
UUID=83b4cd29-d013-4cc7-836c-8de0e027d8a6 /storage ext4 defaults 0 2
/swapfile                                 none            swap    sw              0       0

答案1

将挂载点更改为此项,使其挂载在您的 /home/user_name/storage 中,希望显示为普通用户不尝试访问 / 文件系统中的文件/目录。

UUID=83b4cd29-d013-4cc7-836c-8de0e027d8a6 /home/user_name/storage ext4 defaults 0 2

编辑后甚至不需要重新启动,umount /storage然后mount -a。再次检查新目录的权限。哦,mkdir /home/user_name/storage在安装之前还需要做些事情来获得安装点。

相关内容