Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-21-2016, 02:47 PM   #1
odifinaro
Junior Member
odifinaro began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2016
Device: Paperwhite 2
USBNetwork failed to start sshd

Hello,
My KPW 2 came with the 5.4.3.2 firmware. I JB'd it, and then upgraded to 5.4.5. After the upgrade, I installed usbnet 0.21N. I can access the Kindle only through Telnet, but not with SSH ("connection refused"). When I type ;un into the search box, it gives a "failed to start sshd" message.
What should I do?
odifinaro is offline   Reply With Quote
Old 05-21-2016, 03:04 PM   #2
encol
Evangelist
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 415
Karma: 750442
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
What reports usbnet status?
encol is offline   Reply With Quote
Old 05-21-2016, 03:26 PM   #3
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Use the packages from:
https://www.mobileread.com/forums/sho...d.php?t=225030

Install KUAL
Install MrPI
Then use MrPI to install USBnetworking (from the above link)
Then use KUAL/USbnet menu to enable/disable and report status of USBnet

After that -
Follow the directions included with USBnet on setting up ssh/sshd
Get it working over the USB cable before trying to make it work over WiFi.

Report back on progress -
Include the address at both ends of the cable and the hardware/OS/OS version of the non-Kindle end of the connection.
knc1 is offline   Reply With Quote
Old 05-21-2016, 04:27 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
And don't forget that it won't switch properly if the device is plugged in to a computer.
NiLuJe is offline   Reply With Quote
Old 05-21-2016, 04:28 PM   #5
odifinaro
Junior Member
odifinaro began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2016
Device: Paperwhite 2
I proceeded as follows:

