ADepic / SkywirePiMainnet

How to get skywire mainnet running on a set of raspberry PIs. (linux only)
GNU General Public License v3.0
0 stars 1 forks source link

MacOS, only one drive after flashing #1

Open BillMarks7 opened 4 years ago

BillMarks7 commented 4 years ago

"Once the image is flashed, your SD card will show up as two different drives: rootfs and boot"

On my Mac running 10.12.6, I only have the "boot" drive mounting after the flash. No sign of a "rootfs" drive. Same if I mount on a PC running Windows 10.

ADepic commented 4 years ago

In the boot drive, is there a folder called "etc"? In that folder, is there aa file called " dhcpcd.cpnf". If so, you can simply follow the steps normally.

The only step involved the "rootfs" drive is editing the file called "dhcpcd.conf". If that file is present in the boot drive, then just edit it there.

If there is no " etc" folder and "dhcpcd.conf" file then there is a bigger issue.

BillMarks7 commented 4 years ago

Thanks so much for your quick response.

No sign of " etc" folder and "dhcpcd.conf".

I also tried to flash a card using SkyRaspbian-v0.1.2.img after first using the 2020-02-13-raspbian-buster-lite.img this guide suggested with the same result.

ADepic commented 4 years ago

I also tried to flash a card using SkyRaspbian-v0.1.2.img after first using the 2020-02-13-raspbian-buster-lite.img this guide suggested with the same result.

For me, putting the raspbian image through skyimager created 8 images called (image-0.img) to (image-7.img). That might have changed, or maybe something has gone wrong.

No sign of " etc" folder and "dhcpcd.conf".

Okay, so I looked it up and it seems that when flashing on macOS the rootfs drive isn't created. So you will have to skip the step related to rootfs in my guide.

The only step that requires "rootfs" describes how to set up Static IP addresses for the raspberry PI. Here are a few alternatives:

  1. If you have a monitor, you can set up a static IP address that way. If you connect your raspberry pi to a monitor (using a HTML cable) , you should be able to go to "dhcpcd.conf" and add the lines that I have shown.
  2. You can find the IP address that the raspberry PI has been assigned, and connect to the raspberry PI using that IP address. The command would be pi@<IP address>. There are a few ways to find the IP address:
    • Type your gateway IP address into a browser. This will load up a page to manage your router. In this page, somewhere you can find a list of devices. In the list of devices, you should be able to find "raspberrypi", which will show the IP address it has been assigned. here is a video tutorial for that.
    • In the terminal, use this command: pi@raspberrypi.local. This will connect you to the raspberry PI, and then you can change the address to be a static IP address. However, I don't know exactly how this will work with multiple PIs.

If you have a monitor and a HDMI cable, option 1 is your best bet. Option 2 is a bit more complicated, and it might be impossible once you start working with multiple raspberry PIs.

ADepic commented 4 years ago

I have updated the guide to outline the options I just described

BillMarks7 commented 4 years ago

Thanks for the info. I seem to recall the first time I set up the miner for testnet, there was a file I was able to access via terminal where I set the static IPs. This was a long time ago and I cannot recall the process, or if it would be the same process that would work with this update.

ADepic commented 4 years ago

Thanks for the info. I seem to recall the first time I set up the miner for testnet, there was a file I was able to access via terminal where I set the static IPs.

Yes, of course. But obviously you need to be able to access your raspberry PI first. I think the easiest way is to use a monitor. The guide I folllowed for testnet assumed you had a monitor in the first place.

BillMarks7 commented 4 years ago

No, never used a monitor in previous setups. I will go ahead with flashing all the cards, then I will head in through terminal after I see which IPs everything was assigned by the router.

ADepic commented 4 years ago

Fair enough. My worry is that it might be confusing to try and navigate through all the random IPs that have been assigned to each raspberry PI. But give it a try and see what you can do. :)

BillMarks7 commented 4 years ago

Thanks. I was also wondering, does this change all my public keys? Or do they remain the same?

ADepic commented 4 years ago

