CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] Accessing the root account via Docker

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 27, 2016, 04:47
Default Accessing the root account via Docker
  #1
New Member
 
Join Date: Dec 2016
Posts: 6
Rep Power: 9
garumple is on a distinguished road
Hi,

I am having some issues trying to mount storage located outside the default workingDir path on a Windows 10 OF installation. Storage limitations prevent me from storing my project in "My Documents". In order to mount the new Virtualbox shared drive, I need to access the root account.

It isn't as simple as using 'su', as I don't know the password.

If I open the Virtualbox instance, it gives me a root account, I can change the password - but it doesn't affect the OF instance at all. This is obvious when listing users (cat /etc/passwd), as "ofuser" is not listed. I can see the Virtualbox share I am interested in from here.

I can log into root by starting a new docker instance (docker run -i -t of_v1606plus_centos66_win /bin/bash), but these changes do not seem to apply to the current instance of OF. I can't see the Virtualbox share here.

Additionally, I have tried using a Windows 10 symbolic link, but CentOS crashes complaining of too many levels of symbolic links.

Is there a way of accessing the root account, or some magical way I can mount another windows partition?
garumple is offline   Reply With Quote

Old   December 27, 2016, 15:35
Default
  #2
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
Hi ,
The root password is 0fuser2016 . However you cannot mount the directory in this way. I will send detailed instruction and script tomorrow.

Thanks
pgh
pgh is offline   Reply With Quote

Old   December 28, 2016, 08:50
Default
  #3
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
To access other drive , new scripts is needed and which will create a new container. Please download tar file from following location .

I have attached a tar file which has 4 files in it .
https://ftpbox.esi-group.com/?u=Nwpg...th=/window.tgz


What you need to changed
i) Open the Virtual Machine and then close the default which is running



ii) Go to setting and add new drive which you want to share. As shown in attached image

i shared new drive E i.e e:\ to e/ folder in virtual box . Please do same with your drive



iii) Open the file of_start_container.ps1

and edit 4th line

docker-machine.exe ssh default "sudo mount -t vboxsf -o uid=1000,gid=50 e/ /root/../mountedDrive
(This is used by me . You need to replace e/ with your drive name (see attached image i.e for me e/ e:\ i.e e:\ is my directory which i mount)





Launching and creating container.

i) Click on the create_OF_plus.bat and it will create a new container

Close the terminal when process end

ii) Click on the startOF_plus . It will open container and now you can see two folder there
workingDir_mounted and workingDir . You need to use this script to launch openfoam .

You can click it multiple times and it will open the new terminal and you can work in multiple terminal with openfoam environment set.
Attached Images
File Type: png VirtualBOX.png (60.7 KB, 35 views)
pgh is offline   Reply With Quote

Old   December 28, 2016, 18:36
Default
  #4
New Member
 
Join Date: Dec 2016
Posts: 6
Rep Power: 9
garumple is on a distinguished road
Thank you pgh - this worked perfectly!
garumple is offline   Reply With Quote

Old   January 30, 2017, 09:10
Default
  #5
Member
 
Chia
Join Date: Jan 2016
Location: Singapore
Posts: 30
Rep Power: 10
chia87 is on a distinguished road
Hi pgh,

Im having the same problem, and I tried clicking the link to log in to download the file, but could not access the link due to invalid password https://ftpbox.esi-group.com/?u=Nwpg...th=/window.tgz

Could you assist again, thanks in advance for any help
chia87 is offline   Reply With Quote

Old   February 2, 2017, 06:04
Default
  #6
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
Quote:
Originally Posted by chia87 View Post
Hi pgh,

Im having the same problem, and I tried clicking the link to log in to download the file, but could not access the link due to invalid password https://ftpbox.esi-group.com/?u=Nwpg...th=/window.tgz

Could you assist again, thanks in advance for any help
Try this link
https://ftpbox.esi-group.com/?u=AR8E...fv1606plus.rar
pgh is offline   Reply With Quote

Old   September 26, 2021, 09:37
Default
  #7
New Member
 
Hosam Alrefaie
Join Date: Jul 2021
Posts: 24
Rep Power: 4
HosamAlrefaie is on a distinguished road
hi

how to access the folders where they have the source files of OpenFOAM in version of Windows-Docker. i want to add WSGGM model to absorptionEmission radiation submodels.
I got the WSGGM model files from:
https://github.com/arvindjp/OpenFOAM...rptionEmission
HosamAlrefaie is offline   Reply With Quote

Old   October 9, 2021, 05:22
Default
  #8
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by HosamAlrefaie View Post
hi

how to access the folders where they have the source files of OpenFOAM in version of Windows-Docker. i want to add WSGGM model to absorptionEmission radiation submodels.
I got the WSGGM model files from:
https://github.com/arvindjp/OpenFOAM...rptionEmission
If you are using the updated openfoam-docker methods (the openfoam.com version) than you need to have the "dev" or "default" image instead of the bare-bones "run" image https://hub.docker.com/r/opencfd/openfoam2106-dev

There you have all the source code etc.
However you cannot and should not be trying to add additional code into the docker image. Instead you should be taking the models that you cited and compile them as a user library. It means that you will subsequently need a "libs" entry in your controlDict later, but keeps your personal modifications outside of the OpenFOAM source tree, which means they will survive an upgrade.
olesen is offline   Reply With Quote

Reply

Tags
mount, root, windows


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] Docker vs Not Docker v2 AND installing editors into Docker u2berggeist OpenFOAM Installation 1 July 10, 2018 02:58
[OpenFOAM.com] root in openfoam docker jeremy rutman OpenFOAM Installation 3 October 24, 2017 07:31
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker rt08 OpenFOAM Installation 1 February 28, 2016 19:00
Environment errors with .deb install and ubuntu 13.04 64 bit jonathanbyrn OpenFOAM Installation 14 September 26, 2013 05:22
missing vtf3.h BPatch.h papi.h linch OpenFOAM Installation 41 July 24, 2012 14:45


All times are GMT -4. The time now is 15:55.