sciClops - File Transferring Conclusions

File Transferring - Wrap Up

Recap
Over the past week the system was connect and Linux was able to boot off the embedded board. The console, via the serial port, was accessed with HyperTerminal on a desktop. The network configuration was also setup with Apache and the board was working as a web server. After navigating to the /www/apache/htdocs/ folder, the index.html file was altered with meta tags that would re-direct any client to the Scimatic Software Homepage.

Expectations
Currently the only file changes are of the form of edits to the index page using the vi text editor on the serial console. It would be beneficial to learn other means to make such changes. This week's the goal is to be able to log onto the server and perform file transfers. The board is equipped with a compact flash port which is going to be used to for the following:
1. Copy a file from PC to the Compact Flash Card via card reader.
2. Copy that file from the CF Card to strata flash via the Linux console.
3. Use FTP to download that file back to the PC via the network.

Results

Copying Files to the CF
Using the card reader provided and my host PC, I tried to copy over an html file to the CF card. However windows refused to write to it until it was properly formated. So when windows prompted to format the CF card, I accepted. This would turn out to be a mistake. Since the root file system was sitting on the strata flash chip, and the CF card was essentially an IDE hard drive, I didn't expect any problems to arise by formating the CF in windows.

The Problem
Unaware to me at the time, was that in order for TS-7200 sees the the compact flash card must use the ext2 format. If not, Linux doesn't give the CF a device node /dev/ide/host0/bus0/target0/lun0/part1. This was something different from my past experience with embedded linux systems.

The dilemma I was facing was that that window only works with the FAT format and Linux won't recognize the CF on the IDE if its is not ext2. I had to back paddle and get the CF card back into the EXT2 format. There aren't any EXT2 formatters for windows, so even thought windows was the only OS that could see the CF by this stage it couldn't help me do anything with it. Linux was my best bet to recover from my mistake. So I used a Live CD version of Linux on my host PC called Linux From Scratch (LFS). I plugged in the card reader with the CF card. The live version of Linux recognized it, so I was able to continue.

The Fix
While I had access to the fdisk on the CF I decided to partition the CF, one formatted in EXT2 and the other in VFAT. I was hoping that by marking the partitions in some combination of primary and extended, I would be able to have the VFAT partition accessible in windows, and both and EXT2 and VFAT partition accessible in Linux(because Linux is capable of seeing both). All my attempts turned out to be unsuccessful. In the end I removed all partitions, and formated the CF in EXT2. I suspect that it might be some BIOS configuration that prevents the CF from being recognized if it is not fully in the EXT2 format. But that is project for another time.

What I Should Have Done
This brought me back to square one, where I was at the beginning of the week. The problem still being that the CF must be formatted in EXT2 , and Windows not reading/writing to anything that is not in FAT format. So unless you want to do everything on your host PC in Linux, just to avoid this file I/O problem, I suggest the solution I found. I installed drivers I found called Ext2 IFS from http://www.fs-driver.org/

With that I was able to copy files from my Host PC to the CF card, then move the CF card to the TS-7200, and then copy the file over to the root file system on the strata flash.

What's Left To Do
The final task for this week's goals was to FTP that same file from the Apache Server back onto my Host PC over the network. Upon further research and investigation on Apache, it appears that Apache is mainly an HTTP server. There is some work being done in adding FTP functionality to it but seems still relatively new (at the time of this article). I'd prefer to use the ftp daemon that comes with TS-Linux.

That's all that I was able to complete for this week. I'll leave the FTP configurations for the tasks to be done for next week.

Posted In

Reply

The content of this field is kept private and will not be shown publicly.