worldpossible / rachelplus

RACHEL Configuration on Intel CAP
18 stars 8 forks source link

RACHEL USB Recovery Image #18

Closed bnordha closed 8 years ago

bnordha commented 9 years ago

@spatiald could you have a look at Intel Education Content Access Point USB Image Recovery Instruction.PDF document? In particular, it would be great if we could create a USB recovery image for the basic RachelPLUS installation. I tried it by following the document, but it bricked the device.

As I am not a script guru (but you certainly are), can you review the scripts and see whether a) we can get it to work for rachelPLUS, and b) whether that is actually a good method?

Thanks, Bernd

spatiald commented 9 years ago

Sure thing, sorry about the brick; were able to recover the device?

On Jul 19, 2015, at 07:50, bnordha notifications@github.com wrote:

@spatiald https://github.com/spatiald could you have a look at Intel Education Content Access Point USB Image Recovery Instruction.PDF document? In particular, it would be great if we could create a USB recovery image for the basic RachelPLUS installation. I tried it by following the document, but it bricked the device.

As I am not a script guru (but you certainly are), can you review the scripts and see whether a) we can get it to work for rachelPLUS, and b) whether that is actually a good method?

Thanks, Bernd

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18.

bnordha commented 9 years ago

yes, no problem.

It is not your fault, I just followed the Intel direction, and it didn't work.

On Sun, Jul 19, 2015 at 8:12 PM, Sam Kinch notifications@github.com wrote:

Sure thing, sorry about the brick; were able to recover the device?

On Jul 19, 2015, at 07:50, bnordha notifications@github.com wrote:

@spatiald https://github.com/spatiald could you have a look at Intel Education Content Access Point USB Image Recovery Instruction.PDF document? In particular, it would be great if we could create a USB recovery image for the basic RachelPLUS installation. I tried it by following the document, but it bricked the device.

As I am not a script guru (but you certainly are), can you review the scripts and see whether a) we can get it to work for rachelPLUS, and b) whether that is actually a good method?

Thanks, Bernd

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18.

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18#issuecomment-122653709 .

j-schwartz commented 9 years ago

I also have bricked devices trying to follow the instructions. This was a couple weeks ago when I had just the demo device from Intel. Clearly, the instructions don't seem to work.

On Sun, Jul 19, 2015 at 5:14 AM bnordha notifications@github.com wrote:

yes, no problem.

It is not your fault, I just followed the Intel direction, and it didn't work.

On Sun, Jul 19, 2015 at 8:12 PM, Sam Kinch notifications@github.com wrote:

Sure thing, sorry about the brick; were able to recover the device?

On Jul 19, 2015, at 07:50, bnordha notifications@github.com wrote:

@spatiald https://github.com/spatiald could you have a look at Intel Education Content Access Point USB Image Recovery Instruction.PDF document? In particular, it would be great if we could create a USB recovery image for the basic RachelPLUS installation. I tried it by following the document, but it bricked the device.

As I am not a script guru (but you certainly are), can you review the scripts and see whether a) we can get it to work for rachelPLUS, and b) whether that is actually a good method?

Thanks, Bernd

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18.

— Reply to this email directly or view it on GitHub < https://github.com/rachelproject/rachelplus/issues/18#issuecomment-122653709

.

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18#issuecomment-122654113 .

spatiald commented 9 years ago

Success! I have a working USB Recovery image that works. I will not be able to upload anywhere until Friday night or Saturday. I am camping in the middle of nowhere and the image is 4GB. Let's not close the ticket until someone else is able to test successfully.

j-schwartz commented 9 years ago

Fantastic! Happily, version 1.2.13_rooted will also directly update from 1.2.4 so we don't have to stair step on the existing devices I have here.

spatiald commented 9 years ago

I finished building the recovery USB image:

TO DO:

It was uploaded to the "USB Recovery Image" folder on Google Drive. Could someone else please test it? The file is called IntelCAP_RACHEL_USB_Recovery_1_2_13_SSH_2015_01_31.img

Windows

Use win32diskimager to write the image to USB

Linux or OSX

Determine the name of the drive:

Linux

fdisk -l

OSX

diskutil list
Use the following command to burn the image to USB:
sudo dd if=IntelCAP_RACHEL_USB_Recovery_1_2_13_SSH_2015_01_31.img of=/dev/rdisk2 bs=1m
spatiald commented 9 years ago

Question for all...what should be the default content build on the CAP Recovery USB...here is a current list of folder sizes for the English modules:

root@WRTD-303N-Server:~# du -h -d 2 /media/RACHEL/rachel
57G /media/RACHEL/rachel/modules/TED
626M /media/RACHEL/rachel/modules/PhET
124K /media/RACHEL/rachel/modules/radiolab
5.7M /media/RACHEL/rachel/modules/powertyping
395M /media/RACHEL/rachel/modules/infonet
1.8G /media/RACHEL/rachel/modules/ebooks-en
2.4M /media/RACHEL/rachel/modules/understanding_algebra
241M /media/RACHEL/rachel/modules/math_expression
254M /media/RACHEL/rachel/modules/scratch
9.1M /media/RACHEL/rachel/modules/musictheory
6.0G /media/RACHEL/rachel/modules/wikipedia_for_schools
29M /media/RACHEL/rachel/modules/iicba
147M /media/RACHEL/rachel/modules/medline_plus
7.4G /media/RACHEL/rachel/modules/GCF
1.1G /media/RACHEL/rachel/modules/practical_action
131M /media/RACHEL/rachel/modules/olpc
116M /media/RACHEL/rachel/modules/asst_medical
762M /media/RACHEL/rachel/modules/hesperian_health
12G /media/RACHEL/rachel/modules/kaos-en
6.0M /media/RACHEL/rachel/modules/rpi_guide
120K /media/RACHEL/rachel/modules/ka-lite
155M /media/RACHEL/rachel/modules/windows_apps
1.2G /media/RACHEL/rachel/modules/ck12
89G /media/RACHEL/rachel/modules
23M /media/RACHEL/rachel/rsphider
4.0K /media/RACHEL/rachel/LOCAL_CONTENT
528K /media/RACHEL/rachel/art
780K /media/RACHEL/rachel/_h5ai
7.5M /media/RACHEL/rachel/.git
89G /media/RACHEL/rachel

Ouch...TED is biggggg.

bnordha commented 9 years ago

Guys,

I was gone for a few days, and will be back in action tomorrow (my Wednesday).

I will test it.

Bernd

bnordha commented 9 years ago

As the content grows, I think we should separate the RACHEL skeleton and content.

That is, the USB recovery image should contant the skeleton for RACHEL, KA-lite, and Kiwix. Then people can add their own content using rsync.

For deployments that require the same content, I would recommend setting up units with the USB recovery, then pulling down the content for a single unit (which will be placed all on the HDD), and then duplicating the HDD using some imaging technique.

However, I think we should have a discussion on what imaging/deployment scenarios we want to cater for. That is, what are the requirements that we need to address.

Bernd

j-schwartz commented 9 years ago

My thought is to include it all, adding in the Kiwix wikipedia and full KA-Lite video library. From there, it's easier to just delete unused modules than try to add them after.

I haven't really thought through it much, but that's kind of my default idea for now.

On Tue, Aug 4, 2015 at 12:58 AM Sam Kinch notifications@github.com wrote:

Question for all...what should be the default content build on the CAP Recovery USB...here is a current list of folder sizes for the English modules:

root@WRTD-303N-Server:~# du -h -d 2 /media/RACHEL/rachel 57G /media/RACHEL/rachel/modules/TED 626M /media/RACHEL/rachel/modules/PhET 124K /media/RACHEL/rachel/modules/radiolab 5.7M /media/RACHEL/rachel/modules/powertyping 395M /media/RACHEL/rachel/modules/infonet 1.8G /media/RACHEL/rachel/modules/ebooks-en 2.4M /media/RACHEL/rachel/modules/understanding_algebra 241M /media/RACHEL/rachel/modules/math_expression 254M /media/RACHEL/rachel/modules/scratch 9.1M /media/RACHEL/rachel/modules/musictheory 6.0G /media/RACHEL/rachel/modules/wikipedia_for_schools 29M /media/RACHEL/rachel/modules/iicba 147M /media/RACHEL/rachel/modules/medline_plus 7.4G /media/RACHEL/rachel/modules/GCF 1.1G /media/RACHEL/rachel/modules/practical_action 131M /media/RACHEL/rachel/modules/olpc 116M /media/RACHEL/rachel/modules/asst_medical 762M /media/RACHEL/rachel/modules/hesperian_health 12G /media/RACHEL/rachel/modules/kaos-en 6.0M /media/RACHEL/rachel/modules/rpi_guide 120K /media/RACHEL/rachel/modules/ka-lite 155M /media/RACHEL/rachel/modules/windows_apps 1.2G /media/RACHEL/rachel/modules/ck12 89G /media/RACHEL/rachel/modules 23M /media/RACHEL/rachel/rsphider 4.0K /media/RACHEL/rachel/LOCAL_CONTENT 528K /media/RACHEL/rachel/art 780K /media/RACHEL/rachel/_h5ai 7.5M /media/RACHEL/rachel/.git 89G /media/RACHEL/rachel

Ouch...TED is biggggg.

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18#issuecomment-127511709 .

bnordha commented 9 years ago

Jeremy

I think we should work through different scenarios.

In theory it is easier to remove things than to add. However, 90GB content would take me a several days to download here in Singapore. I would imagine in other locations it could take much longer.

I would really advocate a modular approach with the core Rachel skeleton and the ability to add content by module.

Bernd

bnordha commented 9 years ago

@spatiald I tested the USB recovery and am encountering some problems. I think the issue is that the /dev/sda is not properly mounted. Here is the steps that I took;

1) Configured unit with Intel firmware 1.2.10 2) Upgraded using Rachel USB recovery image 3) It boots up, and I am able to connect to it. 4) I reboot, and it is bricked, Blue indicator light is solid blue, there is no Wi-Fi or LAN connection. 5) When I try to upgrade using the RACHEL USB recovery image (same as in step 2), it is still bricked.

Now after step 3, I observed the following things:

a) there was no /media/RACHEL partition b) there was an entry for RACHEL in /etc/fstab c) see the following information which was captured after 3)

cap@WRTD-303N-Server:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mmcblk0p4 5455796 1770088 3401912 35% / udev 964740 12 964728 1% /dev tmpfs 391392 476 390916 1% /run none 5120 0 5120 0% /run/lock none 978476 0 978476 0% /run/shm /dev/mmcblk0p3 185307 103581 71947 60% /boot /dev/mmcblk0p5 1015660 1284 961952 1% /recovery /dev/sda1 20511356 45000 19417780 1% /media/preloaded /dev/sda2 103081248 61044 97777324 1% /media/uploaded /dev/mmcblk0p2 95767 54395 41372 57% /boot/efi cap@WRTD-303N-Server:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p4 5.3G 1.7G 3.3G 35% / udev 943M 12K 943M 1% /dev tmpfs 383M 480K 382M 1% /run none 5.0M 0 5.0M 0% /run/lock none 956M 0 956M 0% /run/shm /dev/mmcblk0p3 181M 102M 71M 60% /boot /dev/mmcblk0p5 992M 1.3M 940M 1% /recovery /dev/sda1 20G 44M 19G 1% /media/preloaded /dev/sda2 99G 60M 94G 1% /media/uploaded /dev/mmcblk0p2 94M 54M 41M 57% /boot/efi cap@WRTD-303N-Server:~$ cd /etc cap@WRTD-303N-Server:/etc$ cat fstab

proc /proc proc nodev,noexec,nosuid 0 0 UUID=44444444-4444-4444-4444-444444444444 / ext4 nobootwait,errors=remount-ro 0 1 UUID=33333333-3333-3333-3333-333333333333 /boot ext4 defaults 02 UUID=DEAD-BEEF /boot/efi vfat utf8,umask=007,gid=46 0 0 UUID=55555555-5555-5555-5555-555555555555 /recovery ext4 defaults0 0 UUID=66666666-6666-6666-6666-666666666666 none swap sw 0 0

HDD

/dev/sda1 /media/preloaded ext4 auto,nobootwait 0 0 /dev/sda2 /media/uploaded ext4 auto,nobootwait 0 0 /dev/sda3 /media/RACHEL ext4 auto,nobootwait 0 0 cap@WRTD-303N-Server:/etc$ sgdisk -p /dev/sda Problem opening /dev/sda for reading! Error is 13. You must run this program as root or use sudo! cap@WRTD-303N-Server:/etc$ sudo sgdisk -p /dev/sda [sudo] password for cap: Disk /dev/sda: 976773168 sectors, 465.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): C8AD7F3F-D658-4598-AAD1-172989DA626D Partition table holds up to 128 entries First usable sector is 34, last usable sector is 976773134 Partitions will be aligned on 2048-sector boundaries Total free space is 4196318 sectors (2.0 GiB)

Number Start (sector) End (sector) Size Code Name 1 2048 41945087 20.0 GiB 8300 preloaded 2 44040192 253755391 100.0 GiB 8300 uploaded 3 255852544 976771086 343.8 GiB 8300 RACHEL cap@WRTD-303N-Server:/etc$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p4 5.3G 1.7G 3.3G 35% / udev 943M 12K 943M 1% /dev tmpfs 383M 480K 382M 1% /run none 5.0M 0 5.0M 0% /run/lock none 956M 0 956M 0% /run/shm /dev/mmcblk0p3 181M 102M 71M 60% /boot /dev/mmcblk0p5 992M 1.3M 940M 1% /recovery /dev/sda1 20G 44M 19G 1% /media/preloaded /dev/sda2 99G 60M 94G 1% /media/uploaded /dev/mmcblk0p2 94M 54M 41M 57% /boot/efi

bnordha commented 9 years ago

@spatiald I did some more testing. If I start with an existing CAP Rachel unit and then use the USB recovery, it works fine. However, if I start with a Vanilla Intel configuration and do the USB recovery, the issue above appears.

spatiald commented 9 years ago

Did you use the 1.2.10 or 1.2.13 image of the USB Recovery? .13 should have the partition fix...I'll try the same later tonight just to be sure

<---snipped email reply junk--->

bnordha commented 9 years ago

I used IntelCAP_USB_Recovery_1_2_13_SSH_2015_01_31.img

<---snipped email reply junk--->

hackersforcharity commented 9 years ago

I believe the idea Jeremy is proposing is that we provide the recovery USB with all content preloaded with each purchase of a CAP. That way, when catastrophe strikes and the CAP fails from a software issue, user interaction is minimal apart from plugging in the drive.

Still working on the other issues you brought up with the current 1.2.13 build.

<---snipped email reply junk--->

j-schwartz commented 9 years ago

Actually, I think that even in a worst case scenario, the content on the internal 2.5" HDD will be fine. That content "shouldn't" get wiped for any reason. The devices themselves do brick with greater frequency than I ever imagined though. I think a USB recovery that simply reinstalls our core OS should be sufficient (8GB USB).

On Thu, Aug 6, 2015 at 8:25 AM Hackers for Charity notifications@github.com wrote:

I believe the idea Jeremy is proposing is that we provide the recovery USB with all content preloaded with each purchase of a CAP. That way, when catastrophe strikes and the CAP fails from a software issue, user interaction is minimal apart from plugging in the drive.

Still working on the other issues you brought up with the current 1.2.13 build.

