请帮助我重建 fstab!Ubuntu 12.04 LTS

请帮助我重建 fstab!Ubuntu 12.04 LTS

我意外删除了 fstab 文件的所有内容,并且无法挂载或卸载任何驱动器。

这是我的blkid输出:

/dev/loop0: UUID="1d6980b1-174c-49d1-8a11-e95f1b26b4da" TYPE="ext3" 
/dev/sda1: LABEL="System Reserved" UUID="6ED60CCFD60C998B" TYPE="ntfs" 
/dev/sda2: UUID="C480709D8070979E" TYPE="ntfs" 
/dev/sda3: LABEL="New Volume" UUID="5ACAB093CAB06CBF" TYPE="ntfs" 
/dev/sda5: LABEL="New Volume" UUID="F64E260A4E25C3E9" TYPE="ntfs"

我认为cat /etc/mtab输出也会有帮助:

/dev/loop0 / ext3 rw 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
/dev/sda3 /host fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
gvfs-fuse-daemon /home/asim/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=asim 0 0
/dev/sda1 /media/System_Reserved fuseblk rw,nosuid,nodev,allow_other,default_permissions,blksize=4096 0 0
/dev/sda2 /media/sda2 fuseblk rw,nosuid,nodev,allow_other,default_permissions,blksize=4096 0 0
gvfs-fuse-daemon /root/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev 0 0

mount无需安装我的驱动器:

/dev/loop0 on / type ext3 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
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)
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)
/dev/sda3 on /host type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
gvfs-fuse-daemon on /home/asim/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=asim)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)

mount所有驱动器都已安装时的输出:

/dev/loop0 on / type ext3 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
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)
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)
/dev/sda3 on /host type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
gvfs-fuse-daemon on /home/asim/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=asim)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sda1 on /media/System Reserved type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda2 on /media/C480709D8070979E type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda5 on /media/New Volume_ type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

答案1

/etc/fstab当按照你的方式安装Wubi时(通过磁盘映像),它看起来应该是这样的,只有一个交换文件条目:

/host/ubuntu/disks/swap.disk    none    swap    sw    0    0

您不需要/(root) 条目,因为它作为参数传递给内核。但如果让您感到方便,您可以设置您的/etc/fstab方式ubiquity(安装 Wubi 的另一种方式):

# /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>
proc /proc proc nodev,noexec,nosuid 0 0
/host/ubuntu/disks/root.disk / ext3 loop,errors=remount-ro 0 1
/host/ubuntu/disks/swap.disk none swap loop,sw 0 0

PS 我修改了上述内容,ext3因为磁盘映像安装使用ext3,而不是安装ext4的默认设置ubiquity

PPS /host( /dev/sda3) 也会自动安装。不要/etc/fstab为该分区添加条目。NTFS如果愿意,您可以为其他分区添加条目。

相关内容