[CoLoCo] Heaney's buggered fstab

David L. Willson DLWillson at TheGeek.NU
Wed Oct 31 16:01:55 GMT 2007


My wise friend LJ Longwing (formerly Head) observed that we need a GUI
way to manage /etc/fstab.  Until that happy day arrives, here are two
commands that may help...

     1.   sudo fdisk -l
     2.   ls -lR /dev/disk

Details:

=======================================================================

  sudo fdisk -l

# This command will show you all recognized partitions
# You should be able to figure out which partition is which based on the
device-name and the size of the partition.  Remember that the number is
the partition number, and everything else indicates the disk.

Example output:

dlwillson at nb-dlwillson-u7:~$ sudo fdisk -l

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0305bd2b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1305    10482381    7  HPFS/NTFS
/dev/sda2            1306        3916    20971520    7  HPFS/NTFS
/dev/sda3            3917       14153    82228702+  83  Linux
/dev/sda4           14154       14593     3534300    5  Extended
/dev/sda5           14154       14593     3534268+  82  Linux swap /
Solaris

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000851a0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       19457   156288321    c  W95 FAT32 (LBA)

=======================================================================

  ls -lR /dev/disk

# This command will show you all the UUIDs and which partition they
point to.

Example output:

dlwillson at nb-dlwillson-u7:~$ ls -lR /dev/disk
/dev/disk:
total 0
drwxr-xr-x 2 root root 360 2007-10-31 03:13 by-id
drwxr-xr-x 2 root root 220 2007-10-31 03:13 by-path
drwxr-xr-x 2 root root 140 2007-10-31 03:13 by-uuid

/dev/disk/by-id:
total 0
lrwxrwxrwx 1 root root  9 2007-10-31 03:13
ata-FUJITSU_MHW2120BH_NZ1DT7125706 -> ../../sda
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
ata-FUJITSU_MHW2120BH_NZ1DT7125706-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
ata-FUJITSU_MHW2120BH_NZ1DT7125706-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
ata-FUJITSU_MHW2120BH_NZ1DT7125706-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
ata-FUJITSU_MHW2120BH_NZ1DT7125706-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
ata-FUJITSU_MHW2120BH_NZ1DT7125706-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 2007-10-31 03:13
ata-Hitachi_HTS541616J9SA00_SB2404SJJ1GHPE -> ../../sdb
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
ata-Hitachi_HTS541616J9SA00_SB2404SJJ1GHPE-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  9 2007-10-31 03:13
scsi-1ATA_FUJITSU_MHW2120BH_NZ1DT7125706 -> ../../sda
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
scsi-1ATA_FUJITSU_MHW2120BH_NZ1DT7125706-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
scsi-1ATA_FUJITSU_MHW2120BH_NZ1DT7125706-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
scsi-1ATA_FUJITSU_MHW2120BH_NZ1DT7125706-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
scsi-1ATA_FUJITSU_MHW2120BH_NZ1DT7125706-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
scsi-1ATA_FUJITSU_MHW2120BH_NZ1DT7125706-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 2007-10-31 03:13
scsi-1ATA_Hitachi_HTS541616J9SA00_SB2404SJJ1GHPE -> ../../sdb
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
scsi-1ATA_Hitachi_HTS541616J9SA00_SB2404SJJ1GHPE-part1 -> ../../sdb1

/dev/disk/by-path:
total 0
lrwxrwxrwx 1 root root 10 2007-10-31 03:13 pci-0000:00:1f.1-scsi-0:0:0:0
-> ../../scd0
lrwxrwxrwx 1 root root  9 2007-10-31 03:13 pci-0000:00:1f.2-scsi-0:0:0:0
-> ../../sda
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
pci-0000:00:1f.2-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
pci-0000:00:1f.2-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
pci-0000:00:1f.2-scsi-0:0:0:0-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
pci-0000:00:1f.2-scsi-0:0:0:0-part5 -> ../../sda5
lrwxrwxrwx 1 root root  9 2007-10-31 03:13 pci-0000:00:1f.2-scsi-2:0:0:0
-> ../../sdb
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
pci-0000:00:1f.2-scsi-2:0:0:0-part1 -> ../../sdb1

/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
11653af4-e789-409e-b565-fa845f6ae298 -> ../../sda3
lrwxrwxrwx 1 root root 10 2007-10-31 03:13 386A97486A9701B4
-> ../../sda2
lrwxrwxrwx 1 root root 10 2007-10-31 03:13 4620-3B23 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2007-10-31 03:13 6630BA8230BA592F
-> ../../sda1
lrwxrwxrwx 1 root root 10 2007-10-31 03:13
9ca90b16-ec46-4833-9a71-98c73ea56100 -> ../../sda5

=======================================================================

On Tue, 2007-10-30 at 21:23 -0600, TJ Heaney wrote:
> Based on what I saw on my fstab, and compared with the output, it
> looks like it is looking for a non-existant partition.
> 
> On 10/30/07, Jim Hutchinson < jim at ubuntu-rocks.org> wrote:
>         On 10/30/07, TJ Heaney < tjheaney at gmail.com> wrote:
>         > Wouldn't surprise me. Any resources on fixing my hosed
>         fstab?
>         >
>         None that I know of. In my case, I just look at what
>         partitions
>         mounted and what should have mounted. If something is in fstab
>         but not
>         mounted then that's usually the culprit. Comment out the line
>         and
>         reboot. If that fixes it (i.e. booting without errors) then
>         you just
>         need to diagnose what's wrong with the fstab line. Usually
>         it's 
>         pointing to a partition that doesn't exist (or bad UUID) or
>         the file
>         system doesn't match or something.
>         
>         Jim
>         
>         --
>         Ubuntu-us-co mailing list
>         Ubuntu-us-co at lists.ubuntu.com
>         Modify settings or unsubscribe at:
>         https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-co
> 




More information about the Ubuntu-us-co mailing list