On Aug 4, 2015, at 19:24, bnordha notifications@github.com wrote:

Jeremy

I think we should work through different scenarios.

In theory it is easier to remove things than to add. However, 90GB content would take me a several days to download here in Singapore. I would imagine in other locations it could take much longer.

I would really advocate a modular approach with the core Rachel skeleton and the ability to add content by module.

Bernd

From: Jeremy Schwartz [mailto:notifications@github.com notifications@github.com] Sent: Wednesday, 5 August, 2015 1:09 AM To: rachelproject/rachelplus rachelplus@noreply.github.com Cc: bnordha bernd.nordhausen@gmail.com Subject: Re: [rachelplus] RACHEL USB Recovery Image (#18)

My thought is to include it all, adding in the Kiwix wikipedia and full KA-Lite video library. From there, it's easier to just delete unused modules than try to add them after.

I haven't really thought through it much, but that's kind of my default idea for now.

On Tue, Aug 4, 2015 at 12:58 AM Sam Kinch <notifications@github.com < mailto:notifications@github.com notifications@github.com> > wrote:

Question for all...what should be the default content build on the CAP Recovery USB...here is a current list of folder sizes for the English modules:

root@WRTD-303N-Server:~# du -h -d 2 /media/RACHEL/rachel 57G /media/RACHEL/rachel/modules/TED 626M /media/RACHEL/rachel/modules/PhET 124K /media/RACHEL/rachel/modules/radiolab 5.7M /media/RACHEL/rachel/modules/powertyping 395M /media/RACHEL/rachel/modules/infonet 1.8G /media/RACHEL/rachel/modules/ebooks-en 2.4M /media/RACHEL/rachel/modules/understanding_algebra 241M /media/RACHEL/rachel/modules/math_expression 254M /media/RACHEL/rachel/modules/scratch 9.1M /media/RACHEL/rachel/modules/musictheory 6.0G /media/RACHEL/rachel/modules/wikipedia_for_schools 29M /media/RACHEL/rachel/modules/iicba 147M /media/RACHEL/rachel/modules/medline_plus 7.4G /media/RACHEL/rachel/modules/GCF 1.1G /media/RACHEL/rachel/modules/practical_action 131M /media/RACHEL/rachel/modules/olpc 116M /media/RACHEL/rachel/modules/asst_medical 762M /media/RACHEL/rachel/modules/hesperian_health 12G /media/RACHEL/rachel/modules/kaos-en 6.0M /media/RACHEL/rachel/modules/rpi_guide 120K /media/RACHEL/rachel/modules/ka-lite 155M /media/RACHEL/rachel/modules/windows_apps 1.2G /media/RACHEL/rachel/modules/ck12 89G /media/RACHEL/rachel/modules 23M /media/RACHEL/rachel/rsphider 4.0K /media/RACHEL/rachel/LOCAL_CONTENT 528K /media/RACHEL/rachel/art 780K /media/RACHEL/rachel/_h5ai 7.5M /media/RACHEL/rachel/.git 89G /media/RACHEL/rachel

Ouch...TED is biggggg.

— Reply to this email directly or view it on GitHub <

https://github.com/rachelproject/rachelplus/issues/18#issuecomment-127511709

.

— Reply to this email directly or view it on GitHub <

https://github.com/rachelproject/rachelplus/issues/18#issuecomment-127677804

. <

https://github.com/notifications/beacon/AMmq9Bh5uNZYjniXSS34rS1qf7yz1pnWks5okOkSgaJpZM4FbeR5.gif

— Reply to this email directly or view it on GitHub < https://github.com/rachelproject/rachelplus/issues/18#issuecomment-127821463

.

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18#issuecomment-128409907 .

j-schwartz commented 9 years ago

I was wrong about this. The recovery USB will wipe the HDD. I guess the recovery USB is only helpful to the extent we do include content backups also. Even if it's a select set of the overall content, that's probably the best way to do it. Do you think it can be done with one USB to reimage the eMMC and to repopulate content?

On Thu, Aug 6, 2015 at 9:46 AM Jeremy Schwartz jeremy@worldpossible.org wrote:

Actually, I think that even in a worst case scenario, the content on the internal 2.5" HDD will be fine. That content "shouldn't" get wiped for any reason. The devices themselves do brick with greater frequency than I ever imagined though. I think a USB recovery that simply reinstalls our core OS should be sufficient (8GB USB).

On Thu, Aug 6, 2015 at 8:25 AM Hackers for Charity < notifications@github.com> wrote:

I believe the idea Jeremy is proposing is that we provide the recovery USB with all content preloaded with each purchase of a CAP. That way, when catastrophe strikes and the CAP fails from a software issue, user interaction is minimal apart from plugging in the drive.

Still working on the other issues you brought up with the current 1.2.13 build.

On Aug 4, 2015, at 19:24, bnordha notifications@github.com wrote:

Jeremy

I think we should work through different scenarios.

In theory it is easier to remove things than to add. However, 90GB content would take me a several days to download here in Singapore. I would imagine in other locations it could take much longer.

I would really advocate a modular approach with the core Rachel skeleton and the ability to add content by module.

Bernd

From: Jeremy Schwartz [mailto:notifications@github.com notifications@github.com] Sent: Wednesday, 5 August, 2015 1:09 AM To: rachelproject/rachelplus rachelplus@noreply.github.com Cc: bnordha bernd.nordhausen@gmail.com Subject: Re: [rachelplus] RACHEL USB Recovery Image (#18)

My thought is to include it all, adding in the Kiwix wikipedia and full KA-Lite video library. From there, it's easier to just delete unused modules than try to add them after.

I haven't really thought through it much, but that's kind of my default idea for now.

On Tue, Aug 4, 2015 at 12:58 AM Sam Kinch <notifications@github.com < mailto:notifications@github.com notifications@github.com> > wrote:

Question for all...what should be the default content build on the CAP Recovery USB...here is a current list of folder sizes for the English modules:

root@WRTD-303N-Server:~# du -h -d 2 /media/RACHEL/rachel 57G /media/RACHEL/rachel/modules/TED 626M /media/RACHEL/rachel/modules/PhET 124K /media/RACHEL/rachel/modules/radiolab 5.7M /media/RACHEL/rachel/modules/powertyping 395M /media/RACHEL/rachel/modules/infonet 1.8G /media/RACHEL/rachel/modules/ebooks-en 2.4M /media/RACHEL/rachel/modules/understanding_algebra 241M /media/RACHEL/rachel/modules/math_expression 254M /media/RACHEL/rachel/modules/scratch 9.1M /media/RACHEL/rachel/modules/musictheory 6.0G /media/RACHEL/rachel/modules/wikipedia_for_schools 29M /media/RACHEL/rachel/modules/iicba 147M /media/RACHEL/rachel/modules/medline_plus 7.4G /media/RACHEL/rachel/modules/GCF 1.1G /media/RACHEL/rachel/modules/practical_action 131M /media/RACHEL/rachel/modules/olpc 116M /media/RACHEL/rachel/modules/asst_medical 762M /media/RACHEL/rachel/modules/hesperian_health 12G /media/RACHEL/rachel/modules/kaos-en 6.0M /media/RACHEL/rachel/modules/rpi_guide 120K /media/RACHEL/rachel/modules/ka-lite 155M /media/RACHEL/rachel/modules/windows_apps 1.2G /media/RACHEL/rachel/modules/ck12 89G /media/RACHEL/rachel/modules 23M /media/RACHEL/rachel/rsphider 4.0K /media/RACHEL/rachel/LOCAL_CONTENT 528K /media/RACHEL/rachel/art 780K /media/RACHEL/rachel/_h5ai 7.5M /media/RACHEL/rachel/.git 89G /media/RACHEL/rachel

Ouch...TED is biggggg.

— Reply to this email directly or view it on GitHub <

https://github.com/rachelproject/rachelplus/issues/18#issuecomment-127511709

.

— Reply to this email directly or view it on GitHub <

https://github.com/rachelproject/rachelplus/issues/18#issuecomment-127677804

. <

https://github.com/notifications/beacon/AMmq9Bh5uNZYjniXSS34rS1qf7yz1pnWks5okOkSgaJpZM4FbeR5.gif

— Reply to this email directly or view it on GitHub < https://github.com/rachelproject/rachelplus/issues/18#issuecomment-127821463

.

— Reply to this email directly or view it on GitHub https://github.com/rachelproject/rachelplus/issues/18#issuecomment-128409907 .

bnordha commented 9 years ago

How do you see the USB image being distributed?

A full English content set will be too big to fit on a USB thumb drive.

<---snipped email reply junk--->

spatiald commented 9 years ago

Well, your data is not wiped in the truest sense. The partitions are rewritten to not include the RACHEL. When you run my recovery, it rewrites the partitions appropriately. All data on RACHEL should be preserved.

<---snipped email reply junk--->

spatiald commented 9 years ago

My thoughts (feel free to argue for/against these ideas)

USB Recovery should be for repairing the current CAP (hence, the recovery USB aspect). If a remote user has content already populated on /dev/sda (any partition), it should not be touched.
The process should only rewrite the firmware and reapply our configuration. It should rewrite the partition schema for /dev/sda to our current setup, roughly:

/dev/sda1        20G   44M   19G   1% /media/preloaded
/dev/sda2        99G   60M   94G   1% /media/uploaded
/dev/sda3       339G   67M  321G   1% /media/RACHEL

Adding default content to the USB (for reinstall on recovery) is possible but there are too many variables to know what content is most appropriate (language, location specific, training material). We continue to add to our content repository; the amount (GBs) of content will only continue to grow.

Current USB Recovery (1.2.13)

This does not include Kiwix nor the Sphider database. I will update the USB recovery to include those items as well. I will also try a couple variations of rebuilding (from scratch with 1.2.4, from an already installed RACHEL and from the various firmware versions).

Definition of "bricked"?

@bnordha and @j-schwartz What are your definitions of "bricked"? I was testing across 5 CAPs and never really had one brick that I know of. When I think bricked, I usually need to recover using a serial or JTAG connector to the physical board.
What I have noticed:

bnordha commented 9 years ago

@spatiald For me Bricked means, I cannot access the device either via Wi-Fi or LAN connection at all. The way to revive it is to use the Intel USB recovery.

spatiald commented 9 years ago

I have not seen that yet. It's still bricked after rebooting one or more times?

bnordha commented 9 years ago

yes

j-schwartz commented 9 years ago

Bricked is just requiring the 5 minute process of re-imaging with the recovery tool to me.

I've had lots of bricked devices. Create an error in your /etc/rc.local - usually just a typo in an address for starting KA-lite could do it. From there, you'll never get the device to recover and finish booting. You'll need the USB recovery to gain access again.

edresor commented 9 years ago

GREAT NEWS FOR AFRICA. If I understand this correctly practically every case of "bricking" can be fixed with a USB Flash Drive, software, and patience, without opening up the CAP case. This means we can repair "bricked" CAPs anywhere in the world with step by step advice over WhatsApp or Skype. This compares very favorably with the adventures of unbricking that old standby Linksys WRT54G.

spatiald commented 9 years ago

Oh yeah! BIG NEWS for EVERYONE :)

Today, I finished work on the new USB Multitool image. It is being created as I write this. I should have it uploaded to Google Drive within 2 hours of this post (takes about 90 min to create an image). This is an exciting release as it creates a workflow that is variable and supports many things we spoke of over email/phone. The release notes (below) explain the image in detail. Test it and let me know. I ran it through my own testing and the results were positive (imaging statistics are also below).

For easier hard drive cloning, I picked up the StarTech.com USB 3.0 to 2.5/3.5in SATA Hard Drive Duplicator Docking Station from Amazon. Cloning the 500GB hard drive took about 1hr 20min.

I also used the original hard drive as a source (installed with a KA Lite build of RACHEL) and used a Samsung 850 EVO 500GB 2.5-Inch SATA III Internal SSD (MZ-75E500B/AM) as a target drive. I find that my demo CAP is handled a little roughly at conferences. People like to touch and pick it up. With a SSD, I don't have to worry about them dropping the CAP now.

The image is compressed with zip (reduced size from 3.76GB to 2.13GB) for reduced time downloading from Google Drive.

On Google Drive, I added couple items:

Enjoy and I look forward to your feedback on success/failures!

New RACHEL USB "Multitool" Image

Description

This is the first script to run when the CAP starts up. It will set the LED lights, install the saved partitions to the emmc, and then run 1 of 3 scenarios. A log file is now stored on the USB (called update.log). It should provide more detailed information when you encounter problems. Wireless AP installed is called "RACHEL".

METHOD of Install:

"Recovery" for end user CAP recovery (METHOD 1)

Copy boot, efi, and rootfs partitions to emmc Rewrite the hard drive partitions DO NOT format any hard drive partitions

"Imager" for large installs when cloning the hard drive (METHOD 2)

Copy boot, efi, and rootfs partitions to emmc Don't touch the hard drive (since you will swap with a cloned one)

"Format" for small installs and/or custom hard drive (METHOD 3)

WARNING: This will erase all partitions on the hard drive Copy boot, efi, and rootfs partitions to emmc Rewrite the hard drive partitions Format hard drive partitions Copy content shell to /media/RACHEL/rachel

LED Status Codes Explained

Wifi blink - Initial start up; check for USB
Wifi solid - Booting into USB linux image
Wifi breathing + dot - Starting update.sh script (in the top-level of the USB)
Wifi solid + dot - Update complete; copying log files
Wifi solid; NO dot - At completion, dot turns OFF when update is complete
Wifi blinking rapid; no dot - Update script failed; check log file

Instructions

  1. Download the USB Multitool image from Google Drive and compare its MD5
  2. Unzip the compressed image
  3. Burn the image to a 4GB (minimum USB) using the following command: sudo dd if=<path-to>/IntelCAP_RACHEL_USB-Multitool-v4_1-2-15_20150914.img of=/dev/<your-device-ID> bs=512
  4. On this USB, modify the "METHOD" variable in script “update.sh” (top-level of USB)
  5. Turn off the CAP
  6. Connect the recovery USB disk to the CAP
  7. Start the CAP
  8. Wait until the CAP finished the update (see LED status codes explained), then push the CAP power button once (no need to hold it down like previous USB recoveries) and wait a couple seconds for the CAP to power off. Remove the USB drive and start your CAP back up.

Troubleshooting

If the CAP doesn’t start successfully (LED indicators), restart the CAP and try again. The USB is not recognized as a valid update source about 10% of the time.

Statistics

1.2.15 Multitool METHOD 1

Wifi blink - 8s
Wifi solid - 52s
Wifi breathing + dot - 4m45s
Wifi solid + dot - 3s
(At completion, wifi solid; NO dot) 
Total time - 5m48s

1.2.15 Multitool METHOD 2

Wifi blink - 8s
Wifi solid - 52s
Wifi breathing + dot - 4m39s
Wifi solid + dot - 3s
(At completion, wifi solid; NO dot) 
Total time - 5m42s

1.2.15 Multitool METHOD 3

Wifi blink - 8s
Wifi solid - 52s
Wifi solid + dot - 0s
Wifi breathing + dot - 4m48s
Wifi solid + dot - 3s
(At completion, wifi solid; NO dot) 
Total time - 5m51s
j-schwartz commented 9 years ago

AMAZING. Can't wait to check this out.

Thanks, Sam.

spatiald commented 9 years ago

Everything is online and I updated my Release Notes above with the correct links to the file. sam

spatiald commented 9 years ago

One issue I just found...all startup commands are in /root/rachel-scripts.sh and that file is called from /etc/rc.local

The problem is the kiwix line in the rachel-scripts.sh file had bash at the beginning of it. It shouldn't...the current image should still work fine but you will need to correct that issue by removing the word bash from that line before kiwix will start.

I am fixing it now and will upload an new image (v2) when completed...sorry!

bnordha commented 9 years ago

Sam, Great stuff. I have tried the three options, and things are working like a charm.

One question one option #3 Format

Is the script supposed to create /media/RACHEL/rachel and copy over the content shell, or are we supposed to do that manually?

In my tests, the directory /media/RACHEL/rachel was not created. I created it manually and pulled down the content shell manually as well.

spatiald commented 9 years ago

Weird...it should create the partition and copy over the content shell. I will test that again. Thanks!

spatiald commented 9 years ago

BTW v2 is uploading now, v1 was moved to archive.

bnordha commented 9 years ago

There seems to be a difference when the HDD is really blank vs when the partitions and the contents exists but were overwritten. Bernd

bnordha commented 9 years ago

I just tested v2, and the issues does NOT appear any more. so looking good

spatiald commented 9 years ago

So, on version 2, starting from a blank CAP (basic 1.2.4) and then running METHOD 3 results in a properly formatted CAP with contentshell copied to /media/RACHEL/rachel?

I didn't thoroughly test that issue yet?

spatiald commented 9 years ago

Version 3 uploading now...includes installing of the captive portal files. I tested the format a couple times and it seems to work well. Check and let me know, thanks!!!

spatiald commented 9 years ago

Additional info on the v3 multitool

bnordha commented 9 years ago

I tested all three modes starting with a vanilla Intel build, and everything worked as advertised. This is much better than even the Intel USB recovery image process. great work.

edresor commented 9 years ago

I plan to try: "Recovery" for end user CAP recovery (METHOD 1) to bring my first CAP up to the current configuration. If I can make it work without wiping out the content on RACHEL, I plan to leave behind one or two USBs on my upcoming trip. I have 2 Questions:

  1. Can I use Win32DiskImager-0.9.5 instead of the Linux command to create the USB Flash Drives?
  2. With Method 1, will the content be preserved on the hard drive. I am confused by the following: Rewrite the hard drive partitions DO NOT format any hard drive partitions How can the program "Rewrite the hard drive partitions" without deleting all of the content files?

Thanks, Ed

spatiald commented 9 years ago

Yes on Question 1. You do have to unzip the file first. Also, ensure you have the latest version (v3) from Google Drive.

On #2, "rewrite" the partitions means the program will write the correct partition boundaries (that tells the computer how to read the hard drive).

One caution, "rewriting" will not touch the data as long as the hard drive was partitioned the same way before. Hence, the term recovery. All previous RACHEL USB recovery methods use the same partition schema.

If the hard drive was partitioned differently by you, then you will have issues post running Method 1.

Method 3 is the only method that will erase (format) the hard drive.

Sam

spatiald commented 9 years ago

I did want to add more clarification on what happens in Methods 1-3 with regards to the "rewrite" and "format"

On the CAP linux operating system, we use a GUID Partition Table (GPT).

This is my current GPT:

root@WRTD-303N-Server:/media/RACHEL/rachel# sgdisk -p /dev/sda
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): BF9E1CD3-536D-46C4-9801-7A26889C400B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4196318 sectors (2.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048        41945087   20.0 GiB    8300  preloaded
   2        44040192       253755391   100.0 GiB   8300  uploaded
   3       255852544       976771086   343.8 GiB   8300  RACHEL

For GPTs, the amount of data is not fixed, since GPT enables partition table sizes to vary. (Most disks support 128 partitions, but this isn't guaranteed to be true of every disk.) Your best bet is to use sgdisk to back up the data.

Before you run the USB Recovery, this will back up your GPT:

sgdisk -b gpt-sda.backup /dev/sda

If things go wrong, you can restore a backup with the -l (lowercase L; NOT a 1) option (to get your data back).

sgdisk -l gpt-sda.backup /dev/sda

When METHOD 1 "rewrites" the hard disk partitions, it is only rewriting the GPT to tell the operating system where those partition boundaries exist. It doesn't touch anything else on the disk.

As a thought, should I incorporate this backup on the USB Recovery and store the backups on the USB Recovery Drive or on the root partition of the CAP? Another place I could add it is to the configure script...what do you think?

spatiald commented 8 years ago

USB Recovery Image work well...closing issue.

arcangel44 commented 8 years ago

What can i do if the CAP is so bricked that doesn't even recognize the USB port? I restarted the CAP 20 times with the recovery Image (The recovery Image works with other CAPs). What can i do? Thanks!

spatiald commented 8 years ago

Initial question is why are you re-imaging so many times? Are you testing, etc?

Couple recovery options (in order of precedence to attempt):

sam

sypher47 commented 8 years ago

Hi @spatiald my question maybe unrelated to what you are talking about, but i couldn't find any other way of contacting you. I need help with ssh into the intel CAP, bought a new one and i want to install my node.js and lamp servers on it for my web app but i keep getting errors like:

ssh: connect to host wrtd-303n-server port 22: Operation timed out

But i have scanned the CAP port 22 seems to be open. I will appreciate anyone who can help me with this.

spatiald commented 8 years ago

Connect to the AP that is broadcasting (our installs use "RACHEL" while, based on what you wrote, your access point name is probably "WRTD-303N-XXXXXX". Where XXXXXX is a series of numbers/letters (it's really the last six characters of the CAPs MAC address).

Then, ssh to 192.168.88.1 Login user: root Pass: 123jkl

nakam28 commented 7 years ago

Hello, I performed a recovery of my CAP using the RACHEL USB Version 9.1.1 (December 5, 2016). I used the "Recovery" for end user CAP recovery (METHOD 1)

When I try to access my.content or 192.168.88.1, nothing happens.

Can you please advise what to do next?

I get the following when I run the command "df -h" ;

cap@WRTD-303N-Server:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p4 5.3G 3.0G 2.1G 59% / udev 943M 8.0K 943M 1% /dev tmpfs 383M 464K 382M 1% /run none 5.0M 0 5.0M 0% /run/lock none 956M 0 956M 0% /run/shm /dev/mmcblk0p3 181M 137M 35M 80% /boot /dev/mmcblk0p5 992M 1.3M 940M 1% /recovery /dev/mmcblk0p2 94M 58M 37M 61% /boot/efi ++++++++++++++++++++++++++++++++++

sgdisk shows the following:

cap@WRTD-303N-Server:~$ sudo sgdisk -p /dev/sda [sudo] password for cap: Disk /dev/sda: 976773168 sectors, 465.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): F1597019-7B83-4522-8C3E-7C2AA9E7B32F Partition table holds up to 128 entries First usable sector is 34, last usable sector is 976773134 Partitions will be aligned on 2048-sector boundaries Total free space is 4062 sectors (2.0 MiB)

Number Start (sector) End (sector) Size Code Name 1 2048 6293503 3.0 GiB 8300 preloaded 2 6293504 41945087 17.0 GiB 8300 uploaded 3 41945088 976771086 445.8 GiB 8300 RACHEL

+++++++++++++++++++++++++++++++++

cap@WRTD-303N-Server:~$ ls cap-rachel-configure.sh generate_recovery.sh led_control.sh disk_tools install_package.sh rachel-scripts please advise what to do next?

Hello, I performed a recovery of my CAP using the RACHEL USB Version 9.1.1 (December 5, 2016). I used the "Recovery" for end user CAP recovery (METHOD 1)

But when I try to access my.content or 192.168.88.1, nothing happens.

I get the following when I run the command "df -h" ;

cap@WRTD-303N-Server:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p4 5.3G 3.0G 2.1G 59% / udev 943M 8.0K 943M 1% /dev tmpfs 383M 464K 382M 1% /run none 5.0M 0 5.0M 0% /run/lock none 956M 0 956M 0% /run/shm /dev/mmcblk0p3 181M 137M 35M 80% /boot /dev/mmcblk0p5 992M 1.3M 940M 1% /recovery /dev/mmcblk0p2 94M 58M 37M 61% /boot/efi ++++++++++++++++++++++++++++++++++

sgdisk shows the following:

cap@WRTD-303N-Server:~$ sudo sgdisk -p /dev/sda [sudo] password for cap: Disk /dev/sda: 976773168 sectors, 465.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): F1597019-7B83-4522-8C3E-7C2AA9E7B32F Partition table holds up to 128 entries First usable sector is 34, last usable sector is 976773134 Partitions will be aligned on 2048-sector boundaries Total free space is 4062 sectors (2.0 MiB)

Number Start (sector) End (sector) Size Code Name 1 2048 6293503 3.0 GiB 8300 preloaded 2 6293504 41945087 17.0 GiB 8300 uploaded 3 41945088 976771086 445.8 GiB 8300 RACHEL

+++++++++++++++++++++++++++++++++

cap@WRTD-303N-Server:~$ ls cap-rachel-configure.sh generate_recovery.sh led_control.sh disk_tools install_package.sh rachel-scripts

spatiald commented 7 years ago

I think this issue may have been overlooked...the original issue was closed and there hasn't been activity for a year.

@nakam28 Are you still having your problem? It looks like the device didn't mount the partitions it was supposed to. Did you attempt to reboot? Did you attempt to re-recover using the USB?

needlestack commented 7 years ago

This is something I've also seen happen, though pretty rarely - no idea why. Perhaps we should run a sanity check after the partition and formatting script and give the error light if they're not there?

On Fri, Mar 3, 2017 at 3:54 AM Sam Kinch notifications@github.com wrote:

I think this issue may have been overlooked...the original issue was closed and there hasn't been activity for a year.

@nakam28 https://github.com/nakam28 Are you still having your problem? It looks like the device didn't mount the partitions it was supposed to. Did you attempt to reboot? Did you attempt to re-recover using the USB?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rachelproject/rachelplus/issues/18#issuecomment-283841989, or mute the thread https://github.com/notifications/unsubscribe-auth/AE7_rMOUI_s782AGO0_th4kpWuBN3Qk1ks5rh3LKgaJpZM4FbeR5 .

-- Jonathan Field jfield@worldpossible.org