Your public keys only matter after you have successfully installed skywire on your PIs. So if they change, it doesn't matter yet. After you have installed skywire you can see your public keys through the "hypervisorUI" You also need to update your keys at whitelist.skycoin.com to get rewards

BillMarks7 commented 4 years ago

Ok. Will do. Thank you.

BillMarks7 commented 4 years ago

It appears my router has assigned static IPs to all the cards, but I cannot login to any of them through terminal. Most just fail and one gives me this return:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed.

I use this to login: ssh pi@10.0.0.101 but does not even get to a password request, not that my old password will even work now, not sure how to set a new one. Totally lost now. Could having the reserved IP set on the router end but not confirmed in each card causing a communication issue? Should I set them to DHCP rather than reserved IP?

ADepic commented 4 years ago

Delete the file "knowh_hosts" in folder ".ssh" (its a hidden folder)

The file path is displayed here

"Add correct host key in /path/to/known_hosts"

Where the /path/to is replaced by the actual path

BillMarks7 commented 4 years ago

Thanks, but I really have no idea how to do that. Where is this file and how do I locate it if I cannot login to any cards? Aside from your guide, there are no concise easy to follow instructions for this move to mainnet as there was with the testnet. I am not a programmer so this is pretty hard if not impossible for me without a step by step guide. Sorry for my ignorance here.

More confusing is I see all my cards connected through the router itself, but when I look at the physical lights at the back NETGEAR 16-Port Gigabit Ethernet, two cards are not flashing their lights nor is the Netgear inputs they are connected to.

ADepic commented 4 years ago

The file is on your computer. It contains the "keys" of the devices you connect to with SSH.

Let's say a device (device 1) has the IP address, 192.168.1.50

If then, that IP address is assigned to "device 2" ( a new and separate device), the SSH software will think that device 1 has been hacked (bcos it doesn't know you have changed devices). Therefore, deleting the "known_hosts" file on your computer (in ".ssh" folder in home directory), the software will forget the key and won't bring up that warning.

BillMarks7 commented 4 years ago

I see. I found the file and deleted it. Now the one IP ssh pi@10.0.0.105 that was giving me that warning now is allowing a login which is a positive development. Six cards now are asking for a password. raspberry or my old password is not accepted. I tried each IP and it appears there are 2 that do not get to the password stage, those would be the two that do not show connection lights on the ports.

ADepic commented 4 years ago

Are you doing:

pi@192.168.1.10

The pi before the IP address is necessary, as it is the username.

If that didn't work: How did you flash these cards? If you flashed a completely new image the password has to be raspberry.

ADepic commented 4 years ago

I'm stupid, you did do pi@<IP addess]>

ADepic commented 4 years ago

It could also be that the IP addresses are those of your old PIs (testnet Ines) and the router device lost still retained those IP addresses even if they are defunct. I don't exactly know what the problem is sadly :(

BillMarks7 commented 4 years ago

I am re-flashing all cards to see if anything changes. The addresses I use all are this format - ssh pi@10.0.0.102

After re-flashing all cards, same two do not connect at all, the others now refuse connection. Should I maybe erase and reformat the cards before flashing? Does the flashing do this or can there be some artifact left that is corrupting things?

ADepic commented 4 years ago

Sorry for the late response.

After reflashing ou have to delete the known_hosts file, as it contains old keys (for the PIs before they were reflashed)

ADepic commented 4 years ago

Also, it seems as if the last section of the guide is completely wrong. I'll have to update it before it can be used.

ADepic commented 4 years ago

I have now updated the guide to use the new commands, however, they are not working for me so the guide seems to not be complete at this point.

BillMarks7 commented 4 years ago

I spent another day on the Skywire Mainnet telegram group searching for more answers and generally got nowhere. This update is a real pain in the ass. I only have so much time to play with this and at this point if I shelve the damn miner, so be it. Skycoin may lose many miners/nodes due to not preparing this properly for everyone involved. I doubt losing nodes, considering all that they need to make this whole concept a reality, is a positive step. I have many other more important chores to get off my plate before I can waste more precious time playing with this. My DIY miner was up 99.9% of the time, now is sitting dead for 2 weeks. Great fun.