#371944 - 14/05/2019 02:55
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
This is super cool that you're figuring this stuff out! Thanks so much for poking at this!
Do you think that the caching issue is inherent to that brand of SSD, and that we simply should pick a different brand if we want EmpegUpgrade.exe to work with it?
I'm not sure if the older problems (the ones we worked through in that older thread, on that older KingSpec drive) were the same problems or not. But somehow you were able to work through it, and now I have a drive that's working really well in the empeg, thanks to your help. So there's certainly a solution to be had here, even if it involves issuing a lot of console commands. I'm glad you've found the root cause!
|
Top
|
|
|
|
#371945 - 14/05/2019 03:07
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
For now, I'm just guessing that the builder is failing due to drive caching. But really, I'd also expect it to fail for some mechanical drives (with large caches) too. So not 100% sure.
What I'm trying now is simply disabling the "sys_reboot()" call in the Linux kernel within the .upgrade file. So the builder can work as-is, but it simply won't be able to reboot by itself. If this fixes the problem, then yeah, a caching issue. If not, then.. something else is wrong?
We'll see.. pumping hda5 right now..
EDIT: Well, so much for that theory. A manual reboot after applying the .upgrade still fails randomly. I'm going to look for a mechanical drive to test with, just to validate the setup here.
When I read-back from the failed /dev/hda5 partition on my PC, it is not corrupted, and the contents match what should be there. So.. why no workie???
Edited by mlord (14/05/2019 03:15)
|
Top
|
|
|
|
#371946 - 14/05/2019 03:20
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
|
Cool. I almost bought one of those a month ago. Glad I waited now. I'm still planning to get one, just was a little short on cash at the time.
_________________________
~ John
|
Top
|
|
|
|
#371947 - 14/05/2019 03:20
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
When I read-back from the failed /dev/hda5 partition on my PC, it is not corrupted, and the contents match what should be there. So.. why no workie??? Very confusing. File-by-file comparison between what got written to hda5, and what should have been written: no differences (but there are differences in the binary contents of the partition, weirdly enough). But if I then manually "pump" hda5 onto the drive from my PC, without changing anything else, the builder then works when re-inserted onto the empeg. Screwy. This is with the exact same binary image that is normally part of the .upgrade file.
Edited by mlord (14/05/2019 03:23)
|
Top
|
|
|
|
#371948 - 14/05/2019 03:27
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
One possibility? The .upgrade file gets a gzip'd copy of hda5 to keep the size down, whereas when I manually "pump" it on Linux I am using gunzip to decompress it rather than whatever the empeg uses.
Possible bug in the unzip library used by "pump"? Or perhaps an incompatibility with the gzip I'm using to compress it in the first place?
But then it should also fail on any drive, not just this one. I really have to find another PATA drive here.. turfed most of them last year.
Factory builder image also fails. So probably not that.
Edited by mlord (14/05/2019 03:46)
|
Top
|
|
|
|
#371949 - 14/05/2019 04:09
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Well, no idea at this point. It is something going wrong within the closed-source MS-Win upgrader and/or the closed source "pump" tool in the initrd.Too bad. No major hardship though, as Roger has proved it's pretty quick and easy to do the equivalent operations by connecting the drive to a Linux PC. And for me at least, that's going to be way easier than dusting off my 2008 laptop with the Win98se VM inside it. Cheers
Edited by mlord (14/05/2019 11:59)
|
Top
|
|
|
|
#371950 - 14/05/2019 04:48
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Note that despite ordering a Kingspec 128GB drive, what actually arrived here was a Yansen 126GB drive, inside a Kingspec box.
The more I write to it, the slower and slower it seems to get. Not anything the empeg itself would ever notice, but it just doesn't seem as good as the 64GB (real) Kingspec drives I have used before.
RMA-ing it now.
|
Top
|
|
|
|
#371951 - 14/05/2019 10:32
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 18/01/2000
Posts: 5683
Loc: London, UK
|
Dunno how "pump" works (that "bootloader protocol" thing I asked about earlier) It's in emptool, specifically in lib/protocol/upgrader.cpp. The complicated bits are in lines 445-516 in my copy. I considered rewriting it in (e.g.) Python, but it was getting late, so I just ordered a USB-mSATA adapter instead.
_________________________
-- roger
|
Top
|
|
|
|
#371952 - 14/05/2019 12:02
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Thanks, Roger. Having thought about it more overnight, and looking at some data dumps I took before repacking the drive for return, the evidence points strongly at the Yansen SSD itself. I see large swaths of good data on the drive, interspersed with the odd 32-byte chunk here and there that has 4-8 bytes in a row of WRONG data. This suggests the drive firmware is buggy in PIO modes. When I write to it from the PC, UDMA is used instead of PIO, and that works just fine (if not a bit slow). So.. Run away quickly from "Yansen" brand SSDs. And avoid any that have the SM2236XT controller chip. Back to hunt for real Kingspec drives now.. EDIT: Found a 1.8" form factor with 44-pin IDE/PATA connector: https://www.amazon.ca/gp/product/B0099395FA/Ordered, should be here tomorrow. We'll see if it works correctly or not. Otherwise, modern fast CF Cards remain a good alternative, as does Roger's mSATA solution. EDIT: And for that matter, even these suspect Yansen drives might still work just fine so long as all of the formatting and file copying is done from a PC. The empeg itself would still have to build/write the database files, but from the dumps I looked at the corruption only seemed to happen after a long stretch of sustained writing. So the relatively small database files might write out just fine. I wonder if this has anything to do with the misaligned partition table (SSDs very much prefer 4096 byte alignments, whereas default partition tables of the era only gave 512 byte alignment).
So if I had some of the Yansen drives, and couldn't RMA them, that's how I'd treat them: do all of the setup from a PC.
Edited by mlord (14/05/2019 13:02)
|
Top
|
|
|
|
#371953 - 14/05/2019 17:29
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Wow, such awesome sleuthing. I'll see about setting up a Yantzen drive from a PC using Roger's instructions: http://blog.differentpla.net/blog/2004/03/25/formatting-an-empegs-hard-disk-manuallyMostly for academics; I wouldn't feel safe about keeping the drive, based on some of the things you said about bad data issues on your drive. Soon, I'll work out how to get write access to the FAQ/Diskupgrade files in their new location and I'll make sure to update the instructions with that information. Thanks so much!
|
Top
|
|
|
|
#371954 - 14/05/2019 17:42
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Now that you are becoming a bash expert, you could also look at how the bigdisk builder does things too. I think Roger's experience initially began with that. #!/bin/sh
## This is from builder_bigdisk_v3.upgrade
log() {
echo "$1"
echo "POPUP 9999 $1" > /proc/empeg_notify
}
failed() {
log "$1 failed"
/bin/swapoff /dev/hda3
/bin/swapoff /dev/hda6
sync
exec /bin/bash --login
}
makedrive() {
dev="/dev/$1"
log "Making $1 filesystem"
/bin/mkfs.ext2 -v -s 1 -i 131072 -m 0 $dev || failed "mkfs $1"
log "Tuning $1"
/bin/tune2fs -c -1 -i0 $dev || failed "tune2fs $1"
/bin/sync
/bin/sync
log "Mounting $1"
/bin/mount -n -o rw,nocheck $dev $2 || failed "mount $1"
/bin/sync
/bin/sync
log "Making directories"
/bin/mkdir $2/fids || failed "mkdir /fids"
/bin/mkdir $2/var || failed "mkdir /var"
echo "[hijack]" > $2/var/config.ini || failed "config.ini"
log "Remounting ro"
/bin/mount -n -o remount,ro $dev $2 || failed "remount"
/bin/sync
/bin/sync
log "$1 completed"
}
# echo everything to the serial console:
#set -x
/bin/mount -n /proc
log "Builder image"
DRIVE1=""
if [ -e /proc/ide/hdb -a -e /proc/ide/hdc ]; then
log 'hdb,hdc both exist?'
exec /bin/bash --login
fi
[ -e /proc/ide/hdb ] && DRIVE1=hdb
[ -e /proc/ide/hdc ] && DRIVE1=hdc
/bin/mount -n -t ext2 -o ro,nocheck /dev/hda4 /drive0
if [ -d /drive0/fids ]; then
log "Drives already built"
else
/bin/umount /drive0
/bin/mkswap /dev/hda6
/bin/swapon /dev/hda6
/bin/mkswap /dev/hda3
/bin/swapon /dev/hda3
log "Tuning hda5"
/bin/tune2fs -c -1 -i0 /dev/hda5 || failed "tune2fs hda5"
makedrive hda4 /drive0
if [ "$DRIVE1" != "" ]; then
log "partitioning second drive"
init_drive /dev/$DRIVE1 || failed "init $DRIVE1"
DRIVE1="${DRIVE1}4"
makedrive $DRIVE1 /drive1 || failed "init $DRIVE1"
fi
/bin/swapoff /dev/hda3
log "Zeroing hda3"
/bin/cat /dev/zero > /dev/hda3
/bin/swapoff /dev/hda6
log 'Done!'
#log 'Testing disk..'
#/sbin/hdstress
fi
exec /bin/bash --login
|
Top
|
|
|
|
#371955 - 14/05/2019 17:45
Re: Replacement SSD?
[Re: tfabris]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
I wouldn't feel safe about keeping the drive, based on some of the things you said about bad data issues on your drive. I think it should be fine as a clone drive, where the cloning is done on a PC. Then insert it into an empeg and all should be good (until the next time one uses emplode, perhaps). The target market for these is older laptops that pre-date SATA drives. I have a couple of those here.
|
Top
|
|
|
|
#371957 - 14/05/2019 18:21
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
all should be good (until the next time one uses emplode, perhaps). Yeah, I would usually want a fully-functioning empeg, with the ability to add tunes via Emplode. The other option is to drop the idea of a 2.5" form factor altogether, and use a CF adapter as you (and others) have suggested in the past. Do you have a current recommendation for which CF adapters are good to use in the Empeg? (For example this one?) Thanks for the bash script! I'll look at that! You're saying the builder image just sticks a bash script in flash memory and runs it from there?
|
Top
|
|
|
|
#371958 - 14/05/2019 19:29
Re: Replacement SSD?
[Re: tfabris]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
The other option is to drop the idea of a 2.5" form factor altogether, and use a CF adapter as you (and others) have suggested in the past. Do you have a current recommendation for which CF adapters are good to use in the Empeg? (For example this one?) Not that one -- it has a desktop drive style 40-pin connector. But pretty much any of them with a 44-pin 2.5" drive connector on them should work --> no electronics involved other than a 3.3V regulator. The CF cards _are_already_ native IDE/PATA by design. You're saying the builder image just sticks a bash script in flash memory and runs it from there? That script _is_ the bigdisk builder. Plus a little bit of minor other stuff in the .upgrade file (flash partitions) that the emplode/upgclient re-flashes each time --> mostly unnecessary, but it does include the Hijack kernel zImage file, and the upgclient also creates the basic drive partition table. The script, and supporting libraries/binaries, are written by the upgclient to /dev/hda5 (root partition), and then the builder reboots into that system to run the script to do the rest.
Edited by mlord (14/05/2019 19:35)
|
Top
|
|
|
|
#371959 - 14/05/2019 19:34
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
|
Top
|
|
|
|
#371960 - 14/05/2019 21:27
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Not that one -- it has a desktop drive style 40-pin connector. It had both desktop-40 and laptop-44 pin connectors. Hard to see the laptop one in its main photo. The CF cards _are_already_ native IDE/PATA by design. Super useful information. I don't think I'd realized that before. Thanks! Thanks for the details of how the builder works under the hood!
|
Top
|
|
|
|
#371961 - 14/05/2019 21:28
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Thanks for the links to CF adapters! I'm going to try one.
|
Top
|
|
|
|
#371962 - 14/05/2019 22:05
Re: Replacement SSD?
[Re: tfabris]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
It had both desktop-40 and laptop-44 pin connectors. Hard to see the laptop one in its main photo. Ah, right. I still would not pick that one, as it seems overly cluttered with extra components, when all that is needed are simple copper traces from 44-pin connector to CF connector. Plus a master/slave jumper. Cheers
|
Top
|
|
|
|
#371964 - 15/05/2019 13:18
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Good luck with that. It looks like it should be the simplest "drop in" replacement method. Meanwhile, I'm also trying a different approach. A while back I purchased a bunch of CAD$30 SATA SSDs, 120GB HP M700s. These are plenty cheap enough to experiment with, so I opened one up and as expected found a very small SSD circuit board inside. Barely larger than a CF Card, except much faster and cheaper! The HP drive isn't widely available, but Kingston markets a very similar $25 SSD, as do other brands now. So.. combine that with an IDE-to-SATA-drive adapter, and we could have a very nifty empeg drive replacement. But.. gotta try it, and find a suitable IDE-to-SATA adapter. Eg. Perhaps one of these: https://www.amazon.ca/QNINE-Laptop-Adapter-Convert-Parallel/dp/B074KVGDPQ/I have something similar to that on hand, so we'll see how that goes.. EDIT: Well, the empeg itself sees the drive, no problem. But "pump" doesn't seem to see it. This is different than the earlier issue. So now I'm manually copying my CF card onto the SSD (straight binary 32GB copy), and we'll see what happens with it after that.
Edited by mlord (15/05/2019 13:30)
|
Top
|
|
|
|
#371965 - 15/05/2019 14:11
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Well, the SATA SSD doesn't work on the empeg using the IDE-SATA adapter I have at hand.
Pity. Dunno if I want to waste anything trying other adapters before giving up on that approach.
|
Top
|
|
|
|
#371966 - 15/05/2019 18:48
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
|
_________________________
~ John
|
Top
|
|
|
|
#371967 - 15/05/2019 20:22
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
That drive arrived here just a few minutes ago. Fired up the bigdisk builder (v6) a couple of minutes ago, and now the builder image is running from the drive formatting everything else. EDIT: Done! Installing v3a11 software onto it now.
Edited by mlord (15/05/2019 20:25)
|
Top
|
|
|
|
#371968 - 15/05/2019 20:43
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
We have had a winner! The 1.8" Kingspec IDE/PATA drive I found on Amazon Canada: https://www.amazon.ca/gp/product/B0099395FA/Builder (v6) worked without fuss, and I then installed the v3b11+Hijack .upgrade over that, again totally fuss-free. The drive even has screw holes for mounting, two of which match the empeg's drive sled. I suppose I might order a second one for here, while they're still available.
EDIT: Drive/firmware identification data below. One difference between this one and the fake Yansen drive, is no mention of the "Security Mode feature set" on the genuine article (below). Another difference is that the Yansen drives are native SATA (not PATA), but with a conversion chip onboard. The SATA settings also show up in the drive identification data for those, but not for the genuine Kingspec.Also, jumper settings are documented, and it WANTS the jumper in place for MASTER (opposite of the diagram we found earlier). ATA device, with non-removable media
Model Number: KSD-PA18.6-128MS
Serial Number: 986110xxxxxx
Firmware Revision: 20131216
Standards:
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 16383 16383
heads 15 15
sectors/track 63 63
--
CHS current addressable sectors: 15481935
LBA user addressable sectors: 247975936
LBA48 user addressable sectors: 247975936
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 121082 MBytes
device size with M = 1000*1000: 126963 MBytes (126 GB)
cache/buffer size = 1 KBytes (type=DualPort)
Nominal Media Rotation Rate: Solid State Device
Capabilities:
LBA, IORDY(can be disabled)
Standby timer values: spec'd by Vendor, no device specific minimum
R/W multiple sector transfer: Max = 1 Current = 1
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
* Power Management feature set
Write cache
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* 48-bit Address feature set
Mandatory FLUSH_CACHE
FLUSH_CACHE_EXT
HW reset results:
CBLID- above Vih
Device num = 0
Checksum: correct
Edited by mlord (16/05/2019 15:52)
|
Top
|
|
|
|
#371969 - 15/05/2019 20:50
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
Stock permitting at Amazon, I am willing to purchase extra drives to bring with me to the Cambridge meet, for anyone who will be there that wants one. Individually tested, with free shipping! But the return policy sucks! EDIT: Mmmm.. I don't see this drive on Amazon USA, nor on Amazon UK, and in Canada there is only one (1) left in stock at the moment. I think I'll just grab it. Grabbed. Now Currently unavailable.
|
Top
|
|
|
|
#371972 - 15/05/2019 21:55
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
I've now used my Linux PC to copy over 27GB of tunes directly to the new SSD (much quicker than doing through the empeg itself) and it's now running and playing nicely from the new drive.
So.. pity there aren't more of these out there, but I imagine that a modern fast CF Card with a passive adapter would do just as well.
|
Top
|
|
|
|
#371974 - 16/05/2019 03:54
Re: Replacement SSD?
[Re: mlord]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
I'm currently playing with a CF adapter and a 128gb CF card, and I noticed something interesting.
My Drive Upgrade tinstructions currently say that, when applying the "Builder" to format a new drive, as soon as EmpegUpgrade.exe said it was done, then, it was done and I could pull the power.
Well, maybe that's wrong.
With both this CF card and with the Yansen drive, after EmpegUpgrade.exe said it was finished, I connected to the serial port and a bunch of numbers were flashing by. I thought the numbers flashing by were maybe the stress test. So on the Yansen drive, after seeing those numbers, I pulled the power.
But, looking closer on this CF card, I see that it really says "Writing Inode Tables" and then the numbers are flashing by. After a short wait, it said "done" and then said "Writing superblocks and filesystem accounting information:" And then nothing after that for a while.
Is there is a chance that my problems with the Yansen drive were that I simply didn't let that builder process finish?
|
Top
|
|
|
|
#371977 - 16/05/2019 10:55
Re: Replacement SSD?
[Re: Roger]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14495
Loc: Canada
|
There is a chance there, yes. But the Yansen drive I had here had much, much deeper issues than that.
During all of the testing I did here this week, when EmpegUpgrade.exe said it was "done", I then transfered the serial cable over to my Linux box and used it to see what state the empeg was really in, before pulling power. The Yansen drive often was indeed "scrolling numbers" by, but those numbers were crash messages happening over and over due to bad data from the drive.
With the BigDisk Builder v6 at least, any "premature ejection" should be curable by just powering on the empeg again -- the builder image installed in the empeg will always run again after each power on, regardless of drive state.
The recommended BigDisk builder v6 at least does NOT include any stress test at the end.
|
Top
|
|
|
|
|
|