Discussion:
Changing root device with flash-kernel and initramfs-tools?
Nate Bargmann
2018-10-01 16:59:48 UTC
Permalink
Greetings to the list!

I recently installed Stretch on my Olimex A20-OLinuXino-MICRO. The
installation was almost flawless (only needed to intervene to configure
the Ethernet port as detailed in the installation report Bug#909918).

At the time I had a root file system for the previous installation on an
SSD mounted from /dev/sda2. In that system it was simple matter of
editing /boot/boot.cmd and using mkimage to create a new
/boot/boot.scr. The problem, as I saw it, was that security updates for
the kernel were not being made available (a topic for another time), so
my choice to go with Stretch.

Since the installation an updated kernel has been installed by apt and
/boot/boot.scr has been updated to load the new kernel. No problem
there. The problem is that I want to rsync from u-SD card to the SSD
(offline with my laptop--done it numerous times) and I need to set the
boot files to point to the SSD partition.

I understand that I can probably drop a file into
/etc/flash-kernel/ubootenv.d that sets the rootfs u-boot environment
variable and run flash-kernel to update /boot/boot.scr (I've not
attempted this yet).

My question is how do I handle the initrd? Does initramfs-tools read
/boot/boot.scr and then update /conf/conf.d/default_root to the new
partition automagically, or do I need to update a config file that I've
yet to find before running initramfs-tools? In what order do these
commands need to be run?

I know I should have probably made an image of the SSD's partition in
question and then simply installed to the SATA device right off the bat,
but I didn't...

TIA

- Nate
--
"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."

Web: http://www.n0nb.us GPG key: D55A8819 GitHub: N0NB
Loading...