apt-get upgrade breaks file system

I’m running latest Debian 8.7 IoT image from http://beagleboard.org/latest-images on the internal memory of a BBBW.
No sd-card attached, no custom device tree, no kernel-update so far, basically a bare image I have been playing around with for the last 3 weeks.
After deciding to do an apt-get upgrade the file system went to read-only.
I did a fsck, fixed quite a few corruptions, rebooted.
After reboot it wouldn’t boot properly and gave me this:

`
U-Boot SPL 2017.03-00002-gd12b1519b4 (Mar 14 2017 - 10:28:26)
Trying to boot from MMC2

U-Boot 2017.03-00002-gd12b1519b4 (Mar 14 2017 - 10:28:26 -0500), Build: jenkins-github_Bootloader-Builder-532

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
Reset Source: Power-on reset has occurred.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

not set. Validating first E-fuse MAC
BeagleBone Black:
Model: BeagleBoard.org BeagleBone Black Wireless:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
Could not get PHY for cpsw: addr 0
cpsw
Press SPACE to abort autoboot in 2 seconds
board_name=[BBBW] …
Card did not respond to voltage select!
mmc_init: -95, time 13
Card did not respond to voltage select!
mmc_init: -95, time 13
Card did not respond to voltage select!
mmc_init: -95, time 12
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
mmc_init: -95, time 12
Card did not respond to voltage select!
mmc_init: -95, time 12
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
Checking for: /boot.scr …
Checking for: /boot/boot.scr …
Checking for: /boot/uEnv.txt …
gpio: pin 55 (gpio 55) value is 1
2035 bytes read in 15 ms (131.8 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt…
gpio: pin 56 (gpio 56) value is 1
Running uname_boot …
loading /boot/vmlinuz-4.4.54-ti-r93 …
8652712 bytes read in 564 ms (14.6 MiB/s)
loading /boot/dtbs/4.4.54-ti-r93/am335x-boneblack-wireless.dtb …
59486 bytes read in 49 ms (1.2 MiB/s)
uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable…
loading /boot/initrd.img-4.4.54-ti-r93 …
5307139 bytes read in 351 ms (14.4 MiB/s)
debug: [console=ttyO0,115200n8 root=UUID=736d1e37-69fd-4296-a1e0-25b290a7fa4c ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet cape_universal=enable] …
debug: [bootz 0x82000000 0x88080000:50fb03 0x88000000] …

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8faf0000, end 8ffffb03 … OK
Loading Device Tree to 8fade000, end 8faef85d … OK

Starting kernel …

[ 0.001072] clocksource_probe: no matching clocksources found
[ 2.076057] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 2.315853] omap_voltage_late_init: Voltage driver support not added
[ 2.323806] PM: Cannot get wkup_m3_ipc handle
Loading, please wait…
[ 4.949860] remoteproc1: failed to load am335x-pru0-fw
[ 4.990887] remoteproc1: request_firmware failed: -2
[ 4.996028] pru-rproc 4a334000.pru0: rproc_boot failed
[ 5.118447] remoteproc1: failed to load am335x-pru1-fw
[ 5.135093] remoteproc1: request_firmware failed: -2
[ 5.140266] pru-rproc 4a338000.pru1: rproc_boot failed
rootfs contains a file system with errors, check forced.
rootfs: Invalid inode number for ‘.’ in directory inode 37762.

rootfs: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4
The root filesystem on /dev/mmcblk1p1 requires a manual fsck
modprobe: module i8042 not found in modules.dep
modprobe: module ehci-pci not found in modules.dep
modprobe: module ehci-orion not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep
modprobe: module ohci-hcd not found in modules.dep

BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

/bin/sh: can’t access tty; job control turned off

`

I ran fsck /dev/mmcblk1p1, again fixed a few errors, rebooted.

The Beaglebone would reboot and let me log in but afterwards shows this:

