gh2o / digitalocean-debian-to-arch

Script to convert a Debian installation on DigitalOcean to Arch Linux
MIT License
830 stars 69 forks source link

occasionally fails to reread the partition table #72

Closed doy closed 5 years ago

doy commented 5 years ago

every once in a while (this happens very inconsistently), the script will fail to reread the partition table after running the blockplan due to /dev/vda still being in use. this typically manifests as a hang, because the script sets -e and the blockdev call returns an error, so it never gets to the point of rebooting (and even if you reboot manually, grub won't have been set up). after the switch-root, stdout from the script is no longer going anywhere useful, so i had to track this down by adding more debug logging to stage4. not sure what the root cause is, but it's not a timing thing - retrying the blockdev call on failure will just sit in a loop retrying forever when this happens.

HLFH commented 5 years ago

@doy Is your PR enough https://github.com/gh2o/digitalocean-debian-to-arch/pull/70 to make it work after hard reboot?

EDIT: waiting DO to support custom .ISO images. In the meantime, I am going with a snapshot of a working ArchLinux droplet.

doy commented 5 years ago

70 is a separate issue.

gh2o commented 5 years ago

Issue was that a stray systemd process was keeping /dev/vda open. Should be fixed in latest master.