{"id":218,"date":"2011-11-23T21:56:34","date_gmt":"2011-11-23T21:56:34","guid":{"rendered":"https:\/\/pim.famnit.upr.si\/wp\/?p=218"},"modified":"2021-11-17T11:21:07","modified_gmt":"2021-11-17T11:21:07","slug":"update-an-old-ubuntu-404-not-found-err-httpus-archive-ubuntu-com-failed-to-fetch","status":"publish","type":"post","link":"https:\/\/pim.famnit.upr.si\/wp\/?p=218","title":{"rendered":"Update an old Ubuntu: 404 Not Found; Err http:\/\/us.archive.ubuntu.com; Failed to fetch"},"content":{"rendered":"<p>Today I stumbled into a weird problem. My <strong>Ubuntu server 9.04 couldn&#8217;t update anymore<\/strong>. My \/etc\/apt\/sources.list looked like this:<\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp; deb-src http:\/\/archive.ubuntu.com\/ubuntu\/ jaunty main restricted universe multiverse<\/p>\n<p><strong>Running apt-get update<\/strong> gave all sorts of <strong>problems<\/strong> as it couldn&#8217;t find repository servers anymore:<\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp; $ sudo apt-get update<br \/>&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty Release.gpg<br \/>&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty Release<br \/>&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty\/main Packages<br \/>&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty\/universe Packages<br \/>&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty\/main Packages<br \/>&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty\/universe Packages<br \/>&nbsp; Err http:\/\/us.archive.ubuntu.com jaunty\/main Packages<br \/>&nbsp;&nbsp;&nbsp; 404 Not Found [IP: 91.189.92.180 80]<br \/>&nbsp; Err http:\/\/us.archive.ubuntu.com jaunty\/universe Packages<br \/>&nbsp;&nbsp;&nbsp; 404 Not Found [IP: 91.189.92.180 80]<br \/>&nbsp; W: Failed to fetch http:\/\/us.archive.ubuntu.com\/ubuntu\/dists\/jaunty\/main\/binary-i386\/Packages<br \/>&nbsp;&nbsp;&nbsp; 404 Not Found [IP: 91.189.92.180 80]<\/p>\n<p>&nbsp; W: Failed to fetch http:\/\/us.archive.ubuntu.com\/ubuntu\/dists\/jaunty\/universe\/binary-i386\/Packages<br \/>&nbsp; &nbsp; 404 Not Found [IP: 91.189.92.180 80]<\/p>\n<p>&nbsp; E: Some index files failed to download, they have been ignored, or old ones used instead. <\/p>\n<p>To <strong>upgrade a really old Ubuntu<\/strong> release, we first need to edit our sources.list and <strong>change<\/strong> all <strong>(xx.)archive.ubuntu.com<\/strong> to <strong>old-releases.ubuntu.com<\/strong>.<\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; $ sudo emacs \/etc\/apt\/sources.list<\/p>\n<p>So <strong>your lines should<\/strong> instead of <\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; deb http:\/\/archive.ubuntu.com\/ubuntu jaunty main restricted universe<\/p>\n<p><strong>look like<\/strong> <\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; deb http:\/\/old-releases.ubuntu.com\/ubuntu jaunty main restricted universe<\/p>\n<p>In this example <strong>I use jaunty<\/strong> release. But<strong> it works <\/strong>the same <strong>on other releases<\/strong>.<\/p>\n<p>Now update the repos<\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; $ sudo apt-get update<\/p>\n<p><strong>Install update-manager-core<\/strong> if it is not yet installed:<\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; $ sudo apt-get install update-manager-core<\/p>\n<p>And now <strong>upgrade the system<\/strong>.<\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; $ sudo do-release-upgrade<\/p>\n<p>Note that <strong>you can just upgrade to the next release<\/strong> (in my example from 9.04 to 9.10 or from LTS 8.04 to 10.04).<\/p>\n<p>Also note that if upgrading <strong>over the ssh<\/strong> session it is <strong>advised to run the upgrade in the screen<\/strong>. If the ssh session drops, the upgrade will continue to run. Install screen first (if not yet installed)<\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; $ sudo apt-get install screen<\/p>\n<p>Now <strong>run screen<\/strong><\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; $ screen<\/p>\n<p>And <strong>upgrade<\/strong> with <\/p>\n<p style=\"background-color: #ffffd2;\">&nbsp;&nbsp; $ sudo do-release-upgrade<\/p>\n<p>How to work with the screen is beyond this post. <\/p>\n<p><strong>EDIT 14. 9. 2014:<\/strong><\/p>\n<p>As Dmitry has mentioned in the comments, security packages should also be replaced with old-releases. So:<\/p>\n<\/p>\n<p><strong>security.ubuntu&#8230;. <\/strong>should be changed to<strong> old-releases.ubuntu&#8230;.<\/strong><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I stumbled into a weird problem. My Ubuntu server 9.04 couldn&#8217;t update anymore. My \/etc\/apt\/sources.list looked like this: &nbsp; deb-src http:\/\/archive.ubuntu.com\/ubuntu\/ jaunty main restricted universe multiverse Running apt-get update gave all sorts of problems as it couldn&#8217;t find repository servers anymore: &nbsp; $ sudo apt-get update&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty Release.gpg&nbsp; Ign http:\/\/us.archive.ubuntu.com jaunty Release&nbsp;&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-218","post","type-post","status-publish","format-standard","hentry","category-5-physical-interfaces"],"_links":{"self":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=218"}],"version-history":[{"count":1,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":775,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/218\/revisions\/775"}],"wp:attachment":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}