root@beaglebone:~# [ 38.816416] pinctrl-single 44e10800.pinmux: pin 44e109ac.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_25_pinmux
[ 38.828307] pinctrl-single 44e10800.pinmux: pin-107 (ocp:P9_25_pinmux) status -22
[ 38.835899] pinctrl-single 44e10800.pinmux: could not request pin 107 (44e109ac.0) from group pinmux_P9_25_default_pin on device pinctrl-single
[ 38.848944] bone-pinmux-helper ocp:P9_25_pinmux: Error applying setting, reverse things back
[ 38.960624] pinctrl-single 44e10800.pinmux: pin 44e109ac.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_25_pinmux
[ 38.972486] pinctrl-single 44e10800.pinmux: pin-107 (ocp:P9_25_pinmux) status -22
[ 38.980072] pinctrl-single 44e10800.pinmux: could not request pin 107 (44e109ac.0) from group pinmux_P9_25_default_pin on device pinctrl-single
[ 38.993114] bone-pinmux-helper ocp:P9_25_pinmux: Error applying setting, reverse things back
[ 39.001657] bone-pinmux-helper ocp:P9_25_pinmux: Failed to select default state
[ 39.152755] pinctrl-single 44e10800.pinmux: pin 44e1099c.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_28_pinmux
[ 39.164644] pinctrl-single 44e10800.pinmux: pin-103 (ocp:P9_28_pinmux) status -22
[ 39.172235] pinctrl-single 44e10800.pinmux: could not request pin 103 (44e1099c.0) from group pinmux_P9_28_default_pin on device pinctrl-single
[ 39.185275] bone-pinmux-helper ocp:P9_28_pinmux: Error applying setting, reverse things back
[ 39.298314] pinctrl-single 44e10800.pinmux: pin 44e1099c.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_28_pinmux
[ 39.310202] pinctrl-single 44e10800.pinmux: pin-103 (ocp:P9_28_pinmux) status -22
[ 39.317802] pinctrl-single 44e10800.pinmux: could not request pin 103 (44e1099c.0) from group pinmux_P9_28_default_pin on device pinctrl-single
[ 39.330861] bone-pinmux-helper ocp:P9_28_pinmux: Error applying setting, reverse things back
[ 39.339361] bone-pinmux-helper ocp:P9_28_pinmux: Failed to select default state
[ 39.479665] pinctrl-single 44e10800.pinmux: pin 44e10994.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_29_pinmux
[ 39.491499] pinctrl-single 44e10800.pinmux: pin-101 (ocp:P9_29_pinmux) status -22
[ 39.499100] pinctrl-single 44e10800.pinmux: could not request pin 101 (44e10994.0) from group pinmux_P9_29_default_pin on device pinctrl-single
[ 39.512143] bone-pinmux-helper ocp:P9_29_pinmux: Error applying setting, reverse things back
[ 39.621328] pinctrl-single 44e10800.pinmux: pin 44e10994.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_29_pinmux
[ 39.633223] pinctrl-single 44e10800.pinmux: pin-101 (ocp:P9_29_pinmux) status -22
[ 39.640806] pinctrl-single 44e10800.pinmux: could not request pin 101 (44e10994.0) from group pinmux_P9_29_default_pin on device pinctrl-single
[ 39.653876] bone-pinmux-helper ocp:P9_29_pinmux: Error applying setting, reverse things back
[ 39.662406] bone-pinmux-helper ocp:P9_29_pinmux: Failed to select default state
[ 39.810478] pinctrl-single 44e10800.pinmux: pin 44e10990.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_31_pinmux
[ 39.822348] pinctrl-single 44e10800.pinmux: pin-100 (ocp:P9_31_pinmux) status -22
[ 39.829939] pinctrl-single 44e10800.pinmux: could not request pin 100 (44e10990.0) from group pinmux_P9_31_default_pin on device pinctrl-single
[ 39.842980] bone-pinmux-helper ocp:P9_31_pinmux: Error applying setting, reverse things back
[ 39.969353] pinctrl-single 44e10800.pinmux: pin 44e10990.0 already requested by 48038000.mcasp; cannot claim for ocp:P9_31_pinmux
[ 39.981291] pinctrl-single 44e10800.pinmux: pin-100 (ocp:P9_31_pinmux) status -22
[ 39.988865] pinctrl-single 44e10800.pinmux: could not request pin 100 (44e10990.0) from group pinmux_P9_31_default_pin on device pinctrl-single
[ 40.001904] bone-pinmux-helper ocp:P9_31_pinmux: Error applying setting, reverse things back
[ 40.010405] bone-pinmux-helper ocp:P9_31_pinmux: Failed to select default state
systemctl enable co

Any ideas what went wrong or how to fix this?

Powersource is the USB-cable…

I'm running latest Debian 8.7 IoT image from
http://beagleboard.org/latest-images on the internal memory of a BBBW.
No sd-card attached, no custom device tree, no kernel-update so far,
basically a bare image I have been playing around with for the last 3 weeks.
After deciding to do an apt-get upgrade the file system went to read-only.
I did a fsck, fixed quite a few corruptions, rebooted.
After reboot it wouldn't boot properly and gave me this:

