# Trouble with installation

**URL:** <https://forums.docker.com/t/trouble-with-installation/1256>\
**Category:** Boot2Docker\
**Created:** [April 9, 2015, 6:44pm UTC](https://forums.docker.com/t/trouble-with-installation/1256 "2015-04-09T18:44:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cartier](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@cartier](https://forums.docker.com/u/cartier)\
**Post date:** [April 9, 2015, 6:44pm UTC](https://forums.docker.com/t/trouble-with-installation/1256/1 "2015-04-09T18:44:46Z")

</div>

I am brand new to docker. Running into an issue where the start .sh script will not run. Rather than executing, it simply opens in notepad. I have followed the installation instructions meticulously. Re-installing didn’t help.

Using Win 7, boot2docker 1.5.0 from [https://github.com/boot2docker/windows-installer/releases/tag/v1.5.0](https://github.com/boot2docker/windows-installer/releases/tag/v1.5.0).

Any suggestions would be greatly appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![kizbitz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/kizbitz/32/335_2.png) [@kizbitz](https://forums.docker.com/u/kizbitz)\
**Post date:** [April 9, 2015, 8:08pm UTC](https://forums.docker.com/t/trouble-with-installation/1256/2 "2015-04-09T20:08:43Z")

</div>

Hi Cartier,

This sounds like any file with the **.sh** extension is set to open with notepad. You can fix this by:

- Clicking the start button and selecting **Default Programs**
- On the Control Panel \> All Control Panel Items \> Default Programs window that comes up, click the **Associate a file type or protocol with a program**
- In the list of file types you need to find and select the **.sh** extension
- After you’ve selected **.sh** - Click the **Change Program…** button in the top right
- You _might_ have the **sh.exe** program listed in the Recommend Programs section - If so, select it, click OK, Click Close, and you should be good to go
- If **sh.exe** isn’t listed you’re going to have to find it - Click the browse button and navigate to C:\Program Files (x86)\Git\Bin\ and select sh.exe - Click Open, Click OK, Click Close, then you should be set

Jerry

---

<div class="post-metadata">

**Author:** ![cartier](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@cartier](https://forums.docker.com/u/cartier)\
**Post date:** [April 9, 2015, 10:24pm UTC](https://forums.docker.com/t/trouble-with-installation/1256/3 "2015-04-09T22:24:16Z")

</div>

Thank you for the detailed explanation Jerry. That worked to run the file. Now I am getting the following error when running the file:

line 5: clear: command not found

Here is the content of my [start.sh](http://start.sh):

```auto
#!/bin/bash
set -e

# clear the MSYS MOTD
clear

cd "$(dirname "$BASH_SOURCE")"

ISO="$HOME/.boot2docker/boot2docker.iso"

if [! -e "$ISO"]; then
    echo 'copying initial boot2docker.iso (run "boot2docker.exe download" to update)'
    mkdir -p "$(dirname "$ISO")"
    cp ./boot2docker.iso "$ISO"
fi

echo 'initializing...'
./boot2docker.exe init
echo

echo 'starting...'
./boot2docker.exe start
echo

./boot2docker.exe ip

echo 'connecting...'
./boot2docker.exe ssh
echo

echo
echo '[Press any key to exit]'
read

```

---

<div class="post-metadata">

**Author:** ![kizbitz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/kizbitz/32/335_2.png) [@kizbitz](https://forums.docker.com/u/kizbitz)\
**Post date:** [April 10, 2015, 2:31pm UTC](https://forums.docker.com/t/trouble-with-installation/1256/4 "2015-04-10T14:31:48Z")

</div>

Hi Cartier,

Could you open a terminal (Click start, type **cmd** , and press enter) - then run the command: **echo %PATH%**

In the text that is printed out, is the path to **C:\Program Files\Boot2Docker for Windows** in the list?

If not you can add it by running this command in the terminal: **setx PATH “%PATH%;C:\Program Files\Boot2Docker for Windows”**

> Note: After adding that, you’ll need to close/reopen **cmd** before running **echo %PATH%** again.

If that path wasn’t there and you had to add it, does Boot2Docker run?

---

<div class="post-metadata">

**Author:** ![cartier](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@cartier](https://forums.docker.com/u/cartier)\
**Post date:** [April 10, 2015, 4:00pm UTC](https://forums.docker.com/t/trouble-with-installation/1256/5 "2015-04-10T16:00:46Z")

</div>

Hi Jerry,

That path was not there, so I added it. Unfortunately, I am still getting that same error when running Boot2Docker:

line 5: clear: command not found

---

<div class="post-metadata">

**Author:** ![kizbitz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/kizbitz/32/335_2.png) [@kizbitz](https://forums.docker.com/u/kizbitz)\
**Post date:** [April 13, 2015, 2:28pm UTC](https://forums.docker.com/t/trouble-with-installation/1256/6 "2015-04-13T14:28:41Z")

</div>

It seems like your install was corrupted. Do you remember any errors when you did it?

You could try to completely uninstall and the reinstall. Also, if you have any virus software running, you might disable it temporarily while you do the new install. - It could have possibly caused issues the first time.

---

<div class="post-metadata">

**Author:** ![cartier](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@cartier](https://forums.docker.com/u/cartier)\
**Post date:** [April 13, 2015, 10:14pm UTC](https://forums.docker.com/t/trouble-with-installation/1256/7 "2015-04-13T22:14:33Z")

</div>

Hi Jerry,

I successfully loaded on a different machine. However, now I am getting an error when running the docker run hello-world example image.

Ran the command: docker run hello-world

and got back this error:

```nohighlight
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
====

```

Any advice?

---

<div class="post-metadata">

**Author:** ![larrycai](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/larrycai/32/167_2.png) [@larrycai](https://forums.docker.com/u/larrycai)\
**Post date:** [April 15, 2015, 8:59am UTC](https://forums.docker.com/t/trouble-with-installation/1256/8 "2015-04-15T08:59:54Z")

</div>

It is due to the docker server is not started correctly

just restart the boot2docker vm or run `sudo /etc/init.d/docker restart`

In 1.5.0, it happens more frequent than before

---

<div class="post-metadata">

**Author:** ![larrycai](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/larrycai/32/167_2.png) [@larrycai](https://forums.docker.com/u/larrycai)\
**Post date:** [April 15, 2015, 9:01am UTC](https://forums.docker.com/t/trouble-with-installation/1256/9 "2015-04-15T09:01:39Z")

</div>

for the `start.sh` issues, it requires the “unix” environment to execute. It happens in clean Windows env often.

It could be the bug to be improved, I guess.
