Header Shadow Image

There are differences between boot sector and its backup

Recently I got the following at boot time of my RHEL clone (Scientific Linux 6.7), There are differences between boot sector and its backup, after which I was dumped into the maintenance console asked to type a password for maintenance and perform brain surgery.  Naturally I wondered if my recent attempts to create a bootable UEFI / DOS disk resulted in me nuking a partition.  After a short while I realized that this is likely the result of me trying to …..

… update my /etc/fstab file.  I had entries as follows to try and mount them permanently:

UUID=93E8-0250                                  /mnt/FLASHDisk01        vfat    context=system_u:object_r:samba_share_t:s0 0 2
UUID=5449-9578                                  /mnt/FLASHDisk02        vfat    context=system_u:object_r:samba_share_t:s0 0 2
UUID=B80EDD970EDD4ECE                           /mnt/FLASHDisk03        ntfs    context=system_u:object_r:samba_share_t:s0 0 2
UUID=543D-C137                                  /mnt/FLASHDisk04        vfat    context=system_u:object_r:samba_share_t:s0 0 2
UUID=4CFE-820D                                  /mnt/FLASHDisk05        vfat    context=system_u:object_r:samba_share_t:s0 0 2

with a value of 2 in the last column. After some short reading, I realize the following from the man pages:

       The fifth field, (fs_freq), is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped.
       If  the  fifth  field  is  not  present,  a value of zero is returned and dump will assume that the filesystem does not need to be

       The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at  reboot
       time.   The  root  filesystem  should  be  specified  with  a  fs_passno of 1, and other filesystems should have a fs_passno of 2.
       Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same  time  to
       utilize  parallelism  available  in the hardware.  If the sixth field is not present or zero, a value of zero is returned and fsck
       will assume that the filesystem does not need to be checked.

So quickly realized I need to change the field to 0 to avoid dosfsck running on my flash disks.  There was also nothing wrong with the root filesystems of my installation as booting into a LiveDVD of Scientific Linux then running fsck -n /dev/sdX revealed.  My recommended entries for USB Flash disks then changes too:

UUID=93E8-0250                                  /mnt/FLASHDisk01        vfat    context=system_u:object_r:samba_share_t:s0 0 0
UUID=5449-9578                                  /mnt/FLASHDisk02        vfat    context=system_u:object_r:samba_share_t:s0 0 0
UUID=B80EDD970EDD4ECE                           /mnt/FLASHDisk03        ntfs    context=system_u:object_r:samba_share_t:s0 0 0
UUID=543D-C137                                  /mnt/FLASHDisk04        vfat    context=system_u:object_r:samba_share_t:s0 0 0
UUID=4CFE-820D                                  /mnt/FLASHDisk05        vfat    context=system_u:object_r:samba_share_t:s0 0 0

Hope this helps.  cool




Leave a Reply

You must be logged in to post a comment.

  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License