webtron Posted July 8, 2016 Posted July 8, 2016 I'm using vanilla Ubuntu Xenial 16.04 from http://www.armbian.com/lamobo-r1/ When I follow the forum posts for copying everything to the SATA drive and updating /etc/fstab and /boot/boot.cmd the system boots as expected to the SATA drive. The problem I have is I get prompted to upgrade it on boot using apt-get upgrade. This also upgrades the kernel version from 4.6.2 to 4.6.3. Because I have moved the system from the SD card to the SATA drive the new kernel doesn't load, only the old kernel with missing modules which causes problems. When the kernel updates it updates the SATA drive /boot directory but the device uses the sd card /boot directory so things get screwed up. I followed and read all the forum posts I could find on booting from the SATA drive and couldn't any reference to this so I'm not sure I missed something. Anyway my solution was to remove the /boot directory from the SATA drive and symlink it from the /boot directory on the SD card and it all appears to work and the new kernel now shows up when I run uname -r . The correct modules now load with the updated kernel too. Get the drive assignments fdisk -l Change below to match drives SDCARD='mmcblk0p1' SATA='sda1' Create the temp directories mkdir /tmp/1 /tmp/target mount /dev/$SDCARD /tmp/1 mount /dev/$SATA /tmp/target Modify the fstab and bootcmd files to match sed -i -e "s/$SDCARD/$SATA/g" /tmp/1/etc/fstab sed -i -e "s/$SDCARD/$SATA/g" /tmp/1/boot/boot.cmd mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr Set the sdcard to auto mount in /tmp/boot echo "/dev/$SDCARD /tmp/boot/ ext4 defaults 0 1" >> /tmp/1/etc/fstab Copy all the files across to the sata drive (cd /tmp/1; tar --backup -c *) |tar -C /tmp/target -xv Remove the boot directory from the sata drive and symlink it to the sdcard boot directory rm -Rf /tmp/target/boot ln -s /tmp/boot/boot/ /tmp/target/boot sync Then reboot reboot
Igor Posted July 8, 2016 Posted July 8, 2016 You were using out nand-sata-installer or you manually moved system to SATA at first place?
webtron Posted July 8, 2016 Author Posted July 8, 2016 Manually moved to sata. I've only just started looking at this and don't know what your nand-sata-installer is.
Igor Posted July 8, 2016 Posted July 8, 2016 Installer do the job for you and upgrades works by default when using our SATA/USB/NAND install tool. All you need to do is to create a proper mount. Your SD /boot must be /boot on destination media beside things you already done.
webtron Posted July 8, 2016 Author Posted July 8, 2016 Thanks I've found your script on github and will try that once I finish what I'm experimenting with. 1
Recommended Posts