Two vintage headless/keyboardless systems were running ubuntu-server 16.04LTS (Alpha and Beta);
Access is only via ssh for both machines.
Alpha system was corrupted apparently during an update.
Booting by CD/DVD/UEFI is not an option. USB is turned off at the kernel due to incompatibilities that cause cpu to race at 100%.
Alpha's drive with unbootable system is now mounted as second drive in Beta's system.
All user files have been backed up to Beta's drive.
How to install ubuntu-server on Beta's second (Alpha) hard drive so that the second drive can be reinstalled as primary bootable drive in Alpha system?
kind regards, Ben
debootstrap and this url ( https://help.ubuntu.com/lts/installation-guide/i386/apds04.html ) get through most of the hurdles of the process by adding Alpha's drive to Beta as follows:
Alpha's drive is installed at /dev/hdb in Beta's system. Beta's drive is /dev/hda.
How to get grub-install/grub-probe/grub-mkconfig to ignore /dev/hda when looking for bootable kernel on /dev/hdb?
After removing Alpha's drive into Alpha system and rebooting, system doesn't boot. There are no obvious error logs in Alpha's drive (after re-installing/mounting in Beta). After a few cycles of this, I found:
grub-install's grub-probe detects Beta's kernel and associates the UUIDs from those (/dev/hda) instead of Alpha's installed ones at /dev/hdb
--even though user is chrooted into Alpha's drive ( /dev/sdb ) per instructions at help.ubuntu.com/lts/installation-guide/i386/apds04.html
I've run out of ideas on how to invoke grub-install/grub-probe/grub-mkconfig parameters to ignore /dev/hda.
For now, I will manually edit the grub file with bad referenced HD UUIDs: grub.cfg iirc. Let me know if there's a standard, less risky way to do this.