{"id":1356,"date":"2011-06-22T02:24:52","date_gmt":"2011-06-22T01:24:52","guid":{"rendered":"https:\/\/supportex.net\/?p=1356"},"modified":"2019-05-10T21:13:03","modified_gmt":"2019-05-10T19:13:03","slug":"install-centos-fedora-remotely","status":"publish","type":"post","link":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/","title":{"rendered":"How to Install CentOS or Fedora Remotely"},"content":{"rendered":"<p>The recently posted article describes how to remotely reinstall <a href=\"http:\/\/habrahabr.ru\/blogs\/sysadm\/101702\/\">Debian Linux<\/a>. In this post I&#8217;d like to share a quick and easy way to remotely install CentOS or Fedora. Anaconda installer can considerably simplify the procedure of installing or updating the operating system on a remote server.<br \/>\nHere is a quotation from the web page of the project where the anaconda options we&#8217;ll use are described:<\/p>\n<blockquote><p>anaconda is a fairly sophisticated installer. It supports installation from local and remote sources such as CDs and DVDs, images stored on a hard drive, NFS, HTTP, and FTP. Installation can be scripted with kickstart to provide a fully unattended installation that can be duplicated on scores of machines. It can also be run over VNC on headless machines.<\/p><\/blockquote>\n<p>Everything described below also fits for any Linux distribution package which uses grub to boot. Examples from the article were tested on grub 0.97, but grub2 can be used as well after making minor changes. Besides, I used this method when I replaced FreeBSD with Linux, after installing grub as a loader instead of regular Boot Manager.<\/p>\n<h3>Preparation involves four steps:<\/h3>\n<ol>\n<li>Determining network settings of the server;<\/li>\n<li>Loading images for the selected OS;<\/li>\n<li>Preparing the configuration and adding it to grub.conf;<\/li>\n<li>Server restart and connection to it through VNC.<\/li>\n<\/ol>\n<h3>Determining network settings of the server<\/h3>\n<p>You will need the gateway address, as well as server&#8217;s and DNS IP addresses. You also will need MAC address of the main network card. It is essential to specify the latter, because if the server has two network cards, it is likely that the installer will choose the wrong one. To determine the network settings, you can use the following commands:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">ifconfig\nip route show\ncat \/etc\/sysconfig\/network-scripts\/ifcfg-eth0\ncat \/etc\/sysconfig\/network\ncat \/etc\/resolv.conf<\/pre>\n<p>in our case they are the following:<\/p>\n<p><code>IP        172.17.17.232<br \/>\nGateway   172.17.17.1<br \/>\nDNS       172.17.17.1<br \/>\nMAC       52:54:00:4a:25:b5<\/code><\/p>\n<h3>Loading images<\/h3>\n<p>CentOS and Fedora use different images to boot the installer. You should pick the right images, depending on what distribution package you&#8217;re going to install. In addition, if are going to install a 32-bit version, you should replace x86_64 in url with i386.<\/p>\n<p>Images for centos 5.6 (x86_64):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">wget -O \/boot\/vmlinuz_remote http:\/\/mirrors.supportex.net\/centos\/5.6\/os\/x86_64\/isolinux\/vmlinuz\nwget -O \/boot\/initrd_remote.img http:\/\/mirrors.supportex.net\/centos\/5.6\/os\/x86_64\/isolinux\/initrd.img\n<\/pre>\n<p>Images for fedora 15 (x86_64):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">wget -O \/boot\/vmlinuz_remote http:\/\/download.fedora.redhat.com\/pub\/fedora\/linux\/releases\/15\/Fedora\/x86_64\/os\/isolinux\/vmlinuz\nwget -O \/boot\/initrd_remote.img http:\/\/download.fedora.redhat.com\/pub\/fedora\/linux\/releases\/15\/Fedora\/x86_64\/os\/isolinux\/initrd.img<\/pre>\n<p><strong>Preparing the configuration and adding it to grub.conf<\/strong><\/p>\n<p>Specify the gateway address, server&#8217;s and DNS IP addresses you saved earlier, as well as the URL where the installer will download rpm packages from. Also, specify optional parameters like absence of a monitor, selection of the particular network card, and a password for vnc.<\/p>\n<p>If <strong>\/boot<\/strong> partition isn&#8217;t the first one on the disk, correct the line root(hd0,0), so that it corresponds to the number of the partition.<\/p>\n<p>Now add these lines to grub.conf for Centos 5.6:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">title Remote Install\nroot (hd0,0)\nkernel \/vmlinuz_remote lang=en_US keymap=us method=http:\/\/mirrors.supportex.net\/centos\/5.6\/os\/x86_64\/  vnc vncpassword=SuperSecret ip=172.17.17.232 netmask=255.255.255.0 gateway=172.17.17.1 dns=172.17.17.1 noselinux ksdevice=52:54:00:4a:25:b5 headless xfs panic=120\ninitrd \/initrd_remote.img<\/pre>\n<p>or for fedora 15:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">title Remote Install\nroot (hd0,0)\nkernel \/vmlinuz_remote lang=en_US keymap=us method=http:\/\/download.fedora.redhat.com\/pub\/fedora\/linux\/releases\/15\/Fedora\/x86_64\/os\/ vnc vncpassword=SuperSecret ip=172.17.17.232 netmask=255.255.255.0 gateway=172.17.17.1 dns=172.17.17.1 noselinux ksdevice=52:54:00:4a:25:b5 headless xfs panic=120\ninitrd \/initrd_remote.img<\/pre>\n<p>It is assumed that this configuration is the second item in the menu. You&#8217;ve specified that grub should make one attempt to load it. If something goes wrong, you&#8217;ll go back to the pre-set distribution after a restart, in 120 seconds.<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">[root@localhost ~]# echo 'savedefault --default=1 --once' | grub --batch<\/code><\/p>\n<p>You can read about boot options of anaconda in more detail here <a href=\"http:\/\/fedoraproject.org\/wiki\/Anaconda\/Options\">http:\/\/fedoraproject.org\/wiki\/Anaconda\/Options<\/a><\/p>\n<h3>Server restart and connection to it through VNC<\/h3>\n<p>Reboot the server and wait until it begins to respond to ping. Additional packages will take some time to load, then it will be possible to connect through VNC. If the network isn&#8217;t fast enough, it may take about 20-30 minutes.<\/p>\n<p>Now connect to the server and do the same as on the local console: <code>vncviewer 172.17.17.232:1<\/code><br \/>\nIf you&#8217;re working from Windows, you can use <a href=\"http:\/\/www.tightvnc.com\/\">TightVNC<\/a>.<\/p>\n<h3>Tips<\/h3>\n<p>A VNC server starts without keep-alive, so if you are connected through nat, there is a chance to lose a session and no longer recover it due to unactivity. You&#8217;d better disconnect from vnc and then connect again, if VNC console isn&#8217;t going to be used for a long time.<\/p>\n<p>You needn&#8217;t format boot section as ext4, though both Fedora and Centos offer it by default. Sometimes, installed operating system doesn&#8217;t load from this section. It happens extremely rarely, but it&#8217;s better not to run the risk.<\/p>\n<p>If Fedora is installed in minimum configuration, &#8216;network&#8217; service turns out to be not activated. It can be fixed by adding <em>sshd<\/em> and <em>sshpw=password<\/em> to anaconda settings, specifying a password for ssh. Access the remote server through ssh and activate &#8216;network&#8217; service after the interactive installation is completed and before the installer is restarted:<\/p>\n<blockquote><p><code># chroot \/mnt\/sysimage<br \/>\n# chkconfig network on<br \/>\n# exit<br \/>\n<\/code><\/p><\/blockquote>\n<h3>External links<\/h3>\n<ul>\n<li>How to use Kickstart (Anaconda\u2019s remote control): <a href=\"http:\/\/www.redhat.com\/magazine\/024oct06\/features\/kickstart\/\">http:\/\/www.redhat.com\/magazine\/024oct06\/features\/kickstart\/<\/a><\/li>\n<li>Anaconda: <a href=\"http:\/\/fedoraproject.org\/wiki\/Anaconda\">http:\/\/fedoraproject.org\/wiki\/Anaconda<\/a><\/li>\n<li>Anaconda Boot Options: <a href=\"http:\/\/fedoraproject.org\/wiki\/Anaconda\/Options\">http:\/\/fedoraproject.org\/wiki\/Anaconda\/Options<\/a><\/li>\n<li>Install Fedora 14 Linux without a monitor (headless), keyboard and CD\/DVD:<br \/>\n<a href=\"http:\/\/www.shekhargovindarajan.com\/tips-n-tricks\/install-fedora-14-linux-without-a-monitor-headless-keyboard-and-cddvd\/\">http:\/\/www.shekhargovindarajan.com\/tips-n-tricks\/install-fedora-14-linux-without-a-monitor-headless-keyboard-and-cddvd\/<\/a><\/li>\n<li>Installing Fedora Using PXE Images:<br \/>\n<a href=\"http:\/\/fedoraunity.org\/solved\/installation-solutions\/installing-fedora-using-pxe-images\">http:\/\/fedoraunity.org\/solved\/installation-solutions\/installing-fedora-using-pxe-images<\/a><\/li>\n<\/ul>\n<p><strong>Didn&#8217;t find the answer to your question? <a href=\"\/contacts\/\">Ask it<\/a> our administrators to reply we will publish on website.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The recently posted article describes how to remotely reinstall Debian Linux. In this post I&#8217;d like to share a quick and easy way to remotely install CentOS or Fedora. Anaconda installer can considerably simplify the procedure of installing or updating the operating system on a remote server. Here is a quotation from the web page&hellip; <\/p>\n<div class=\"readmore-wrapper\"><a href=\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\" class=\"more-link\">Read <\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152],"tags":[212,213,275,214],"class_list":["post-1356","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos-en","tag-fedora-en","tag-linux","tag-remote-install-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install CentOS or Fedora Remotely &#8211; Supportex.NET blog<\/title>\n<meta name=\"description\" content=\"How to Install CentOS or Fedora Remotely\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install CentOS or Fedora Remotely &#8211; Supportex.NET blog\" \/>\n<meta property=\"og:description\" content=\"How to Install CentOS or Fedora Remotely\" \/>\n<meta property=\"og:url\" content=\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\" \/>\n<meta property=\"og:site_name\" content=\"Supportex.NET blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-06-22T01:24:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-10T19:13:03+00:00\" \/>\n<meta name=\"author\" content=\"andy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"andy\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\"},\"author\":{\"name\":\"andy\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/ba3d327991ae8992d1156ce10e579bef\"},\"headline\":\"How to Install CentOS or Fedora Remotely\",\"datePublished\":\"2011-06-22T01:24:52+00:00\",\"dateModified\":\"2019-05-10T19:13:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\"},\"wordCount\":809,\"commentCount\":0,\"keywords\":[\"CentOS\",\"Fedora\",\"linux\",\"remote install\"],\"articleSection\":[\"linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\",\"url\":\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\",\"name\":\"How to Install CentOS or Fedora Remotely &#8211; Supportex.NET blog\",\"isPartOf\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#website\"},\"datePublished\":\"2011-06-22T01:24:52+00:00\",\"dateModified\":\"2019-05-10T19:13:03+00:00\",\"author\":{\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/ba3d327991ae8992d1156ce10e579bef\"},\"description\":\"How to Install CentOS or Fedora Remotely\",\"breadcrumb\":{\"@id\":\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/supportex.net\/blog\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install CentOS or Fedora Remotely\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#website\",\"url\":\"https:\/\/supportex.net\/blog\/en\/\",\"name\":\"Supportex.NET blog\",\"description\":\"Server and network management company\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/supportex.net\/blog\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/ba3d327991ae8992d1156ce10e579bef\",\"name\":\"andy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/32540de415087e305c7a8c3a6df891d9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/32540de415087e305c7a8c3a6df891d9?s=96&d=mm&r=g\",\"caption\":\"andy\"},\"url\":\"https:\/\/supportex.net\/blog\/author\/andy\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install CentOS or Fedora Remotely &#8211; Supportex.NET blog","description":"How to Install CentOS or Fedora Remotely","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/","og_locale":"en_US","og_type":"article","og_title":"How to Install CentOS or Fedora Remotely &#8211; Supportex.NET blog","og_description":"How to Install CentOS or Fedora Remotely","og_url":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/","og_site_name":"Supportex.NET blog","article_published_time":"2011-06-22T01:24:52+00:00","article_modified_time":"2019-05-10T19:13:03+00:00","author":"andy","twitter_misc":{"Written by":"andy","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#article","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/"},"author":{"name":"andy","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/ba3d327991ae8992d1156ce10e579bef"},"headline":"How to Install CentOS or Fedora Remotely","datePublished":"2011-06-22T01:24:52+00:00","dateModified":"2019-05-10T19:13:03+00:00","mainEntityOfPage":{"@id":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/"},"wordCount":809,"commentCount":0,"keywords":["CentOS","Fedora","linux","remote install"],"articleSection":["linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/","url":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/","name":"How to Install CentOS or Fedora Remotely &#8211; Supportex.NET blog","isPartOf":{"@id":"https:\/\/supportex.net\/blog\/en\/#website"},"datePublished":"2011-06-22T01:24:52+00:00","dateModified":"2019-05-10T19:13:03+00:00","author":{"@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/ba3d327991ae8992d1156ce10e579bef"},"description":"How to Install CentOS or Fedora Remotely","breadcrumb":{"@id":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/supportex.net\/blog\/2011\/06\/install-centos-fedora-remotely\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/supportex.net\/blog\/en\/"},{"@type":"ListItem","position":2,"name":"How to Install CentOS or Fedora Remotely"}]},{"@type":"WebSite","@id":"https:\/\/supportex.net\/blog\/en\/#website","url":"https:\/\/supportex.net\/blog\/en\/","name":"Supportex.NET blog","description":"Server and network management company","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/supportex.net\/blog\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/ba3d327991ae8992d1156ce10e579bef","name":"andy","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/supportex.net\/blog\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/32540de415087e305c7a8c3a6df891d9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/32540de415087e305c7a8c3a6df891d9?s=96&d=mm&r=g","caption":"andy"},"url":"https:\/\/supportex.net\/blog\/author\/andy\/"}]}},"_links":{"self":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/1356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/comments?post=1356"}],"version-history":[{"count":2,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/1356\/revisions"}],"predecessor-version":[{"id":3241,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/posts\/1356\/revisions\/3241"}],"wp:attachment":[{"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/media?parent=1356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/categories?post=1356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/supportex.net\/blog\/wp-json\/wp\/v2\/tags?post=1356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}