with bit of digging over the internet I managed to fix the problem by remounting the root partition "/"
so here is what you can do if you land in such a situation.
- Gain superuser priveleges:
sudo su - - remount the root partition
mount -o remount,rw /
Today I landed in a situation when my raspberry pi landed in non-root login terminal at boot time with read only file system. with bit of digging over the internet I managed to fix the problem by remounting the root partition "/" so here is what you can do if you land in such a situation.
Thats it and your system should boot by now.
0 Comments
Okay, this is just a short post, I just cannot hold myself to share this useful command awk .
let say you want to delete all docker images with name none. here is how you would do it. docker images -a | grep "<none>" | awk '{print $3}' $3 select the 3rd column of the table dumped on terminal if you run docker images command . which is Image Id. And now since you have image id you can remove them all together like this: docker rmi `docker images -a | grep "<none>" | awk '{print $3}'` Likewise what if you want to unmount the drive from USB if you run df -h the first column is the mounted device, so to select that we would do awk '{print $1}' and unmount sudo umount -f `df -h | grep "pattern/disk name" | awk '{print $1}'` thats it. pretty useful.
I am tech savvy guy fond of using terminal for everything, the only time I come out of using command line interface is when I have to browse internet . I even create remote repo on GitHub from command line . Coming to the subject of the post. I have a local network setup at home that serves for NAS storage I have connected to Raspberry pi.
So sometimes I download stuff from my macbook instead of downloading on the raspberry pi, and in that case I transfer files from my macbook using rsync a really handy utility that comes bundled . just run rsync with source and target flag in addition to the following flags . rsync -rv -h -t -P -o pi --bwlimit=1000 local/source/directory/or/file target@IP:/path/on/remote/directory/ my favourite flag in above is -P which will give you progress of the transfer and an estimate time. and second favourite is --bwlimit which is handy if you do not want to choke up the network. you can also chooser to get rid of source file by using the --remove-source-files flag however I recommend it should be used -a .rsync -a source destination - I let it run once, run it a second time to confirm all the files are moved over and consistent. By default rsync only checks size and time to determine if a copy is needed, if you want to be really safe you should tell it to use checksums (-c) Safety is in non destructive processes. Don't delete until you know its all there. Another utility I would like to talk about here is iperf
iperf is used for measuring the LAN bandwidth, on the server side you can run iperf -s and on the client side run the command iperf -c server-IP -d and it will dump the file transfer rate supported.
After having walked miles learning from people I met of different societies and culture, I have decided to be quite, calm and move on, passing on with a gentle smile on my face expressing an agreement with onlookers for their righteousness that they believe so.
But the story behind the scene is different. Not quite a bit but absurdly different I believe it is difficult to comprehend. Because what I believe is not what you believe in. We both have come to a conclusion of a reality that satisfies our belief. Not the actuality. Belief is not just something that only humans picture to reality, animals to believe what picture they precirve and environment the live and circumstances they go through.
The origin of what wefeel lies deep within our desires. Desires are the drugs that move us from one step to the next and with every step the success experienced is rewarding that we feel driven to take the next step and seek the excitement to our nerves.
So what we do, may it be good or bad ultimately becomes part of our habit and the habits form the repetition cycle. I have observed that it is the nature of biological beings (and most probably at molecular levels or maybe really law of nature) to what we feel strongly driven in is actually half of the next step already taken. Taking steps to fulfill desire that meets our expectation already seems so fulfilling the joy within starts to show you a blur picture. A joyfull rewarding experience. And this picture slowly engraves in the neuroplastic brain with formation of more complex neural network. Each action you perform, words you speak will form benchmark of success from previous steps (a lived experience) will always be less harder because by now even your brain knows what to do to succeed. Now I would like to repeat myself, every fulfilling step that meet replenishing desire is easier than before. And now this is what traps us. And this trap is our belief. And our belief is guarded by nothing just what makes us happy. A small picture of reality formed of the world we live in. To some people eating non-veg feels okay, to some cheating or lying is ok, to some sticking to honesty , discipline or organised is ok and to some violence is the way and to some negotiation by peace seems be the only way. You may think whatever you do is right from your perspective but this is partial truth because what we do is the hard wired neural network formed of a self rewarding gene of selfishness we all posses. You become "used to". I believe this is the saddest thing to say. Because unwillingly you have given up your actually right norm to a what now seems right to you.You are either driven by your belief or by the belief of others. You have become slave of a belief. And you tend to end up living a belief that may not be true. This is an instance in which logical reasoning is superseded by belief. Even if you do what is logically not right will always seems right to you.
What we (you and me) settle to live believing is mere construction of the neural circuit that has shaped inside of our brain. Our brain is composed of 80 to 100 billions of neurons forming a neural network of 1000 to 10,000 synapses or connections. i.e 100 trillions neural connections in human brain. (I am not making it up, I have stumbled through pages of books on nueroscience).
It was in 2014 when neuroscientists engaged in a reconciliation of critical-period studies with the more recent research showing how the brain can, and does, change in response to hitherto unsuspected stimuli. Our belief is merely part of neural circuit formed in the neuroplastic brain inside of our head. Not the belief but maybe the nature of belief and probably lot other things gets embedded as instructions into our DNA which further becomes part our genetic material that we pass to next generation of reproducing naturally.
So remember you are an outcome of a belief, and the belief posses you. It is impractical and incorrect to say one may not have belief because without belief no reality form the picture of our perception would ever exist. Because "eyes see only what our mind is prepared to comprehend" - French philosopher Henri Bergson
There is no message as I am not and obviously won't be dictating to any one what should be right to do because by now you must have understood that your belief living inside of your head is controlling your actions, behaviour and what you say, that will ultimately decide your fate.
cheers (y)
So you might be thinking what is nodemcu - NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module.
I have been playing with microcontrollers for quite some time now. At home in Bangalore I have a automatic plant watering system setup. This week I was on vacation back in my hometown. I already wanted to do some automation, so before I started journey from bangalore I ordered NodeMCU V1.0 Amica Rev.2 which is ESP8266 based wifi microcontroller. So I spent some time hooking up main lines with the nodemcu which is connected to relay board and DHT11 shown below.
before I connected the wires coming out from relays I spent quite a good amount of time to write code that would display temperature , humidity and buttons to turn on/off lights and fan.
For programming microcontroller I used cpp and for front end I used HTML and pure JS. The cpp parts connects the nodemcu to wireless network at home. So this gives nodemcu an IP address which we can navigate to open a page displaying temperature, humidity and two buttons for lights and fan in room. I also programmed microcontroller to return data in json format, so that I can use Ajax call on the page to update data displayed asynchronously. Unlike ethernet shield I used in plant watering system that creates server object of Ethernet class provided by the Ethernet library for Arduino, nodemcu uses ESP8266 wifi controller for which I used ESP8266WebServer class to created server object at port 80.
Have a look here at the GitHub repo where I am keeping my code.
now after coding I hooked the wires from relay to the switches and there it is. Powered NodeMCU with adapter and now I can access the webpage with temperature humidity and buttons to turn on/off light and fan of my room from any phone at home or over the Internet.
have a look at the page that gets rendered of nodemcu use to display temperature, humidity and control lights and fan
|
Custom Search
Other Blogs & PagesGit Commands Animation & VFX SitesA MUST READ for Ani/VFX Artistsawakened by thoughts,
|