Disk image error

Skip to first unread message

Shamik Saha

Sep 27, 2015, 5:23:51 AM9/27/15
to gem5-gpu Developers List
 Currently I am using x86_64-vmlinux- as my kernel and the disk image has been taken from http://www.cs.utexas.edu/~parsec_m5/x86root-parsec.img.bz2 (renamed as x86root.img). 

My command line is : build/X86_VI_hammer_GPU/gem5.opt --outdir=/users/shamik/gem5-gpu/gem5/chkpt/backprop ../gem5-gpu/configs/fs_fusion.py --disk-image=x86root.img --kernel=x86_64-vmlinux- --script=/users/shamik/gem5-gpu/gem5/configs/boot/backprop.rcS

However, there is an error while mounting the disk images as shown in the terminal o/p:
mounting filesystems...
loading script...
/etc/init.d/rcS: exec: line 16: /tmp/script: not found

I have checked the disk image and rcS is :
echo "mounting filesystems..."
mount -a
mount -o remount,rw /dev/root /

echo "loading script..."
/sbin/m5 readfile > /tmp/script
chmod 755 /tmp/script

if [ -s /tmp/script ]; then
        exec /tmp/script

echo "Script from M5 readfile is empty, starting bash shell..."

However, the most confusing part is that /tmp/ is empty!!

How do I resolve this?

Joel Hestness

Sep 28, 2015, 10:53:15 AM9/28/15
to Shamik Saha, gem5-gpu Developers List
Hi Shamik,
  I don't know what might be going wrong. I'd recommend that you try loading your script by attaching a terminal to the running simulation and manually feeding it commands. You can use the m5term in gem5/util/term/, or telnet. I'd recommend searching the gem5 logs for how to attach the terminal.

  When you have the terminal running, call /sbin/m5 readfile, and see what it prints. If it doesn't print your backprop.rcS file, then the simulator is probably having problems finding the script. You'll have to play around to see what is going on.


  Joel Hestness
  PhD Candidate, Computer Architecture
  Dept. of Computer Science, University of Wisconsin - Madison

Shamik Saha

Sep 28, 2015, 12:58:52 PM9/28/15
to gem5-gpu Developers List, sahash...@gmail.com

Could you please tell the disk images and kernel that are known to work perfectly with gem5-gpu? Also, tell me where and what should I mount to the disk image. Moreover, how do I connect to m5term? I am not getting any port number while running the simulation.

Also, my backprop.rcS scriptsis as follows:


stop_m5() {
    /sbin/m5 exit


run_bench_test() {
    cd /benches/bin
    /sbin/m5 checkpoint
    /sbin/m5 resetstats
    #am start -W com.fsck.k9/com.fsck.k9.activity.Accounts
    /sbin/m5 dumpstats

#sleep 10


Joel Hestness

Sep 30, 2015, 1:48:15 PM9/30/15
to Shamik Saha, gem5-gpu Developers List
Hi Shamik,
  I don't believe there are any disk images that "are known to work perfectly" with gem5 or gem5-gpu. As the simulator changes and evolves, driver and library version constraints can be changed/introduced that upset whether Linux versions will boot and whether benchmarks will run. However, as far as I know, you should be able to boot with, mount, and explore most/all disk images that are publicly available. A lot of this involves trial and error, including booting Linux, and then connecting to the simulated system with a terminal to see what commands work, etc. Many of us have built our own disk images and have modified the way the simulator uses them.

  That said, I believe that both Linux (non-SMP), and should boot with x86 in both gem5 and gem5-gpu. The disk images available on the PARSEC M5 site should work to allow you to mount and look around on the disk. You should look at the system.pc.com_1.terminal output to verify that hda and/or hdb are recognized during the boot process.

  To connect a terminal to the running system, just build m5term (which I pointed you to previously), and run it with the command line parameter port that the simulator prints (usually 3456 for a terminal connection).

  Finally, I would strongly encourage that you spend more time searching the gem5 email list archives for your questions. Basically all of the questions you've asked here are answered in the archives, and if you can find it there, you won't have to wait for us to respond.

  Hope this helps,

Shamik Saha

Oct 6, 2015, 9:23:43 PM10/6/15
to gem5-gpu Developers List, sahash...@gmail.com
It turns out that /sbin/m5 is indeed printing the file but not executing it at all.


Mar 13, 2022, 3:56:11 PM3/13/22
to gem5-gpu Developers List

Did you find your answer?
if yes would you please tell me


Reply all
Reply to author
0 new messages