Как вынудить человечность Зафиксировать корневой каталог, не взаимодействуя с пользователем при начальной загрузке?

Я использую человечность на промышленной плате (beaglebone черный). Иногда, поскольку результат сбоя питания или других проблем, при начальной загрузке OS просит нажимать F для фиксации корневого раздела и ожидает там, пока пользователь не делает что-то. Но я хочу удостовериться, что OS загружается, потому что нет никакого пользователя, доступного там для нажатия любой кнопки, на самом деле нет никакого последовательного кабеля, подключенного к моей встроенной плате так, чтобы любой мог отправить любой символ в нее.

Как человечность может быть настроена так, чтобы Она всегда фиксировала бы файловую систему, не спрашивая пользователя?

0
задан 11 September 2016 в 12:28

1 ответ

Используйте -a аргумент.

fsck /dev/sdaX -a -p

$ man fsck

Взятый из страниц справочника:

   Options  to  different filesystem-specific fsck's are not standardized.
   If in doubt, please consult the man pages  of  the  filesystem-specific
   checker.   Although not guaranteed, the following options are supported
   by most filesystem checkers:

   -a     Automatically repair the filesystem without any  questions  (use
          this  option with caution).  Note that e2fsck(8) supports -a for
          backward compatibility only.  This option is mapped to  e2fsck's
          -p  option  which is safe to use, unlike the -a option that some
          filesystem checkers support.

   -n     For some filesystem-specific checkers, the -n option will  cause
          the fs-specific fsck to avoid attempting to repair any problems,
          but simply report such problems to stdout.  This is however  not
          true  for  all  filesystem-specific  checkers.   In  particular,
          fsck.reiserfs(8) will not report any corruption  if  given  this
          option.  fsck.minix(8) does not support the -n option at all.

   -r     Interactively  repair  the  filesystem  (ask for confirmations).
          Note: It is generally a bad idea to use this option if  multiple
          fsck's  are  being  run  in  parallel.   Also  note that this is
          e2fsck's default behavior; it supports this option for  backward
          compatibility reasons only.

   -y     For  some filesystem-specific checkers, the -y option will cause
          the fs-specific fsck to  always  attempt  to  fix  any  detected
          filesystem corruption automatically.  Sometimes an expert may be
          able to do better driving the fsck manually.  Note that not  all
          filesystem-specific checkers implement this option.  In particu‐
          lar fsck.minix(8) and  fsck.cramfs(8)  do  not  support  the  -y
          option as of this writing.

быстрые шоу экрана справки:

Emergency help:
 -p                   Automatic repair (no questions)
 -n                   Make no changes to the filesystem
 -y                   Assume "yes" to all questions
 -c                   Check for bad blocks and add them to the badblock list
 -f                   Force checking even if filesystem is marked clean
 -v                   Be verbose
 -b superblock        Use alternative superblock
 -B blocksize         Force blocksize when looking for superblock
 -j external_journal  Set location of the external journal
 -l bad_blocks_file   Add to badblocks list
 -L bad_blocks_file   Set badblocks list

Другие связанные объекты:

/etc/fstab вызовы /etc/init.d/checkfs.sh, поскольку это проверяет. Можно отредактировать тот файл, чтобы дать ему параметры, которые Вы хотите.

Проверка эти блоки:

[ "$fscheck" = yes ] && log_warning_msg "Fast boot enabled, so skipping file system check."

if [ "$fscheck" = yes ] && [ ! "$BAT" ] && [ "$FSCKTYPES" != "none" ]

0
ответ дан 28 September 2019 в 14:45

Другие вопросы по тегам:

Похожие вопросы: