iHaveBlueHair Posted July 7, 2017 Share Posted July 7, 2017 I am experiencing an issue with mounting the storage (/root/udisk). Anytime I run "mount -o sync /dev/nandf /root/udisk", the Bunny mounts udisk correctly, but does not stay mounted. Every time I reload the Bunny, udisk is not mounted. I even wrote a shell script that automatically runs this command at startup (I tried all three in the highest rates response and crontab to no avail), and udisk does not mount. It has been included in /usr/bin so that I can run it without having to navigate to that specific directory with the .sh file, and that works too. I tried running this script as part of a Bunny payload, and it still will not mount as part of a payload either. I can only get udisk to mount by SSH or a Serial Connection to the Bunny. I am using the latest version. The kernel version from "uname -r" is 3.4.39 if anyone needs to know that. Any ideas on what is going on? If you need any more information, let me know. Thanks in advance, -iHaveBlueHair Quote Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted July 10, 2017 Share Posted July 10, 2017 You are correct, the udisk is unmounted everytime the Bunny turns off. Everytime it starts up you need to mount it again. I would presume this is so the ATTACKMODE module works correctly, making sure the STORAGE mode isn't automatically setup every time the Bunny boots. Sebkinne talked about this somewhere but I can't remember where (otherwise I would link it). Use arming mode or a payload with ATTACKMODE STORAGE in it to access storage correctly. Also try the commands "udisk reformat" or "udisk mount". 'udisk' is an inbuilt alias Sebkinne made so that you can do what you are explaining easily and with more success. Quote Link to comment Share on other sites More sharing options...
iHaveBlueHair Posted July 10, 2017 Author Share Posted July 10, 2017 Thank you for your reply. I tried "udisk mount" in the shell and it works just fine, but still will not work in a payload. Below is my exact payload I am attempting to run on switch 2. LED B #ATTACKMODE HID STORAGE #ATTACKMODE ECM_ETHERNET STORAGE ATTACKMODE STORAGE SERIAL sleep 2 LED Y udisk mount sleep 2 if [ ! -d /root/udisk/checkmount]; then echo "Error mounting udisk" > /var/myscripts/er.log LED R B else LED R G B fi Note: /root/udisk/checkmount is a test directory I made just to check for existence, implying udisk mounted correctly. The light also turns red right after yellow instead of finishing the rest of the script, which would end on magenta. Is my syntax wrong? I am new to bash/shell scripting. Thank you for your time, -iHaveBlueHair Quote Link to comment Share on other sites More sharing options...
iHaveBlueHair Posted July 10, 2017 Author Share Posted July 10, 2017 Edit: I figured out the syntax error, changed it, and now the script works properly. Quote Link to comment Share on other sites More sharing options...
Dave-ee Jones Posted July 11, 2017 Share Posted July 11, 2017 Rightio, glad to hear :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.