Last active
June 3, 2020 09:42
-
-
Save ThinGuy/3ffd460b8e785f69e4ca59dc96acc390 to your computer and use it in GitHub Desktop.
Fix “Hash sum mismatch” error in maas that can occur when a local mirror and maas' apt-proxy cache get out of sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To fix bad hashInsert the following as after "late_commands:" in /etc/maas/preseeds/curtin_userdata | |
prxyfix_01_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::http::Pipeline-Depth 0;' > /etc/apt/apt.conf.d/99FixBadProxy"] | |
prxyfix_02_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::http::No-Cache true;' >> /etc/apt/apt.conf.d/99FixBadProxy"] | |
prxyfix_03_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo 'Acquire::BrokenProxy true;' >> /etc/apt/apt.conf.d/99FixBadProxy"] | |
#Automatically insert above into /etc/maas/preseeds/curtin_userdata using sed | |
sudo sed -e '/late_commands:/a \ \ prxyfix_01_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '"'"'Acquire::http::Pipeline-Depth 0;'"'"' > /etc/apt/apt.conf.d/99FixBadProxy"]\n\ \ prxyfix_02_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '"'"'Acquire::http::No-Cache true;'"'"' >> /etc/apt/apt.conf.d/99FixBadProxy"]\n\ \ prxyfix_03_cmd: ["curtin", "in-target", "--", "sh", "-c", "/bin/echo '"'"'Acquire::BrokenProxy true;'"'"' >> /etc/apt/apt.conf.d/99FixBadProxy"]' -i /etc/maas/preseeds/curtin_userdata |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment