1

how to make original /etc/fstab ?? thanks

root@Gateway:~# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00033c3d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    70311935    35154944   83  Linux
/dev/sda2        70311936   148436991    39062528   83  Linux
/dev/sda3       148439038   156301311     3931137    5  Extended
/dev/sda5       148439040   156301311     3931136   82  Linux swap / Solaris

Disk /dev/mapper/cryptswap1: 4025 MB, 4025483264 bytes
255 heads, 63 sectors/track, 489 cylinders, total 7862272 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x27dc0ef5

Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table
root@Gateway:~#
1
  • What is your current fstab? also: to recreate it you need the output of sudo blkid (shows the uuid of each filesystem) and cat /etc/mtab (shows mount options). edit: see ubuntuforums.org/… for an example on how to recreate it.
    – Rinzwind
    Apr 4, 2014 at 10:50

1 Answer 1

1

An example on how to recreate fstab can be found on ubuntuforums.org

You need the result of:

$ sudo blkid
/dev/sda1: LABEL="EFI" UUID="3F3C-1AF6" TYPE="vfat"
/dev/sda2: UUID="83062D46C78FDD33" LABEL="Macintosh HD" TYPE="hfsplus"
/dev/sda3: UUID="9A1C07811C075821" TYPE="ntfs"
/dev/sda4: UUID="58e05acc-a255-48c7-ac8a-acbf5a7764c9" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="dc91869f-897e-47d1-a472-98551ae03fa5"

and of:

$ cat /etc/mtab
/dev/sda4 / ext3 rw,relatime,errors=remount-ro 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,nosuid,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
udev /dev tmpfs rw,mode=0755 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
lrm /lib/modules/2.6.28-17-generic/volatile tmpfs rw,mode=755 0 0
securityfs /sys/kernel/security securityfs rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/dan/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=dan 0 0

With these results you can re-create a fstab file. Based on the example it would be:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda4
UUID=58e05acc-a255-48c7-ac8a-acbf5a7764c9 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=dc91869f-897e-47d1-a472-98551ae03fa5 none swap defaults 0 0

But your /etc/fstab will be different. You will have different UUID's, different discs and can have different mount options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .