Okay, this sounds convincing. And I am sorry if I seem lazy or uneducated about this whole stuff but I couldn't actually find much information about the diags mode in the Wiki. What does this special system-partition(?) when booted into, allow me to do? With the rescue pack it basically provides me with a way to access my Kindle over SSH and possibly save it by replacing/deleting/modifying some files, given that I know what went wrong or even restore entire partitions. What does the diags partition do by default? nothing that could possibly unbrick the Kindle? I assume it's just a usually "useless" diagnostics partition which is used by the Amazon staff to check if the system is alright and you guys just modified that slightly with the rescue pack, as to allow full root access to the Kindle's file system over SSH additionally.

Umm... yes!
The kindle is actually a dual-boot system. Much like you can boot your PC into Windows or Linux, a Kindle can boot into diags and main (=normal mode). These two systems are "strictly" separated, so (most importantly), even if you completely destroy your main partition and/or kernel, diags still remains functional.*
Just actually boot into diags mode to see what its "normal" purpose is. It's really a "diagnostics" mode, where you can test all kinds of hardware and system functionality.

What "we" use it for is mostly as a "life insurance". If the diags partition can boot and enable SSH access, then we have full access to the device. And even if the main partition and/or kernel were completely FUBAR, we could still fix it. In the simplest case, that's just overwriting the main kernel and partition with working ones, but you can also just mount the main partition and selectively edit a file to fix a mistake, etc. You have all the power of a full Linux (well ok, busybox) system at hands.

(*) The restriction on the Paperwhite is that there is currently no known way to directly boot into diags, without requiring a functional main partition ("rescue pack" way) or at least u-boot ("serial connection" way).

Quote:

Originally Posted by cryzed

From what I gather installing the regular USBNet is not important anymore after installing the rescue partition because I already have another way to enable SSH (by booting into diags mode) and creating back-ups of all system partitions would be a great idea too, so that, if I actually fuck something up, I can overwrite the partitions which I had previously backed up? Are the images provided by you, ixtab, here then just a way for people who did not back up their own partitions to save their Kindle by overwriting their partitions with your back-ups of them basically?

I think that there's a fundamental misunderstanding here, because you seem to imply that USB network access / SSH is only useful for backup purposes. You're probably right that this is indeed one of the major uses for the "average kindle user out there" who reads these mobileread threads, but that's only scratching the surface, and it's only because most people turn here when their device is already broken, and want to "repair" it.

What SSH really does is give you access to the OS of the device. And specifically, on the Kindles, it gives you full administrative access to the device. If you have a root shell on a Kindle, you can do *anything*. You can monitor what the device does, you can start your own applications, you can join a botnet, you can even have it display Mickey Mouse's face every minute, if you so desire. You can do *anything*.

To get this a bit more down-to-earth: where do you think all the modifications for the K3/K4/KT come from? They're not just "invented" in thin air and then magically work. Everything - starting from the jailbreak itself, and through to - to stay with an example that you know - Collections Manager, has been executed hundreds of times, while being logged in via SSH and watching the system behavior, and monitoring various log files.

In other words: there is a reason why usbNetwork is listed as the most important, and as the very first modification, right after the jailbreak: because *it is* the most important, and the most potent. The entire point is about remotely (USB) telling the device what to do (root). From there on, everything is easy...

Quote:

Originally Posted by cryzed

Is there any good reason why I should still install USBNet after having installed the rescue pack? And after having updated to version 5.3.0 is it possible to basically revert to 5.2.0 by restoring all partitions that I have backed up (during the 5.2.0 state), or will this create problems?

Yes, keep usbnet installed. If you don't actually use it, it won't harm you in any way. But it still provides a safety net that you can enable when you need it.

Concerning 5.2.0 or 5.3.0: yes, provided that you do have a working diags partition with SSH (and that your main partition, be it 5.3.0 or 5.2.0, will actually let you boot to that partition [cf "rescue pack"]), you can always freely switch between versions.

That's really great! Thank you for the detailed answer, very much appreciated, really. I already installed the Jailbreak + Bridge and managed to connect with my local Cygwin configuration via SSH and the NDIS bridge to the Kindle and have access to the root account. So there it is, "basically" my safety net. Now I wanted to backup my partition 1 and 2 but have slight problems.

I assumed that my host IP address relative to the Kindle would be 192.168.15.1 because that's how the SSH connection is established, but when directing the dd output to that address / port the whole thing just freezes and does nothing -- out of desperation and creeping suspicions that I don't understand networking at all I also tried the local IPV4 address within the home network (192.168.0.17) which is unreachable. If this gets too offtopic, I understand, I'll take it somewhere else -- I just thought if it's something glaringly obvious, even if you guys aren't running Windows you might be able to tip me off. I guess I could just backup the partitions to the user storage on the device but... meh.

