Updating without reimaging SD card

Hi,

I have a Beaglebone Black running kernel 3.8 (I think - I don’t have access to the BBB at the moment, so this is from memory).
I am using this with a cape to drive a custom display.

I am pretty sure it’s booting from SD card, which has multiple partitions (one labelled rootfs and not visible to windows, and one that windows can access). Both partitions are accessible when I plug into my linux VM.
The SD card is configured such that the display is all set on boot (not really sure how this happens), and I can call scripts that are on the FAT partition by SSHing into the BBB and running from the shell.

There’s a lot I don’t understand about the configuration of the SD card, but as it works, I’m not that fussed.

However, I now want to migrate this over to the Beaglebone Black Wireless and I’m having real difficulty.

My thoughts are that I need to upgrade the kernel to a version closer to 4.4, but I can’t seem to find a method of doing this without completely trashing the SD card.

If this makes sense, can anyone point me in the right direction?

Thanks

3.8 AND a dual partition... That is positively ANCIENT. Probably Debian
Wheezy, though maybe Debian Jessie in early releases. Wheezy was Debian v7,
Jessie v8, Stretch v9, and Buster (current release) is Debian v10.

  Wheezy has been out of support for years, Jessie support ended this
summer, and even Stretch is fading away. https://wiki.debian.org/LTS

  There have been many changes since Wheezy. Among them -- dropping the
FAT partition (a virtual READ-ONLY FAT) is created once the system boots --
primarily so one can read the getting-started information); Change from
kernel loading device tree overlays to u-boot loading device tree overlays;
u-boot automatically detecting an SD card for booting if it is present,
instead of having to hold down the boot-select button.

  So... First confirm what device is used for booting (if you have to
hold down the boot-select to boot, it is quite likely the SD card). If it
is booting from eMMC, this gets more difficult -- you will need to save any
customizations for the display onto other media, as updates will basically
wipe out the eMMC. If it IS the SD card, I would recommend you seal that
card in a plastic holder so you don't damage it. THEN:

  Obtain a more up-to-date OS image http://beagleboard.org/latest-images
    Note: if your display makes use of Xwindow features -- IE, a GUI
desktop, you'll need to find an LXQT image
https://elinux.org/Beagleboard:Latest-images-testing#Latest_Images_Testing

  Write it to a NEW 8+ GB (Balena Etcher is current preferred tool for
this).

  Insert it into the Beagle. Given the age of your system, you will
likely have to use the boot-select when booting it. Make sure you have a
network connection. SSH into the Beagle.

  Run sudo /opt/scripts/tools/grow-partition.sh (check the
spelling, I'm writing from memory since I did this for something like 8 SD
cards a few days ago). Reboot (again, you will likely need to hold down the
boot-select). This step makes the full SD card available, especially useful
if using an LXQT image (they've gotten to where there isn't any really user
space left in 4GB).

  Run sudo apt update
  Run sudo apt upgrade (to make sure the card image is
up-to-date).

  I suggest, at this point, after you've configured the OS (set up any
customizations in .bashrc .bash-aliases, etc. and run
sudo apt install ... for any packages you /know/ are needed) you now
edit the /boot/uEnv.txt and uncomment the last line. This turns
the card into a flasher.

  Make sure the Beagle is connected to a wall-wart power supply via
barrel connector -- USB connections may not provide enough power for
reliable flashing. Reboot (holding boot-select if needed). It should boot
and go into eMMC flashing mode (LEDs sweeping left/right). Let it run until
it shuts down by itself.

  REMOVE the SD card (if you leave it in, it will just reflash the
Beagle).

  Boot the Beagle -- this will be running from eMMC. You can now insert
the SD card, and mount it (or if you have some other Linux system, mount it
there). Go back into /boot/uEnv.txt and recomment the last line. This
disables the flasher mode, and makes the SD card a normal boot image. And
since you've flashed the eMMC, it should now have the updated u-boot which
will automatically use the SD card for booting if it is installed.

  Now -- getting your existing application to work on the new card (or
eMMC) is something I can't help you with. If it used a custom device tree
overlay, you'll have to edit /boot/uEnv.txt to add the overlay to one of
the overlay slots (uncomment slot, change file path). If it requires
special drivers, you may have to see if a driver is available via apt
install... (You see why I said save the original SD card).

  NOTE: while the new u-boot will automatically attempt booting from an
SD card -- the change between kernel device tree loading to u-boot device
tree loading means your old card may be a problem. u-boot will try to load
device trees from your card, and then when the kernel starts it will try to
load the same device trees -- you likely will need the boot-select button
to force usage of the old SD card u-boot.

Hello,

I know that took some time out to type up and make known to everyone (including myself). First off, thank you.

Secondly, yea boy! I always wondered what was going on while I was updating/upgrading/writing new images to BBB.

I remember having trouble w/ newer machines b/c they were flashed “who knows when” and all while S2/Boot buttons were pressed,
adding support for SD Cards, and saving particular info. as back up gave me the willies. Anyway, nice support. I thought I would add
some encouragement to not stop at this point.

Seth

P.S. But like with what Mr. Dennis was saying, all this can be trying on newer kernels/images w/out supportive ideas for older kernels/images. Wheezy
is when I jumped in to this hoopla. I knew exactly nothing about anything. Now, w/ time and effort (and reading some ideas), I have grown accustomed
to be catered w/ already “born” images. BBB!

Hey Dennis.

It looks like I’m going to have to understand exactly how the old SD card is put together to replicated the functionality.

Thanks for the support!