1. Uninstalled usbnet using the uninstaller image from the same place where I had gotten it (http://www.mobileread.mobi/forums/sh...d.php?t=186645). It completed successfully, but all usbnet files remained in the device.

2. Installed KUAL and MRPI from the link you provided.

3. I noticed in KUAL that the usbnetwork entry was there, so it probably wasn't uninstalled.

3. Anyway, tried to install usbnet snapshot from the link you provided using MRPI, but it said "Hush, little baby" and then "No MR packages found". So I went the usual route (Settings -> Update your Kindle) and got Error 006.

4. After the reboot, I tried to enable usbnetwork in the KUAL entry and got the same error from before. USBNetwork status doesn't give anything.

I use Debian 8

Thank you!
odifinaro is offline   Reply With Quote
Old 05-21-2016, 04:34 PM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@odifinaro:

1. Perfectly normal, that's to prevent wiping user content (settings, in this instance).

3. Byproduct of 1. Also still there, but of course won't work properly, given that it might be looking for uninstalled stuff.

3b.: You need to drop the package in the mrpackages folder, not the root.
Hence both errors.

4. No chance that it'd work, given 3b .
NiLuJe is offline   Reply With Quote
Old 05-21-2016, 04:43 PM   #7
odifinaro
Junior Member
odifinaro began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2016
Device: Paperwhite 2
Ok, such a stupid mistake. So I dropped the package in mrpackages, and then at 7 / 100 progress, it said "package script failed (1), moving on..." and restarted. I tried to enable usbnetwork in KUAL and got the same sshd error.
Thank you
odifinaro is offline   Reply With Quote
Old 05-21-2016, 04:52 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You can check the logs (extensions/mrinstaller/log/mrinstaller.log), but that looks like a failure to update the userstore...

Make sure you have enough free space in there (MRPI should have warned about that, so that seems unlikely).

Last time someone hit that, a reboot fixed it (?!).

Barring that, you can try:
* Uninstalling USBNet
* Removing the usbnet folder manually
* Installing USBNet afresh
NiLuJe is offline   Reply With Quote
Old 05-21-2016, 05:06 PM   #9
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
My PW3 SSHD was failing to start (so I had to use telnet), but (as recommended) reinstalling it (via MRPI) made it "all better" (just this morning, in fact).
geekmaster is offline   Reply With Quote
Old 05-21-2016, 06:18 PM   #10
odifinaro
Junior Member
odifinaro began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2016
Device: Paperwhite 2
Here is the log:

Quote:
[2016-05-21 @ 17:37:29 -0301] - Beginning the processing of package 'Update_usbnet_0.21.N_install_pw2_kt2_kv_pw3.bin' (usbnet 0.21.N I WARIO) . . .

--
Running 'install.sh' for 'usbnet 0.21.N I WARIO' (Update_usbnet_0.21.N_install_pw2_kt2_kv_pw3.bin) @ Sat, 21 May 2016 17:37:31 -0301

system: I usbnet:install:ur custom directory already exists, checking if we have custom content to preserve
system: I usbnet:install::installing custom directory
src/usbnet/
src/usbnet/etc/
src/usbnet/etc/dropbear_dss_host_key

.....A BUNCH MORE......

src/usbnet/bin/gdbserver
src/usbnet/bin/objdump
cp: can't create '/mnt/us/./usbnet/etc/dropbear_dss_host_key': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/nanorc': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/ssh_host_rsa_key': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/dropbear_rsa_host_key': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/dropbear_ecdsa_host_key': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/VERSION': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/sshd_config': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/ssh_config': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/ssh_host_ecdsa_key': Input/output error
cp: can't create directory '/mnt/us/./usbnet/etc/nano': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/ssh_host_ed25519_key': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/tmux.conf': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/moduli': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/inputrc': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/ssh_host_dsa_key': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/htoprc': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/config': Input/output error
cp: can't create directory '/mnt/us/./usbnet/etc/zsh': Input/output error
cp: can't create directory '/mnt/us/./usbnet/etc/ltrace': Input/output error
cp: can't create directory '/mnt/us/./usbnet/etc/dot.ssh': Input/output error
cp: can't create directory '/mnt/us/./usbnet/etc/terminfo': Input/output error
cp: can't create '/mnt/us/./usbnet/etc/config.default': Input/output error

Hu oh... Got return code 1 . . .
A reboot didn't work, so I removed the usbnet folder and installed it again. Now it works, including over WiFi.
Thanks!
odifinaro is offline   Reply With Quote
Old 05-21-2016, 08:03 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I'm going to go out on a limb by saying that cp returning a bunch of I/O errors in a row cannot be a good thing, but, hey .

Is this a new device? How much space left do you have in the USB partition? Can you check the system logs to see if fsck complains about anything on boot?
NiLuJe is offline   Reply With Quote
Old 05-21-2016, 09:05 PM   #12
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Some people create a very huge file in user storage, in the hopes it will prevent OTA updates.

Check for that if you have very little free space in USB mass storage.
knc1 is offline   Reply With Quote
Old 05-22-2016, 07:40 AM   #13
odifinaro
Junior Member
odifinaro began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2016
Device: Paperwhite 2
Over 2GB of free space and nothing about fsck in the logs.

I guess the whole thing was a permissions or file-in-use issue. I remember that I also got some I/O error when I was trying to edit the config files in the usbnet folder through Telnet.

I guess sshd couldn't start because it couldn't write to the usbnet folder, probably because I had switched with the Kindle plugged in.
odifinaro is offline   Reply With Quote
Old 05-22-2016, 08:22 AM   #14
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by odifinaro View Post
- - - - -
I guess sshd couldn't start because it couldn't write to the usbnet folder, probably because I had switched with the Kindle plugged in.
Correct.
USB storage is unavailable to the internals while the cable is plugged in.

Runtime USB networking is protected against that case of PEBKAC, evidently the install/un-install is not.

A useful finding -
NiLuJe's summer school assignment is making changes to the USBnetworking package, so that can be one more thing to consider changing.
knc1 is offline   Reply With Quote
Old 05-22-2016, 08:46 AM   #15
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by knc1 View Post
USB storage is unavailable to the internals while the cable is plugged in.

Runtime USB networking is protected against that case of PEBKAC, evidently the install/un-install is not.
If USB storage is writable by both sides (from inside the kindle, and from outside in the "real world") it can corrupt the file system. I have done this (accidentally) when I forgot to unmount an image file, then launched the VM that uses that file. Usually, the results are that newly created files get lost, but more serious changes like adding or removing directory trees could result in substantial file system corruption.

It should be safe for only ONE side to have rw access and the other side ro access though, but even then the ro side might not see recent changes done in the rw side. Part of the problem is that you can force disk flushes on the rw side, but it is a bit more difficult to force disk cache voids on the ro side.

Simpler and easier to do as kindle did and just disallow access to one side or the other. If you really need file system access by multiple processors, that's what NFS was designed for (and with usbnet, SCP does a good job too).

If you REALLY want to mount the filesystem from both sides, then AT LEAST turn off write caching (which defaults to ON for the kindles on a windoze PC), and do lots of "sync" commands on the kindles side --- and of course keep recent backup copies.

One way I though of to get data both ways over a shared kindle drive is to pre-allocate fixed-sized files, one for input and one for output, then use a program to mmap them, and then confine all writes to the proper file. In essence, one file becomes an input channel and the other an output channel. As long as no new disk clusters get allocated you should be (relatively) safe. But Windows sometimes writes crap to freshly plugged in drives (to test if it is fast enough for "readyboost"), and the kindle somethimes writes log files and whatnot to the drive as well (such as what page you last read in a book).

Just remember that bending the rules is not without risk...

Last edited by geekmaster; 05-22-2016 at 08:54 AM.
geekmaster is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sshd will not start in usbnetwork mode alethiophile Kindle Developer's Corner 9 01-25-2014 10:36 AM
K4B USBNetwork failed piahoo Kindle Developer's Corner 2 11-14-2012 05:43 PM
Start usbNetwork with launchpad? giorgio130 Kindle Developer's Corner 5 12-03-2011 10:19 AM
iLiad Semi-Standalone sshd? grayfox iRex Developer's Corner 9 02-09-2008 02:50 PM
iLiad starting sshd over wireless? thetechnobear iRex Developer's Corner 5 11-28-2007 01:49 PM


All times are GMT -4. The time now is 02:05 AM.


MobileRead.com is a privately owned, operated and funded community.