Reputation: 341
I'm running Ubuntu 12.04 in my pc and for some accident my /etc/fstab file became corrupted, i have already checked and no backup was made. The pc has installed Windows as well and I don't really know how to build the file based on the information of the blkid
command and the mtab
file.
Although i'm familiar with the syntax of the fstab
file, I don't know what information has to be inlcuded based on the situation of having a windows partition besides Linux so I has hoping somebody could help me with the construction of the file.
Here's the blkid
info.
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="Recovery" UUID="BA04384104380345" TYPE="ntfs"
/dev/sda2: LABEL="Vista" UUID="608085478085249E" TYPE="ntfs"
/dev/sda5: UUID="ffc7dedc-ce6c-45a9-b233-7ce214682178" TYPE="ext4"
/dev/sda6: UUID="1347e64b-d51e-4410-ae43-cfdac8959583" TYPE="swap"
/dev/sr0: LABEL="Ubuntu 12.04.4 LTS i386" TYPE="iso9660"
And the mtab
file.
/dev/sda5 / ext4 rw,errors=remount-ro 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
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
Currently, i'm booting from the live CD so I guess one of the devices is the CD media.
Upvotes: 0
Views: 966
Reputation: 1850
Based on you mtab
and blkid
output, your system has two major linux partitions /dev/sda5
which is mounted as /
and /dev/sda6
which is mounted as swap
. Rest other partitions are virtual file systems and they will be mounted automatically by the init
during the time of
reboot.
Add below lines to your /etc/fstab
file and reboot the system, it should be safe.
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/sda5 / ext4 errors=remount-ro 0 1
/dev/sda6 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
It is not necessary to consider windows partition at this stage if you are not mounting any of the windows partitions.
Upvotes: 1
Reputation: 1316
I am running Ubuntu 12.04 and looking at my fstab, I think this should work for you (I updated with your UUIDs):
proc /proc proc nodev,noexec,nosuid 0 0
# main
UUID=ffc7dedc-ce6c-45a9-b233-7ce214682178 / ext4 errors=remount-ro 0 0
# swap
UUID=1347e64b-d51e-4410-ae43-cfdac8959583 none swap sw 0 0
Upvotes: 1