Why file content is not remain after unmount a drive in linux?

0

I wrote a script on bashrc.cmd from my windows 10 to activate my virtual environment automatically. I pointed the path of bashrc.cmd into AutoRun according to this post.

bashrc.cmd

@echo off
CD dev-env\Scripts && activate.bat && CD .. && CD ..
SET APP_SETTINGS="config.DevelopmentConfig"

The script was running well with --

CD dev-env\Scripts && activate.bat && CD .. && CD ..

I stacked and completely unable to do anything on my windows 10 for the following lines of code [especially for start line] --

@echo off
REM CD dev-env\Scripts && activate.bat && CD .. && CD ..
start "" /D "\dev-env\Scripts\" /B activate.bat
SET APP_SETTINGS="config.DevelopmentConfig"

I reboot my machine and trying to edit with bashrc.cmd from my linux os. I was unable to edit this bashrc.cmd script due to the fact of mount - unmount and Read Only. Then I followed this post and able to change successfully [keeping the previous script].

Problem

The bashrc.cmd file does not remain as updated when I unmount and remount again. So, how do I change the content permanently even after unmount?

testuser

Posted 2018-09-14T12:11:59.150

Reputation: 115

Answers

0

Well, the problem was a bit tricky which is directly linked with mount / unmount. Let's first check the list of available drives in a machine --

sudo fdisk -l
lsblk

You may get sdXY (X = a, b, c ... and Y = 1, 2, 3 ...). I was tried mount on with --

sudo mount /dev/sda8

I got an error like this --

Unlike in case of  read-only  mount,  the  read-write  mount  is
denied  if  the  NTFS  volume is hibernated. One needs either to
resume Windows and shutdown it  properly,  or  use  this  option
which  will  remove  the  Windows hibernation file. Please note,
this means that the saved Windows  session  will  be  completely
lost. Use this option under your own responsibility.

I just shut down windows pc before login into it. After that, I boot my pc with linux and remove bashrc.cmd file. Now my pc is now working from boot sides. Have a look at this post for better understanding.

testuser

Posted 2018-09-14T12:11:59.150

Reputation: 115