U-Boot SPL 2017.03-00002-gd12b1519b4 (Mar 14 2017 - 10:28:26)
Trying to boot from MMC2

U-Boot 2017.03-00002-gd12b1519b4 (Mar 14 2017 - 10:28:26 -0500), Build:
jenkins-github_Bootloader-Builder-532

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
Reset Source: Power-on reset has occurred.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
Model: BeagleBoard.org BeagleBone Black Wireless:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
Could not get PHY for cpsw: addr 0
cpsw
Press SPACE to abort autoboot in 2 seconds
board_name=[BBBW] ...
Card did not respond to voltage select!
mmc_init: -95, time 13
Card did not respond to voltage select!
mmc_init: -95, time 13
Card did not respond to voltage select!
mmc_init: -95, time 12
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
mmc_init: -95, time 12
Card did not respond to voltage select!
mmc_init: -95, time 12
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2035 bytes read in 15 ms (131.8 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.4.54-ti-r93 ...
8652712 bytes read in 564 ms (14.6 MiB/s)
loading /boot/dtbs/4.4.54-ti-r93/am335x-boneblack-wireless.dtb ...
59486 bytes read in 49 ms (1.2 MiB/s)
uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable...
loading /boot/initrd.img-4.4.54-ti-r93 ...
5307139 bytes read in 351 ms (14.4 MiB/s)
debug: [console=ttyO0,115200n8
root=UUID=736d1e37-69fd-4296-a1e0-25b290a7fa4c ro rootfstype=ext4 rootwait
coherent_pool=1M net.ifnames=0 quiet cape_universal=enable] ...
debug: [bootz 0x82000000 0x88080000:50fb03 0x88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8faf0000, end 8ffffb03 ... OK
   Loading Device Tree to 8fade000, end 8faef85d ... OK

Starting kernel ...

[ 0.001072] clocksource_probe: no matching clocksources found
[ 2.076057] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 2.315853] omap_voltage_late_init: Voltage driver support not added
[ 2.323806] PM: Cannot get wkup_m3_ipc handle
Loading, please wait...
[ 4.949860] remoteproc1: failed to load am335x-pru0-fw
[ 4.990887] remoteproc1: request_firmware failed: -2
[ 4.996028] pru-rproc 4a334000.pru0: rproc_boot failed
[ 5.118447] remoteproc1: failed to load am335x-pru1-fw
[ 5.135093] remoteproc1: request_firmware failed: -2
[ 5.140266] pru-rproc 4a338000.pru1: rproc_boot failed
rootfs contains a file system with errors, check forced.
rootfs:
Invalid inode number for '.' in directory inode 37762.

rootfs: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck exited with status code 4
The root filesystem on /dev/mmcblk1p1 requires a manual fsck
modprobe: module i8042 not found in modules.dep
modprobe: module ehci-pci not found in modules.dep
modprobe: module ehci-orion not found in modules.dep
modprobe: module uhci-hcd not found in modules.dep
modprobe: module ohci-hcd not found in modules.dep

BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off

I ran `fsck /dev/mmcblk1p1`, again fixed a few errors, rebooted.

The Beaglebone would reboot and let me log in but afterwards shows this:

Ttat's ^ ab-normal..

root@beaglebone:~# [ 38.816416] pinctrl-single 44e10800.pinmux: pin
44e109ac.0 already requested by 48038000.mcasp; cannot claim for
ocp:P9_25_pinmux
[ 38.828307] pinctrl-single 44e10800.pinmux: pin-107 (ocp:P9_25_pinmux)
status -22
[ 38.835899] pinctrl-single 44e10800.pinmux: could not request pin 107
(44e109ac.0) from group pinmux_P9_25_default_pin on device pinctrl-single
[ 38.848944] bone-pinmux-helper ocp:P9_25_pinmux: Error applying setting,
reverse things back
[ 38.960624] pinctrl-single 44e10800.pinmux: pin 44e109ac.0 already
requested by 48038000.mcasp; cannot claim for ocp:P9_25_pinmux
[ 38.972486] pinctrl-single 44e10800.pinmux: pin-107 (ocp:P9_25_pinmux)
status -22
[ 38.980072] pinctrl-single 44e10800.pinmux: could not request pin 107
(44e109ac.0) from group pinmux_P9_25_default_pin on device pinctrl-single
[ 38.993114] bone-pinmux-helper ocp:P9_25_pinmux: Error applying setting,
reverse things back
[ 39.001657] bone-pinmux-helper ocp:P9_25_pinmux: Failed to select default
state
[ 39.152755] pinctrl-single 44e10800.pinmux: pin 44e1099c.0 already
requested by 48038000.mcasp; cannot claim for ocp:P9_28_pinmux
[ 39.164644] pinctrl-single 44e10800.pinmux: pin-103 (ocp:P9_28_pinmux)
status -22
[ 39.172235] pinctrl-single 44e10800.pinmux: could not request pin 103
(44e1099c.0) from group pinmux_P9_28_default_pin on device pinctrl-single
[ 39.185275] bone-pinmux-helper ocp:P9_28_pinmux: Error applying setting,
reverse things back
[ 39.298314] pinctrl-single 44e10800.pinmux: pin 44e1099c.0 already
requested by 48038000.mcasp; cannot claim for ocp:P9_28_pinmux
[ 39.310202] pinctrl-single 44e10800.pinmux: pin-103 (ocp:P9_28_pinmux)
status -22
[ 39.317802] pinctrl-single 44e10800.pinmux: could not request pin 103
(44e1099c.0) from group pinmux_P9_28_default_pin on device pinctrl-single
[ 39.330861] bone-pinmux-helper ocp:P9_28_pinmux: Error applying setting,
reverse things back
[ 39.339361] bone-pinmux-helper ocp:P9_28_pinmux: Failed to select default
state
[ 39.479665] pinctrl-single 44e10800.pinmux: pin 44e10994.0 already
requested by 48038000.mcasp; cannot claim for ocp:P9_29_pinmux
[ 39.491499] pinctrl-single 44e10800.pinmux: pin-101 (ocp:P9_29_pinmux)
status -22
[ 39.499100] pinctrl-single 44e10800.pinmux: could not request pin 101
(44e10994.0) from group pinmux_P9_29_default_pin on device pinctrl-single
[ 39.512143] bone-pinmux-helper ocp:P9_29_pinmux: Error applying setting,
reverse things back
[ 39.621328] pinctrl-single 44e10800.pinmux: pin 44e10994.0 already
requested by 48038000.mcasp; cannot claim for ocp:P9_29_pinmux
[ 39.633223] pinctrl-single 44e10800.pinmux: pin-101 (ocp:P9_29_pinmux)
status -22
[ 39.640806] pinctrl-single 44e10800.pinmux: could not request pin 101
(44e10994.0) from group pinmux_P9_29_default_pin on device pinctrl-single
[ 39.653876] bone-pinmux-helper ocp:P9_29_pinmux: Error applying setting,
reverse things back
[ 39.662406] bone-pinmux-helper ocp:P9_29_pinmux: Failed to select default
state
[ 39.810478] pinctrl-single 44e10800.pinmux: pin 44e10990.0 already
requested by 48038000.mcasp; cannot claim for ocp:P9_31_pinmux
[ 39.822348] pinctrl-single 44e10800.pinmux: pin-100 (ocp:P9_31_pinmux)
status -22
[ 39.829939] pinctrl-single 44e10800.pinmux: could not request pin 100
(44e10990.0) from group pinmux_P9_31_default_pin on device pinctrl-single
[ 39.842980] bone-pinmux-helper ocp:P9_31_pinmux: Error applying setting,
reverse things back
[ 39.969353] pinctrl-single 44e10800.pinmux: pin 44e10990.0 already
requested by 48038000.mcasp; cannot claim for ocp:P9_31_pinmux
[ 39.981291] pinctrl-single 44e10800.pinmux: pin-100 (ocp:P9_31_pinmux)
status -22
[ 39.988865] pinctrl-single 44e10800.pinmux: could not request pin 100
(44e10990.0) from group pinmux_P9_31_default_pin on device pinctrl-single
[ 40.001904] bone-pinmux-helper ocp:P9_31_pinmux: Error applying setting,
reverse things back
[ 40.010405] bone-pinmux-helper ocp:P9_31_pinmux: Failed to select default
state
systemctl enable co

Any ideas what went wrong or how to fix this?

That ^ can be fixed by:

cd /opt/scripts/
git pull

Regards,

I would recommend, when you run into issues such as this that you DO NOT mess things up further by trying to fix it. Chances are pretty good for some reason, your system is corrupt. As such be treated as a hostile environment. Get your important files off NOW then start over from scratch.

I’ve had this happen to me a handful of times in the last 4 or so years working with this hardware, and it’ll never end up well, until you start over.