WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline eltone

  • Full Member
  • ***
  • Posts: 137
*SOLVED* ERROR opening FILE
« on: January 12, 2014, 01:08:44 AM »
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 23, 2014, 12:18:13 AM by eltone »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: ERROR opening FILE
« Reply #1 on: January 12, 2014, 01:28:29 AM »
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, 03: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, 03: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, 11: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: 11705
Re: ERROR opening FILE
« Reply #5 on: January 12, 2014, 11: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, 12:35:52 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.
"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, 05: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, 06: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, 12:48:09 PM »
. . . 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, 01:03:49 PM »
. . . 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, 05: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, 05: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 15, 2014, 02:22:38 AM »
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)