WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: *SOLVED* ERROR opening FILE  (Read 8089 times)

Offline eltone

  • Full Member
  • ***
  • Posts: 137
*SOLVED* ERROR opening FILE
« on: January 11, 2014, 10:08:44 PM »
Re: TCP 5.1

hi,

While backing up my TCB thumb drive install on sdb1 to HD, sda1, this dialog appears:

Quote
tool.txt: Error opening file "mnt/sda1/tmp/tool.txt": Read-only file system


Q: What's the root cause?

eltone
« Last Edit: January 22, 2014, 09:18:13 PM by eltone »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: ERROR opening FILE
« Reply #1 on: January 11, 2014, 10:28:29 PM »
Probably a failing hard drive.
An I/O error will result in the drive going read-only.

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: ERROR opening FILE
« Reply #2 on: January 12, 2014, 12:20:02 AM »
Probably a failing hard drive.
An I/O error will result in the drive going read-only.

hi,

It's either that or more likely the thumb drive, since it's been erattic.

eltone

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: ERROR opening FILE
« Reply #3 on: January 12, 2014, 12:24:12 AM »
The error is on sda1 which you said is the hard disk.
You should run smart tools on it.

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: ERROR opening FILE
« Reply #4 on: January 12, 2014, 08:27:53 AM »
The error is on sda1 which you said is the hard disk.
You should run smart tools on it.

hi,

The HD is almost full, so backup would preempt using smart tools.
The only HD utilities used are chkdsk & defrag from m$.

Q: What smart tools does TCP use?

eltone

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: ERROR opening FILE
« Reply #5 on: January 12, 2014, 08:33:39 AM »
Hi eltone
I think gerald_clark may be referring to  smartmontools.tcz

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ERROR opening FILE
« Reply #6 on: January 12, 2014, 09:35:52 AM »
smartctl would be the first thing to run on it, if you care about any data you may want to image the filesystem(s) before running chkdsk which might make it worse and you most certainly don't want to run defrag on it.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: ERROR opening FILE
« Reply #7 on: January 12, 2014, 02:15:04 PM »
smartctl would be the first thing to run on it, if you care about any data you may want to image the filesystem(s) before running chkdsk which might make it worse and you most certainly don't want to run defrag on it.

Hey tinypoodle!

There is nothing in the TCP 5.1 repo to diagnose hard drives starting with smart.

Also, please enlighten your image filesystem(s) comment.  'Image' sounds like the TCP ISO and I have never had a need to create an ISO before.  The largest thumb drives I use for backup is 32GB's and it's a 64GB HD.

Sincerely,
eltone

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: ERROR opening FILE
« Reply #8 on: January 12, 2014, 03:06:53 PM »
You can download and install the V4 smartmontools.tcz.
He mans you should backup your filesystems to image files on another device.  Use dd conv-noerror.

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: ERROR opening FILE
« Reply #9 on: January 13, 2014, 09:48:09 AM »
. . . you should backup your filesystems to image files on another device.  Use dd conv-noerror.

hi,

A search of 'dd conv-noerror' came up with this OLD link:

http://www.linuxweblog.com/dd-image


It would be nice to split the 65GB HD into a couple 32 GB compressed images, to fit on 32 GB thumb drives.

eltone

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ERROR opening FILE
« Reply #10 on: January 13, 2014, 10:03:49 AM »
. . . you should backup your filesystems to image files on another device.  Use dd conv-noerror.
It would be nice to split the 65GB HD into a couple 32 GB compressed images, to fit on 32 GB thumb drives.
That might be an approach for a simple routine backup, but rather useless when trying to rescue data from an erroneous filesystem or device as appears possible in your case.

To the contrary, if you image your filesystem(s), to preserve optimal chances of being able to rescue data, you should not operate in read-write mode on the image per se, but only on a copy of the image.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline eltone

  • Full Member
  • ***
  • Posts: 137
Re: ERROR opening FILE
« Reply #11 on: January 13, 2014, 02:28:50 PM »
. trying to rescue data from an erroneous filesystem or device as appears possible in your case.

To the contrary, if you image your filesystem(s), to preserve optimal chances of being able to rescue data, you should not operate in read-write mode on the image per se, but only on a copy of the image.

hi,

'fdisk' findings of HD:

Quote
tc@box:~$ fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *           1        9446    75874963+  7 HPFS/NTFS
/dev/sda2            9447        9599     1228972+  f Win95 Ext'd (LBA)
/dev/sda3            9600        9729     1044225   7 HPFS/NTFS
/dev/sda5            9447        9599     1228941   7 HPFS/NTFS
tc@box:~$ lshw -C /dev/sda
sh: lshw: not found
tc@box:~$ lshw -C /dev/sda
WARNING: you should run this program as super-user.
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
tc@box:~$ sudo lshw -C /dev/sda
tc@box:~$ sudo lshw -C /dev/sda
tc@box:~$

'lshw.tcz' is a non-funtional 5.1 repo extension.

Q1: To copy the sda HD disk to an image file on sdb, what's the correct dd syntax, e.g.,:
Code: [Select]
dd if=/dev/old_disk of=image_file conv=noerror

Q2: Once the HD is successfully imaged, can it be restored on another media, e.g., mass storage device?

eltone

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: ERROR opening FILE
« Reply #12 on: January 13, 2014, 02:35:00 PM »
You never mentioned that your sda1 is an NTFS file system.
You cannot write to an NTFS file system unless you mount it with the ntfs-3g.tcz extension.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ERROR opening FILE
« Reply #13 on: January 14, 2014, 11:22:38 PM »
Besides from everything else, your partitioning scheme is rather uncommon, e.g. /dev/sda5 precedes /dev/sda3; be prepared that some software which would assume common order may behave unpredictably.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)