Tiny Core Base > TCB Bugs

mnttool: notice on failed umount, sync w/ cli umount?

<< < (2/3) > >>

Misalf:
/usr/sbin/rebuildfstab  already checks for the presence of  ntfs-3g  and creates  /etc/fstab  accordingly. Isn't that used by mnttool?

nitram:
Just tested in dCore, believe TC6 behaves similarly with NTFS. Added  ntfs-3g  to boot list, rebooted, fstab still read-only for NTFS:
/dev/sda1       /mnt/sda1       ntfs     noauto,users,exec,ro,umask=000 0 0 # Added by TC

Using  mnttool  to mount sda1 results in read-only mount:
touch: cannot touch 'testy': Read-only file system

Umount /dev/sda1 through  mnttool  , manually run  sudo rebuildfstab  still read-only.

Does not appear  rebuildfstab  or  mnttool  recognizes  ntfs-3g  on my system.

@dentonlt: A C++ timeout/reload example from MFMR:

--- Code: ---#define TIMEOUT_RELOAD 5

/**************************************************************************
*
* Function: idle_function
*
* function to call every TIMEOUT_RELOAD seconds during idle
*  - refresh mount list
*
****************************************************************************/

void idle_function (void *) {

  static time_t time = 0;   
 
  struct stat stat_buffer;

  stat("/etc/mtab", &stat_buffer);
 
  if (time == 0)
 
    time = stat_buffer.st_mtime;
   
  else if (stat_buffer.st_mtime > time) {
   
    ptr_mfmmount->find_mounted();

    time = stat_buffer.st_mtime;
   
  }
 
  Fl::repeat_timeout(TIMEOUT_RELOAD, idle_function);

}

--- End code ---

curaga:
Better hunt that down first. Try adding echoes to rebuildfstab, then run it manually.

gerald_clark:
nitram, are you sure ntfs-3g actually loaded?

nitram:
ntfs-3g is loaded at boot in my dCore system:

--- Code: ---tc@box:/usr/bin$ ls /tmp/tcloop/ | grep ntfs
ntfs-3g/

--- End code ---

Thought rebuildfstab was a binary, not.

Think i see the issue, rebuildfstab looks for ntfs-3g in /usr/local/bin:

--- Code: ---checkntfs() {
  if [ -f /usr/local/bin/ntfs-3g ]; then
      FSTYPE="ntfs-3g"
      OPTIONS="$OPTIONS"
  else
      FSTYPE="ntfs"
      OPTIONS="$OPTIONS,ro,umask=000"
  fi
}

--- End code ---

In dCore-jessie it's here:

--- Code: ---tc@box:/usr/bin$ which ntfs-3g
/bin/ntfs-3g

--- End code ---

Modifying rebuildfstab:

--- Code: ---checkntfs() {
  if [ -f /usr/local/bin/ntfs-3g ] || [ -f /bin/ntfs-3g ]; then
      FSTYPE="ntfs-3g"
      OPTIONS="$OPTIONS"
  else
      FSTYPE="ntfs"
      OPTIONS="$OPTIONS,ro,umask=000"
  fi
}

--- End code ---

...gets proper fstab:

--- Code: ---/dev/sda1       /mnt/sda1       ntfs-3g  noauto,users,exec    0 0 # Added by TC

--- End code ---

...and mnttool mounts the NTFS partition read/write as expected.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version