Welcome to the Linux Foundation Forum!

Lab 9.3

Hi!

I tried Lab 9.3 using Ubuntu 14.04 and CentOS 7 and encountered problems with the following commands and have given suggested workarounds:

1. sudo mkfs.vfat /dev/loop1p3 - workaround - sudo mkfs.ext4 /dev/loop1p3.

:~$ sudo mkfs.vfat /dev/loop1p3

mkfs.fat 3.0.26 (2014-03-07)

unable to get drive geometry, using default 255/63

2. sudo losetup -d imagefile - workaround - sudo losetup -d /dev/loop1.

Interestingly, the command - sudo losetup -l - gave me sufficient information to suggest a workaround (works in CentOS 7 but not Ubuntu 14.04).

Comments

  • coop
    coop Posts: 915
    We knew about the losetup command pointing to the image file instead of the device node and was already fixed in the working copy to be uploaded very soon.

    I don't know what the problem you had with mkfs.vfat command is, assuming
    it is installed on your system. The above does not seem to be an error and I could
    reproduce the steps just fine on my system on RHEL7
  • thebiz
    thebiz Posts: 18
    Hi Jerry,
    As I imagine a SysAdmin would I tried getting to the root cause of the problem/s:

    On CentOS7:
    :$ ls -ls /sbin/mkfs*
    12 -rwxr-xr-x. 1 root root 11504 jon 17 2014 /sbin/mkfs
    208 -rwxr-xr-x. 1 root root 209808 jon 9 2014 /sbin/mkfs.btrfs
    32 -rwxr-xr-x. 1 root root 32760 jon 17 2014 /sbin/mkfs.cramfs
    96 -rwxr-xr-x. 4 root root 96240 jon 9 2014 /sbin/mkfs.ext2
    96 -rwxr-xr-x. 4 root root 96240 jon 9 2014 /sbin/mkfs.ext3
    96 -rwxr-xr-x. 4 root root 96240 jon 9 2014 /sbin/mkfs.ext4
    36 -rwxr-xr-x. 1 root root 32856 jon 17 2014 /sbin/mkfs.minix
    340 -rwxr-xr-x. 1 root root 347344 jon 10 2014 /sbin/mkfs.xfs

    So can conclude mkfs.vfat is not installed on my CentOS7.
    Remedied by sudo yum install dosfstools-3.0.20-9.el7.x86_64...

    On Ubuntu 14.04:
    :~$ ls -ls /sbin/mkfs*
    12 -rwxr-xr-x 1 root root 9668 feb 12 21:54 /sbin/mkfs
    20 -rwxr-xr-x 1 root root 17916 feb 12 21:54 /sbin/mkfs.bfs
    32 -rwxr-xr-x 1 root root 30300 feb 12 21:54 /sbin/mkfs.cramfs
    0 lrwxrwxrwx 1 root root 6 feb 16 22:26 /sbin/mkfs.ext2 -> mke2fs
    0 lrwxrwxrwx 1 root root 6 feb 16 22:26 /sbin/mkfs.ext3 -> mke2fs
    0 lrwxrwxrwx 1 root root 6 feb 16 22:26 /sbin/mkfs.ext4 -> mke2fs
    0 lrwxrwxrwx 1 root root 6 feb 16 22:26 /sbin/mkfs.ext4dev -> mke2fs
    28 -rwxr-xr-x 1 root root 26712 mar 18 2014 /sbin/mkfs.fat
    28 -rwxr-xr-x 1 root root 26220 feb 12 21:54 /sbin/mkfs.minix
    0 lrwxrwxrwx 1 root root 8 apr 18 17:11 /sbin/mkfs.msdos -> mkfs.fat
    0 lrwxrwxrwx 1 root root 6 apr 18 17:11 /sbin/mkfs.ntfs -> mkntfs
    0 lrwxrwxrwx 1 root root 8 apr 18 17:11 /sbin/mkfs.vfat -> mkfs.fat

    So can conclude that there is a softlink from mkfs.vfat to mkfs.fat on my Ubuntu 14.04.

    Googling the message indicates that this is a known message:
    http://www.linuxquestions.org/questions/linux-newbie-8/unable-to-get-drive-geometry-when-mkfs-vfat-784956/

    ...and...

    http://www.certdepot.net/rhel7-use-vfat-ext4-xfs-file-systems/
    seems to suggest that
    "mkfs.fat 3.0.26 (2014-03-07)
    unable to get drive geometry, using default 255/63"

    ...is not an error message.

Categories

Upcoming Training