我正在使用一个新的硬盘驱动器(非 SSD,普通旧硬盘驱动器),它已经 ext4 格式化并在阅读本文后安装在 /media/mynewdrive
但是我想将它安装在 /opt 因为大多数软件都安装在那里。目前我需要手动将这些东西移动到 /media/mynewdrive 和下面......不是很方便记住的位置......我该怎么办?我的旧驱动器中已经有 /opt 和子目录,我想保持原样。这是我当前的挂载命令输出:
root@ashu-700-430qe:/home/ashu# mount
/dev/sda7 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /sys/firmware/efi/efivars type efivarfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sdb3 on /media/mynewdrive type ext4 (rw)
/dev/sda2 on /boot/efi type vfat (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=ashu)
/dev/sr0 on /media/ashu/CD0001 type iso9660 (ro,nosuid,nodev,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)
root@ashu-700-430qe:/home/ashu#
它是带有 Windows 10 的双启动系统,我不想影响任何其他东西。
root@ashu-700-430qe:/home/ashu# blkid
/dev/sda1: LABEL="Windows RE tools" UUID="10E664BBE664A2A8" TYPE="ntfs"
/dev/sda2: LABEL="SYSTEM" UUID="E467-1A3B" TYPE="vfat"
/dev/sda4: LABEL="Windows" UUID="C0726845726841F0" TYPE="ntfs"
/dev/sda5: UUID="CC8C4A768C4A5ADA" TYPE="ntfs"
/dev/sda6: UUID="74a0518b-2eed-404a-aaa1-a302dbf9f18c" TYPE="swap"
/dev/sda7: UUID="54458154-6f44-44c9-be44-f91d093d63e6" TYPE="ext4"
/dev/sda8: LABEL="Recovery Image" UUID="90686954686939DC" TYPE="ntfs"
/dev/sdb2: LABEL="Windows_F" UUID="380C233F0C22F790" TYPE="ntfs"
/dev/sdb3: UUID="f44ccbce-3388-475e-9d41-5228b388f282" TYPE="ext4"
/dev/sr0: LABEL="CD0001" TYPE="iso9660"
root@ashu-700-430qe:/home/ashu# 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/sda7 during installation
UUID=54458154-6f44-44c9-be44-f91d093d63e6 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda2 during installation
UUID=E467-1A3B /boot/efi vfat defaults 0 1
# swap was on /dev/sda6 during installation
UUID=74a0518b-2eed-404a-aaa1-a302dbf9f18c none swap sw 0 0
/dev/sdb3 /media/mynewdrive ext4 defaults 0 2
(rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush)
与我认识的一些 Linux 大师交谈后的一些可能的选择:
/opt
)可以用新的物理卷提供的额外空间进行扩展。/
的/media/mynewdrive
类型,ext4
我可以将所有内容复制到新分区(安装为的分区/media/mynewdrive
),然后将其安装为/opt
寻找一些选项,并以最好的方式选择最适合我需要的选项。