monome / norns-image

81 stars 16 forks source link

image update guide #10

Closed tehn closed 6 years ago

tehn commented 6 years ago

instructions (including photos) for using usb-disk mode and reading/writing the complete disk image.

this will not be a common procedure, but just in case.

ranch-verdin commented 6 years ago

tried bumping up the cairotest service up the queue using DefaultDependencies=no, managed to soft-brick the device!

So it'd be quite handy to get those instructions on usb-disk-mode...

another stupid question - anyone know how to manually remove the cairotest service once my laptop manages to mount the eMMC root partition?

tehn commented 6 years ago

coming right up

On Thu, Feb 1, 2018 at 12:18 PM ranch-verdin notifications@github.com wrote:

tried bumping up the cairotest service up the queue using DefaultDependencies=no, managed to soft-brick the device!

So it'd be quite handy to get those instructions on usb-disk-mode...

another stupid question - anyone know how to manually remove the cairotest service once my laptop manages to mount the eMMC root partition?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tehn/norns-image/issues/10#issuecomment-362337851, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPEcAmIFfZAPBFO3WrVXg_B2Lah47jEks5tQfHcgaJpZM4R0jFN .

tehn commented 6 years ago

@ranch-verdin here it is!

this needs to be put into the repo, i'll do that later.

img_4186

to open the cm3's emmc in usb disk mode:

software

https://www.raspberrypi.org/documentation/hardware/computemodule/cm-emmc-flashing.md

summary:

sudo apt-get install libusb-1.0-0-dev
git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
make
sudo ./rpiboot

you'll then get a new disk in /dev/sd?

you can go modify the files of your emmc then, to fix the boot process.

the instructions are also there to do a full disk write, but i don't have a disk image online that i'd suggest using at the moment-- also no need to start over, just fix your error to get it booting.

ranch-verdin commented 6 years ago

appending systemd.unit=rescue.target to /boot/cmdline.txt got me out of trouble this time.

as a sidenote, sudo sulogin is broken on this install. We should fix it because systemd fails when trying to execute this command for systemd.unit=rescue.target & systemd.unit=emergency.target

Only managed to get out of trouble because systemd somehow went around the faulty service after failing to give a root shell

EDIT: sudo sulogin can be fixed by setting the root password:

sudo su
passwd

also here is an informative link for systemd recovery https://freedesktop.org/wiki/Software/systemd/Debugging/

tehn commented 6 years ago

https://github.com/tehn/norns-image/blob/master/readme-usbdisk.md