The 'simple' type of overlay does not work?

The 'simple' type of overlay does not work?

I have a software that want to install to mic node, since there are a lot of files need to be installed, I'd like to use the 'simple' type of 'overlay' to avoid the generating the .filelist configuration file.
But when I configured following overlay entry in the /etc/sysconfig/mic/mic0.conf, the generated mic0.image only has very small size and mic node cannot be booted from this ramdisk.
    Overlay simple /opt/intel/mic/mnt/opt/intel/mic/filesystem/overlay/test/ / on
Did I use the incorrect format for overlay configuration?
Is there a easy way for me to generate .filelist from a dir/file automatically?

Thanks a lot.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Your overlay description does look a little strange: I presume you've already studied the MPSS Boot Config Guide, a PDF included with the MPSS distributions?  It's a little sparse on syntax details but recommends looking at existing overlay declarations to see how to mimic them. And it appears that your descriptor above has two fields concatenated together, and then an extra field thrown in.  Given what you've specified, I would expect the correct syntax to look something more like this:

Overlay simple /opt/intel/mic/mnt  /opt/intel/mic/filesystem/overlay/simple.filelist on

Where  /opt/intel/mic/filesystem/overlay/simple.filelist represents the file list you've generated for your additions to the file structure.  /opt/intel/mic/mnt is strange place to hang your files.  I would expect for permanence that you would hang that somewhere more generic, but for the purposes of experimentation, it should work.  Also, you do not share even a fragment of your .filelist file to show how you are (presumably automatically) generating the dir and file descriptors needed to specify the files you want to add.  Of course, even if that file was a correct description, the incantation reported above would likely prevent its incorporation.  You can see how the MPSS service startup treated your overlay description by looking at the startup log, /var/log/mpssd.

Xiao,

You taught me something new today. I didn't know about the simple overlay. In going back to the documentation, as Robert suggests, I wasn't able to find an example of the overlay statement as it would appear in the configuration file, but I did find instructions on using the micctl command to set up an overlay like that:

micctrl --overlay=<type> --state=<on|off|delete> --source=<dir> --target=<target> [mic card list]

where <type> would be simple, <source> would be the name of the directory where the files are located on the host and <target> would be the directory where the files will be located on the coprocessor, not the host. So if you want files from the directory /home/myname/myfiles on the host to appear on the coprocessor in the directory /user/share/myproject, you would say:

micctrl --overlay=simple --state=on  --source= /home/myname/myfiles --target= /user/share/myproject mic0

Try that and see what happens.

By the way, mic0.image is a compressed zip file of a cpio archive. I'm sure there must be a simpler way to do this, but if I want to know what is in the file mic0.image, I do the following (from some directory other than /opt/intel/mic/filesystem):

cp /opt/intel/mic/filesystem/mic0.image mic0.image.gz
gunzip mic0.image.gz
cpio -t < mic0.image

Thanks for your reply

Following the doc that if the type of 'overlay' is 'simple', the --srouce is used to specify the source directory of files which need be copied to mic card. And --target is used specified the target directory on the mic card. I'd like to copy files to /, so I set it to /. My source files are put in the /opt/intel/mic/mnt/opt/intel/mic/filesystem/overlay/test.

One hit is the 'filelist' type of overlay works well on my system.

To add overlay:
    micctrl --overlay=simple --state=on --source=/opt/intel/mic/mnt/opt/intel/mic/filesystem/overlay/test --target=/
    
Then I can see following configuration line is added in the /etc/sysconfig/mic/mic0.conf
    Overlay simple /opt/intel/mic/mnt/opt/intel/mic/filesystem/overlay/test / on
    
I run micctrl to create the ramfs:
    micctrl --updateramfs mic0
        mic0: Generating static ram file system image /opt/intel/mic/filesystem/c902f04x33-mic0.image
        
But the new created ramfs size is very small:
    -rw------- 1 root root 29225 Sep 27 04:54 c902f04x33-mic0.image
    
The one which worked well:
    -rw------- 1 root root 24344059 Sep 27 00:05 c902f04x33-mic0.image

I'll try to extract files from ramdisk, but found the files from ramdisk will overwrite my system file ...

Leave a Comment

Please sign in to add a comment. Not a member? Join today