{"id":612,"date":"2012-11-10T22:32:56","date_gmt":"2012-11-11T04:32:56","guid":{"rendered":"http:\/\/nodakengineering.com\/?page_id=612"},"modified":"2012-11-12T22:13:32","modified_gmt":"2012-11-13T04:13:32","slug":"lfs-build-environment-page-6","status":"publish","type":"page","link":"https:\/\/nodakengineering.com\/?page_id=612","title":{"rendered":"LFS Build Environment (Page 6)"},"content":{"rendered":"<h3>Connect LFS Drive and Final Setup<\/h3>\n<p>Time to add the LFS hard drive to the host VM (it would be prudent to move the LFS.vdi cloned previously to the same directory as the Slackware.vdi):<\/p>\n<figure id=\"attachment_667\" aria-describedby=\"caption-attachment-667\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Add-Disk.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-667\" title=\"LFS Add Disk\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Add-Disk-300x220.jpg\" alt=\"LFS Add Disk\" width=\"300\" height=\"220\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Add-Disk-300x220.jpg 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Add-Disk.jpg 645w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-667\" class=\"wp-caption-text\">LFS Add Disk<\/figcaption><\/figure>\n<p>Open up the storage settings and highlight the SATA Controller and click on the little platter icon<\/p>\n<figure id=\"attachment_668\" aria-describedby=\"caption-attachment-668\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Choose-Disk.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-668\" title=\"LFS Choose Disk\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Choose-Disk-300x140.jpg\" alt=\"LFS Choose Disk\" width=\"300\" height=\"140\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Choose-Disk-300x140.jpg 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Choose-Disk.jpg 317w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-668\" class=\"wp-caption-text\">LFS Choose Disk<\/figcaption><\/figure>\n<p>Select <strong>Choose existing disk<\/strong> if you cloned the Slackware VDI earlier (otherwise select <strong>Create new disk<\/strong> and follow the procedures <a title=\"LFS Build Environment (Page 3)\" href=\"http:\/\/nodakengineering.com\/?page_id=503\"><strong>here<\/strong><\/a> to create the LFS drive)<\/p>\n<figure id=\"attachment_669\" aria-describedby=\"caption-attachment-669\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Storage.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-669\" title=\"LFS Storage\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Storage-300x220.jpg\" alt=\"LFS Storage\" width=\"300\" height=\"220\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Storage-300x220.jpg 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/LFS-Storage.jpg 645w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-669\" class=\"wp-caption-text\">LFS Storage<\/figcaption><\/figure>\n<p>Browse to the location of the LFS.vdi and select it&#8230;it is now added to the host VM<\/p>\n<p>Now that we have our Slackware host VM setup and the LFS drive connected, let&#8217;s discuss how to SSH into the Slackware host:<\/p>\n<figure id=\"attachment_670\" aria-describedby=\"caption-attachment-670\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Port-Forwarding.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-670\" title=\"Slackware Port Forwarding\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Port-Forwarding-300x220.jpg\" alt=\"Slackware Port Forwarding\" width=\"300\" height=\"220\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Port-Forwarding-300x220.jpg 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Port-Forwarding.jpg 645w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-670\" class=\"wp-caption-text\">Slackware Port Forwarding<\/figcaption><\/figure>\n<p>Open the Slackware VM network settings and click the arrow next to <strong>Advanced<\/strong> and select <strong>Port Forwarding<\/strong><\/p>\n<figure id=\"attachment_671\" aria-describedby=\"caption-attachment-671\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Port-Forwarding-Rules.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-671\" title=\"Port Forwarding Rules\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Port-Forwarding-Rules-300x161.jpg\" alt=\"Port Forwarding Rules\" width=\"300\" height=\"161\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Port-Forwarding-Rules-300x161.jpg 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Port-Forwarding-Rules.jpg 608w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-671\" class=\"wp-caption-text\">Port Forwarding Rules<\/figcaption><\/figure>\n<p>Click the little green icon on the right to add a new rule for SSH (Name: <strong>ssh<\/strong>, Protocol: <strong>TCP<\/strong>, Host Port: <strong>2222<\/strong>, and Guest Port: <strong>22<\/strong>)&#8230;leave the Host &amp; Guest IP fields blank and click <strong>OK<\/strong><\/p>\n<p>Now let&#8217;s create a shortcut to start up our VM without the VirtualBox GUI:<\/p>\n<pre>\"C:\\Program Files\\Oracle\\VirtualBox\\VBoxHeadless.exe\" -s Slackware<\/pre>\n<figure id=\"attachment_676\" aria-describedby=\"caption-attachment-676\" style=\"width: 206px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless-Shortcut.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-676\" title=\"Slackware Headless Shortcut\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless-Shortcut-216x300.jpg\" alt=\"Slackware Headless Shortcut\" width=\"216\" height=\"300\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless-Shortcut-216x300.jpg 216w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless-Shortcut.jpg 376w\" sizes=\"auto, (max-width: 216px) 100vw, 216px\" \/><\/a><figcaption id=\"caption-attachment-676\" class=\"wp-caption-text\">Slackware Headless Shortcut<\/figcaption><\/figure>\n<p>And see below for an icon you can add to this new shortcut to make it look nice:<\/p>\n<p><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/slackware.ico\"><img decoding=\"async\" title=\"Slackware Icon\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/slackware.ico\" alt=\"Slackware Icon\" \/><\/a><\/p>\n<p><strong>NOTE:<\/strong> I saved about 50 MB running headless as opposed to using the GUI<\/p>\n<p>Start up the VM using your new shortcut:<\/p>\n<figure id=\"attachment_677\" aria-describedby=\"caption-attachment-677\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-677\" title=\"Slackware Headless\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless-300x148.jpg\" alt=\"Slackware Headless\" width=\"300\" height=\"148\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless-300x148.jpg 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/Slackware-Headless.jpg 668w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-677\" class=\"wp-caption-text\">Slackware Headless<\/figcaption><\/figure>\n<p>Do not be concerned about the VRDE errors as we will not be connecting via RDP&#8230;give the machine a few minutes to start (as the default LILO delay is set to 1200 and can be changed in the <em>\/etc\/lilo.conf<\/em> file later)<\/p>\n<p>Now use your favorite terminal program to connect to your Slackware host (I recommend <strong><a title=\"PuTTY Homepage\" href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\" target=\"_blank\">PuTTY<\/a><\/strong>):<\/p>\n<figure id=\"attachment_684\" aria-describedby=\"caption-attachment-684\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/PuTTY.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-684\" title=\"PuTTY\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/PuTTY-300x290.png\" alt=\"PuTTY\" width=\"300\" height=\"290\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/PuTTY-300x290.png 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/PuTTY.png 455w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-684\" class=\"wp-caption-text\">PuTTY<\/figcaption><\/figure>\n<p>Use the following settings (Host Name: <strong>localhost<\/strong> or IP address: <strong>127.0.0.1<\/strong> and Port: <strong>2222<\/strong>)<\/p>\n<p>After logging in as root for the first time, I recommend checking the Slackware host meets the LFS system requirements by running the <strong>version-check.sh<\/strong> bash script called out for in the book&#8230;it&#8217;s as easy as copying the text from the LFS book and pasting into the PuTTY session (just right-click to paste in PuTTY).<\/p>\n<p>Here&#8217;s the output from the run on my setup:<\/p>\n<pre>root@nodakengineering:~# bash version-check.sh\r\nbash, version 4.2.37(2)-release\r\n\/bin\/sh -&gt; \/bin\/bash\r\nBinutils: (Linux\/GNU Binutils) 2.22.52.0.2.20120424\r\nbison (GNU Bison) 2.5.1\r\n\/usr\/bin\/yacc -&gt; \/usr\/bin\/yacc\r\nbzip2,  Version 1.0.6, 6-Sept-2010.\r\nCoreutils:  8.19\r\ndiff (GNU diffutils) 3.2\r\nfind (GNU findutils) 4.4.2\r\nGNU Awk 3.1.8\r\n\/usr\/bin\/awk -&gt; \/bin\/gawk-3.1.8\r\ngcc (GCC) 4.7.1\r\n(GNU libc) 2.15\r\ngrep (GNU grep) 2.14\r\ngzip 1.5\r\nLinux version 3.2.29-smp (root@hive) (gcc version 4.7.1 (GCC) ) #2 SMP Mon Sep 17 13:16:43 CDT 2012\r\nm4 (GNU M4) 1.4.16\r\nGNU Make 3.82\r\nGNU patch 2.7\r\nPerl version='5.16.1';\r\nGNU sed version 4.2.1\r\ntar (GNU tar) 1.26\r\nTexinfo: makeinfo (GNU texinfo) 4.13\r\nxz (XZ Utils) 5.0.4\r\ngcc compilation OK<\/pre>\n<p>Everything looks as it should except for that \/usr\/bin\/yacc should be a link to bison or small script that executes bison&#8230;so let&#8217;s fix that:<\/p>\n<pre>mv \/usr\/bin\/yacc \/usr\/bin\/yacc.orig\r\nln -sv \/usr\/bin\/bison \/usr\/bin\/yacc<\/pre>\n<p>The last command gives the reassuring output:<\/p>\n<pre>'\/usr\/bin\/yacc' -&gt; '\/usr\/bin\/bison'<\/pre>\n<p>The only other tool you&#8217;ll need in your\u00a0arsenal\u00a0before you begin is an FTP program (I recommend <a href=\"http:\/\/filezilla-project.org\/\" target=\"_blank\"><strong>FileZilla<\/strong><\/a>\u00a0or <a title=\"WS_FTP Pro\" href=\"http:\/\/www.ipswitchft.com\/Products\/Ws_Ftp_Pro\/\" target=\"_blank\"><strong>WS_FTP<\/strong><\/a>) for moving files to\/from the host VM:<\/p>\n<figure id=\"attachment_679\" aria-describedby=\"caption-attachment-679\" style=\"width: 290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/WS_FTP.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-679\" title=\"WS_FTP\" src=\"http:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/WS_FTP-300x259.jpg\" alt=\"WS_FTP\" width=\"300\" height=\"259\" srcset=\"https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/WS_FTP-300x259.jpg 300w, https:\/\/nodakengineering.com\/wp-content\/uploads\/2012\/11\/WS_FTP.jpg 527w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-679\" class=\"wp-caption-text\">WS_FTP<\/figcaption><\/figure>\n<p>Make sure server type is <strong>SFTP\/SSH<\/strong> and Remote port is <strong>2222<\/strong><\/p>\n<p>As a last step, now that we have our LFS drive installed, if you look at the label of \/dev\/sdb5 it is <strong>s<\/strong><strong>lack<\/strong>&#8230;let&#8217;s change that to the more appropriate <strong>lfs<\/strong>:<\/p>\n<pre>e2label \/dev\/sdb5 lfs<\/pre>\n<p>So now our Slackware Linux host is setup and we should be able to work through the LFS book without issues&#8230;now go learn Linux!<\/p>\n<p>&nbsp;<\/p>\n<p><a title=\"LFS Build Environment\" href=\"http:\/\/nodakengineering.com\/?page_id=483\"><strong>1<\/strong><\/a>\u00a0\u00a0<a title=\"LFS Build Environment (Page 2)\" href=\"http:\/\/nodakengineering.com\/?page_id=501\"><strong>2<\/strong><\/a>\u00a0<strong>\u00a0<a title=\"LFS Build Environment (Page 3)\" href=\"http:\/\/nodakengineering.com\/?page_id=503\">3<\/a>\u00a0\u00a0<a title=\"LFS Build Environment (Page 4)\" href=\"http:\/\/nodakengineering.com\/?page_id=556\">4<\/a><\/strong>\u00a0\u00a0<strong><a title=\"LFS Build Environment (Page 5)\" href=\"http:\/\/nodakengineering.com\/?page_id=607\">5<\/a>\u00a0\u00a0<\/strong>6<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connect LFS Drive and Final Setup Time to add the LFS hard drive to the host VM (it would be prudent to move the LFS.vdi cloned previously to the same directory as the Slackware.vdi): Open up the storage settings and highlight the SATA Controller and click on the little platter icon Select Choose existing disk &#8230; <a title=\"LFS Build Environment (Page 6)\" class=\"read-more\" href=\"https:\/\/nodakengineering.com\/?page_id=612\" aria-label=\"Read more about LFS Build Environment (Page 6)\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":483,"menu_order":4,"comment_status":"open","ping_status":"open","template":"page-without-sidebar.php","meta":{"footnotes":""},"class_list":["post-612","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/nodakengineering.com\/index.php?rest_route=\/wp\/v2\/pages\/612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nodakengineering.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nodakengineering.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nodakengineering.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nodakengineering.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=612"}],"version-history":[{"count":11,"href":"https:\/\/nodakengineering.com\/index.php?rest_route=\/wp\/v2\/pages\/612\/revisions"}],"predecessor-version":[{"id":666,"href":"https:\/\/nodakengineering.com\/index.php?rest_route=\/wp\/v2\/pages\/612\/revisions\/666"}],"up":[{"embeddable":true,"href":"https:\/\/nodakengineering.com\/index.php?rest_route=\/wp\/v2\/pages\/483"}],"wp:attachment":[{"href":"https:\/\/nodakengineering.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}