Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmounting and remounting qmk_firmware #1

Open
gkubed opened this issue Feb 6, 2016 · 8 comments
Open

Unmounting and remounting qmk_firmware #1

gkubed opened this issue Feb 6, 2016 · 8 comments

Comments

@gkubed
Copy link
Owner

gkubed commented Feb 6, 2016

After running sudo usermod -a -G vboxsf <your username>, I said to restart the system. This isn't really necessary, as you can just unmount and remount the shared folder.

The unmounting command is sudo umount /media/sf_qmk_firmware. This works.

The remounting command is seemingly sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) ShareName NewFolder, where ShareName is whatever the name is when you set the shared folder in VirtualBox (In my case, qmk_firmware), and NewFolder is whatever you want it to be. This hasn't worked for me, but returns the error /sbin/mount.vboxsf: mounting failed with the error: No such file or directory.

I'd like to get this figured out so that I don't force the user to do yet another reboot of their VM.

@dragon788
Copy link

@gkubed I'd suggest using a Vagrant VM setup as on the QMK ergodox_ez build instructions. Vagrant handles the mounting and unmounting of the shared folder, and makes things extremely easy to set up. I'd love to work with you to refine your tutorial to help those who want to build any of the QMK firmwares or TMK firmwares using any of the Vagrant VMs available in the Vagrantfile. I wrote the setup scripts to be as straight forward as possible, and that should handle the dependencies while still allowing users to easily follow your directions.

@gkubed
Copy link
Owner Author

gkubed commented Feb 8, 2016

@dragon788, thanks for the offer - I'd love to take you up on that, and/or even help document the existing process in qmk_firmware. When I was attempting to put my own firmware on my planck last week, I tried the Vagrant process but didn't have any luck, as there wasn't much documentation to help me out (or, possibly, I didn't know where to look). Since most of the documentation didn't include Vagrant, I decided to not veer too far off. However, if you're confident that it's a much cleaner and universal approach, I would love to include it in my documentation and help encourage it to be the standard process. There's so much great documentation out there, but it's spread out all over the place. I found JH-TMK-Tutorial extremely helpful, but it's incomplete and the sole contributor is MIA. My goal is to create a bottom to top, one page guide to get people up and running.

I had installed Vagrant, already had VIrtualBox installed, and ran vagrant up inside of the directory with Vagrantfile in it. This created a VM, which was apparently running, but didn't have its own window. I wasn't sure if that was supposed to be the case or not, although looking back at the QUICK_START.md I'm pretty sure it should have been running.

I'll definitely try it again tonight tomorrow overmorrow from the bottom, and if I get it working I'll update my instructions. Thanks!

@dragon788
Copy link

You are absolutely right, I didn't really give much in the way of direction
and I should have. I'm so comfortable with Vagrant it's like a second
language. I believe when your VM boots this should give you a message about
running vagrant SSH but that only works on Windows in git bash or on OSX or
Linux. I will send over some directions later today with the basic steps
required to get this working. And then you can give that a run when you get
a chance and make it more human readable.
On Feb 8, 2016 7:54 AM, "Guyon Cumby" notifications@github.com wrote:

@dragon788 https://github.com/dragon788, thanks for the offer - I'd
love to take you up on that, and/or even help document the existing process
in qmk_firmware https://github.com/jackhumbert/qmk_firmware. When I was
attempting to put my own firmware on my planck last week, I tried the
Vagrant process but didn't have any luck, as there wasn't much
documentation to help me out (or, possibly, I didn't know where to look).
Since most of the documentation didn't include Vagrant, I decided to not
veer too far off. However, if you're confident that it's a much cleaner and
universal approach, I would love to include it in my documentation and
help encourage it to be the standard process.

I had installed Vagrant, already had VIrtualBox installed, and ran vagrant
up inside of the directory with Vagrantfile in it. This created a VM,
which was apparently running, but didn't have its own window. I wasn't sure
if that was supposed to be the case or not, although looking back at the
QUICK_START.md
https://github.com/jackhumbert/qmk_firmware/blob/master/QUICK_START.md
I'm pretty sure it should have been running.

I'll definitely try it again tonight from the bottom, and if I get it
working I'll update my instructions. Thanks!


Reply to this email directly or view it on GitHub
#1 (comment)
.

@dragon788
Copy link

Here is the post 'vagrant up' message that you should have seen.

Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win)
or 'vagrant ssh-config' and Putty or Bitvise SSH or another SSH tool
Change directory (cd) to the keyboard you wish to program 
(Optionally) modify your layout, 
then run 'make clean' 
and then 'make' to compile the .eep and .hex files.
Or you can copy and paste the example line below. 

cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make```

Basically following those directions should get you up and going. If you have further trouble let me know. One of the things I see now looking at the Vagrantfile is we could potentially make a "show VM GUI" option easier to use rather than having it hidden in the comments of the Vagrantfile. Its tough to know what the easiest way this is for users to understand.

Perhaps VM_GUI=true vagrant up would be straightforward enough for people, and that wouldn't be hard to detect inside the Vagrantfile and set the appropriate option, and we default it to false so they can just use ssh if they are somewhat command line savvy.

I should also add a message that once you are done compiling, you can exit the ssh session and run vagrant halt to stop the VM so it doesn't kill your laptop battery or overwork your desktop's CPU fan.

@gkubed
Copy link
Owner Author

gkubed commented Feb 11, 2016

@dragon788, Thanks for taking your time to explain this!

Ah, okay, this is where I left off. I successfully ran vagrant up in the directory with the Vagrantfile, and it goes ahead and gives me the message you paste above. I can see that the VM is running in VirtualBox. This is what happens when I run vagrant ssh:

C:\Users\Guyon\Documents\GitHub\qmk_firmware>vagrant ssh
`ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: C:/Users/Guyon/Documents/GitHub/qmk_firmware/.vagrant/machines/default/virtualbox/private_key

I have openSSH installed in Cygwin, so I didn't think this should really be a problem. Is there any other package you suggest?
Vagrant SSH

At this point I bailed the first time around because I wasn't sure if this approach would work in the first place, but now you have me interested.

I have PuTTY installed, and just tried to connect to 127.0.0.1 on port 2222 with the username vagrant, and using the private key, but only got a blank black screen. It's worth noting that PuTTY wanted to use a .ppk file for the private key, but none such file existed.

PuTTY

I don't have CLI Git installed since I use GitHub Desktop in Windows 10. I didn't think this would be a problem because if I recall correctly GitHub Desktop is just a wrapper for the CLI, but I may be wrong. Have any ideas? I'd love to work with you to try to sort this out.

@dragon788
Copy link

If you can find where the openssh client is installed in cygwin and the
name of the binary, it could just be that it doesn't exist in your path
inside cygwin. If you run 'echo $PATH' in you prompt you can see which
folders are in your path. You can try 'which ssh' or 'which openssh' to see
if it knows about the ssh that is present. If vagrant is just looking for
literally an 'ssh' to exist you may have to create a symlink to the openssh
client somewhere in the path named simply ssh, either in /bin or /usr/bin
or ~/bin should work.

To use the key with putty you might have to import it into pageant first
which will convert it to a ppk.
On Feb 10, 2016 10:03 PM, "Guyon Cumby" notifications@github.com wrote:

Thanks for taking your time to explain this!

Ah, okay, this is where I left off. I successfully ran vagrant up in the
directory with the Vagrantfile, and it goes ahead and gives me the message
you paste above. This is what happens when I run vagrant ssh:

C:\Users\Guyon\Documents\GitHub\qmk_firmware>vagrant ssh
ssh executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 2222
Username: vagrant
Private key: C:/Users/Guyon/Documents/GitHub/qmk_firmware/.vagrant/machines/default/virtualbox/private_key

I have openSSH installed in Cygwin, so I didn't think this should really
be a problem. Is there any other package you suggest?
[image: Vagrant SSH]
https://cloud.githubusercontent.com/assets/6720105/12969051/d59ac358-d048-11e5-81d2-f047909c09f1.png

At this point I bailed the first time around because I wasn't sure if this
approach would work in the first place, but now you have me interested.

I have PuTTY installed, and just tried to connect to 127.0.0.1 on port
2222 with the username vagrant, and using the private key, but only got a
blank black screen. It's worth noting that PuTTY wanted to use a .ppk
file for the private key, but none such file existed.

[image: PuTTY]
https://cloud.githubusercontent.com/assets/6720105/12969107/8e28c956-d049-11e5-8387-1649bc77e689.png

I don't have CLI Git installed since I use GitHub Desktop in Windows 10. I
didn't think this would be a problem because if I recall correctly GitHub
Desktop is just a wrapper for the CLI, but I may be wrong. Have any ideas?
I'd love to work with you to try to sort this out.


Reply to this email directly or view it on GitHub
#1 (comment)
.

@gkubed
Copy link
Owner Author

gkubed commented Feb 23, 2016

@dragon788 sorry for taking a long time to respond, I need to take some time to troubleshoot my Cygwin installation to see what's up. Running echo $PATH doesn't do anything, nor does which ssh and which openssh. Also thanks for the tip on converting to a ppk, I haven't done that before.

@dragon788
Copy link

No problem, I would suggest try installing git bash which is included in
git for Windows. This will create an alternative install that is similar to
cygwin but uses another tool called minGW and the newest version of git
bash includes SSH and all the other utilities available if you open a git
bash window.
On Feb 23, 2016 1:18 PM, "Guyon Cumby" notifications@github.com wrote:

@dragon788 https://github.com/dragon788 sorry for taking a long time to
respond, I need to take some time to troubleshoot my Cygwin installation to
see what's up. Running echo $PATH doesn't do anything, nor does which ssh
and which openssh. Also thanks for the tip on converting to a ppk, I
haven't done that before.


Reply to this email directly or view it on GitHub
#1 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants