WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC4.2- Corrupting Compact Flash Cards (HSM Violation?)  (Read 847 times)

Offline Pappy384

  • Newbie
  • *
  • Posts: 1
TC4.2- Corrupting Compact Flash Cards (HSM Violation?)
« on: January 04, 2012, 01:09:41 PM »
I'm having a nasty problem running from, or writing to, Compact Flash cards using TinyCore 4.2.  This is a built in IDE slot, not an USB adapter or anything.

After a few seconds (usually right after loading the initramfs), I start seeing the below snippets on the console when running from the flash card.  The boot process hangs for several minutes and continues at best, and at worst (most of the time) just corrupts the filesystem on the card and camps out.  I installed TC4.2 to a usb thumb drive which runs fine, but see the same messages/hangs when writing to a mounted flash card.  I tried different filesystems on the cards too (FAT, EXT2)- no change.

I can run TinyCore v3.8.4 from the same flash card and device without any problem, so it's not a bum card (I've also tried several other cards and devices to test).

Anyone know of some other tweaks that might help?

Boot Parameters
V4.2
(noncq didn't help)
Quote
libata.dma=0 libata.force=noncq norestore noswap nozswap showapps xvesa=800x600x24 nodhcp  printk.time=1

V3.8.4
Quote
ide-core.nodma=1.0 norestore noswap nozswap showapps xvesa=800x600x24 nodhcp  printk.time=1

Messages (depending on the write operation, repeats many more times):
Quote
...
[  436.653173] ata2: EH complete
[  436.693253] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  436.693389] ata2.00: ST-ATA: DRQ=0 without device error, dev_stat 0x50
[  436.693508] ata2.00: failed command: WRITE SECTOR(S)
[  436.693654] ata2.00: cmd 30/00:fe:12:97:00/00:00:00:00:00/e0 tag 0 pio 130048 out
[  436.693677]          res 50/00:00:0f:98:00/00:00:00:00:00/e0 Emask 0x202 (HSM violation)
[  436.693906] ata2.00: status: { DRDY }
[  436.694092] ata2: soft resetting link
[  436.859210] ata2.00: configured for PIO0
[  436.859377] ata2: EH complete
[  436.915393] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  436.915595] ata2.00: ST-ATA: DRQ=0 without device error, dev_stat 0x50
[  436.915719] ata2.00: failed command: WRITE SECTOR(S)
[  436.915863] ata2.00: cmd 30/00:fe:12:97:00/00:00:00:00:00/e0 tag 0 pio 130048 out
[  436.915885]          res 50/00:00:0f:98:00/00:00:00:00:00/e0 Emask 0x202 (HSM violation)
[  436.916114] ata2.00: status: { DRDY }
[  436.916300] ata2: soft resetting link
[  437.082517] ata2.00: configured for PIO0
[  437.082683] ata2: EH complete
[  437.136424] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  437.136561] ata2.00: ST-ATA: DRQ=0 without device error, dev_stat 0x50
[  437.136679] ata2.00: failed command: WRITE SECTOR(S)
[  437.136822] ata2.00: cmd 30/00:fe:12:97:00/00:00:00:00:00/e0 tag 0 pio 130048 out
[  437.136844]          res 50/00:00:0f:98:00/00:00:00:00:00/e0 Emask 0x202 (HSM violation)
[  437.137070] ata2.00: status: { DRDY }
[  437.137253] ata2: soft resetting link
[  437.302488] ata2.00: configured for PIO0
[  437.302654] ata2: EH complete
[  437.356383] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  437.356520] ata2.00: ST-ATA: DRQ=0 without device error, dev_stat 0x50
[  437.356638] ata2.00: failed command: WRITE SECTOR(S)
[  437.356783] ata2.00: cmd 30/00:fe:12:97:00/00:00:00:00:00/e0 tag 0 pio 130048 out
[  437.356805]          res 50/00:00:0f:98:00/00:00:00:00:00/e0 Emask 0x202 (HSM violation)
[  437.357034] ata2.00: status: { DRDY }
[  437.357216] ata2: soft resetting link
[  437.522457] ata2.00: configured for PIO0
[  437.522623] ata2: EH complete
[  437.576349] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  437.576484] ata2.00: ST-ATA: DRQ=0 without device error, dev_stat 0x50
[  437.576604] ata2.00: failed command: WRITE SECTOR(S)
[  437.576750] ata2.00: cmd 30/00:fe:12:97:00/00:00:00:00:00/e0 tag 0 pio 130048 out
[  437.576772]          res 50/00:00:0f:98:00/00:00:00:00:00/e0 Emask 0x202 (HSM violation)
[  437.576999] ata2.00: status: { DRDY }
[  437.577183] ata2: soft resetting link
...

Offline bobert3316

  • Newbie
  • *
  • Posts: 10
Re: TC4.2- Corrupting Compact Flash Cards (HSM Violation?)
« Reply #1 on: March 21, 2012, 08:21:46 AM »
If anyone ever has this problem, forcing 16-bit IO seems to help.  Try hdparm <device> -c0 before mounting the device as writable.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 4572
    • My Community Forum
Re: TC4.2- Corrupting Compact Flash Cards (HSM Violation?)
« Reply #2 on: March 21, 2012, 08:28:02 AM »
What is about TC 4.4 ?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Gawron

  • Newbie
  • *
  • Posts: 11
Re: TC4.2- Corrupting Compact Flash Cards (HSM Violation?)
« Reply #3 on: July 14, 2013, 10:32:28 AM »
On 4.7 everything works correct.
Can you please help me with another concern. I don't want to write to much data to CF card to make it live longer.
I have CF card as hd in my PC with one partition for tce and my personal documents in separate folder. The system was installed from CD with installer. Most applications are installed as tcz optional. On exit options I check backup only when I make important changes to my home folder, program configurations etc. My data goes to this separate folder. Do I have to worry about /etc/fstab. Should I change it from relatime to noatime on my partition, and how to change this? With cp /mnt/sda1/data/myfstab /etc/fstab in /opt/bootlocal.sh. Should I make other changes to the system to reduce writes to the card?


Offline Gawron

  • Newbie
  • *
  • Posts: 11
Re: TC4.2- Corrupting Compact Flash Cards (HSM Violation?)
« Reply #5 on: July 14, 2013, 11:44:32 AM »
Thank You gerald_clark for your help.
Does it makes any sense to add noswap option to extlinux.conf when I have no swap partition on my card?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 3067
Re: TC4.2- Corrupting Compact Flash Cards (HSM Violation?)
« Reply #6 on: July 14, 2013, 12:00:20 PM »
No need for noswap if you have no swap partitions.