EDIT: Success, thanks everyone!
EDIT2: I forgot to backup the kernel image for 5.2.0 -- does it actually change during the update from 5.2.0 -> 5.3.0? If not, that's no problem, it would just be nice to have it. If someone actually did backup the 5.2.0 kernel and it differs from the 5.3.0 I would be very thankful if you could provide me with links here or via PM!
EDIT3: Nevermind, ixtab has it covered
EDIT4: I just compared the md5sum from my "mmcblk0p1.bin" with ixtab's "pw_5.2.0-mmcblk0p1.img" -- shouldn't the md5sums match? (because they don't). I also have a Kindle Paperwhite WLAN 5.2.0 image.

@ixtab: I personally try to stay as far away from diags as possible (probably because I'm used to the more clunky setup of the K2/3), so I'm personally quite content with USBNet @auto, but, yeah, nothing against at least linking to your rescue pack in the doc .

Poke me again in a few days if I forget .

@cryzed: Yep, at the very least, the passwd file will be different (the default root password is computed from the SN), and the guid too => md5 mismatch .

@cryzed: Besides a different root password, it doesn't seem to have caused much problems so far, unless you mess with lower-level stuff than a simple rootfs. I'd kill the /etc/guid file and let the boot process re-create it, but that's it.

That's really great! Thank you for the detailed answer, very much appreciated, really. I already installed the Jailbreak + Bridge and managed to connect with my local Cygwin configuration via SSH and the NDIS bridge to the Kindle and have access to the root account. So there it is, "basically" my safety net. Now I wanted to backup my partition 1 and 2 but have slight problems.

I assumed that my host IP address relative to the Kindle would be 192.168.15.1 because that's how the SSH connection is established, but when directing the dd output to that address / port the whole thing just freezes and does nothing -- out of desperation and creeping suspicions that I don't understand networking at all I also tried the local IPV4 address within the home network (192.168.0.17) which is unreachable. If this gets too offtopic, I understand, I'll take it somewhere else -- I just thought if it's something glaringly obvious, even if you guys aren't running Windows you might be able to tip me off. I guess I could just backup the partitions to the user storage on the device but... meh.

Anyways, thank you so much!

You can only SSH into the wifi interface of your kindle if you enable SSH over wifi in /etc/iptables. That is documented in the K4 hacking wiki, but works on all the kindles with wifi.

Each network interface uses a different IP subnet. 192.169.0.x is your wifi. 192.168.15.x is your RNDIS interface, but the host PC does not get assigned anything automatically because the kindle is not running a DHCP server.

You need to manually assign an IP address (192.168.15.201 recommended) to the host PC side of the RNDIS interface. This stuff is all documented in the wikis and this forum...

You need to manually assign an IP address (192.168.15.201 recommended) to the host PC side of the RNDIS interface. This stuff is all documented in the wikis and this forum...

Really? Because I checked that, I used the forum internal search, the wiki and Google but couldn't find any instructions whatsoever which were mentioned in conjunction with the usage of netcat. It's not like I didn't try -- If you could kindly point me to that Wiki entry?

Ndis driver required thingy popped up. it searched and found driver... Installs and brings up a new connection (that uses dhcp by default IIRC)

Open networking info for connection, shove in non-dhcp hardcoded address on same subnet as one in config on device like 192.168.2.1 (kindle) and 192.168.2.2 (PC) slap in 255.255.255.0 mask no gateway - save. (echo these and other sensible setting in usbnet config)

That was all it took. Vista even found the right ndis driver which was a shocker
HTH

And I just use Nilujes USBnetworking to handle the iptables details.
note: it prefers to be "unplugged" while switching

I did that, I think, I am just not sure how to specify a hardcoded address for my PC. It currently looks like that and I connect to the Kindle via ssh root@192.168.15.244. Regarding the netcat stuff (which I have since solved another way) I still wouldn't know which IP to enter to write the dd-read output to a running dd instance on my PC via netcat -- or rather I do know but apparently it's wrong. I had to install the NDIS stuff manually but it works now. This is how my current setup looks, excuse the german.

USBnet itself isn't even installed yet -- I think you guys might be already talking about configuring the WiFi aspect of the hack while I was still talking about the netcat stuff mostly which should be possibly without the WiFi aspect and just with the USBNet hack integrated into the diag partition.

So for the WiFi part I basically change the address that I have currently entered (192.168.15.1) to one which lies on the same subnet as my network PC address (192.168.0.17) so e.g. 192.168.0.18 and change the usbnet config accordingly.

I'm not sure what you mean by

Quote:

And I just use Nilujes USBnetworking to handle the iptables details.
note: it prefers to be "unplugged" while switching