{"id":117,"date":"2004-08-11T15:59:00","date_gmt":"2004-08-11T22:59:00","guid":{"rendered":"https:\/\/kb.terabyteunlimited.com\/kb-articles\/installation-tips-for-linux\/"},"modified":"2021-09-08T13:53:59","modified_gmt":"2021-09-08T20:53:59","slug":"installation-tips-for-linux","status":"publish","type":"lsvr_kba","link":"https:\/\/www.terabyteunlimited.com\/kb\/kb-articles\/installation-tips-for-linux\/","title":{"rendered":"Installation Tips for Linux"},"content":{"rendered":"<ul>\r\n\t<li>If the <strong>Limit Primaries<\/strong> option in BootIt BM is <em>not<\/em> enabled, then be sure that the Linux installation does not create any new partitions.\u00a0 You may need to use the custom option to ensure this.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If <strong>Limit Primaries<\/strong> is <em>not<\/em> enabled then be sure you include the Linux Swap partition in the MBR Details of the menu item you create.\u00a0 If you omit it, Linux will create one and can overwrite other partitions on your hard drive.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>When using redhat 6.1\/7 GUI installation don't get confused.\u00a0 Indented is selected and filled in (popped up) is not selected.\u00a0 Double check your installation package by clicking on radio buttons\/check boxes to see what the result is.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>Linux can be completely installed on any hard drive and partition. <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>You'll need to have at least two partitions for Linux. One Linux Swap Partition (82h\/130) and one native Linux ext2 partition for the root (83h\/131).<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If you move the location of the Linux native partition in the MBR (including from drive to drive) and are using LILO then you must supply the root partition at the \"LILO Boot:\" prompt and then update the \/etc\/lilo.conf (as explained below).\u00a0<br \/>\r\n<br \/>\r\nFor example:<br \/>\r\n<br \/>\r\n<strong>LILO Boot: linux root=\/dev\/hdxx<\/strong><br \/>\r\n<br \/>\r\nAfter booting, you must also update the \/etc\/fstab on the new partition.\u00a0 In order to update fstab and lilo.conf you will probably need to remount the partition as read\/write.\u00a0 For example, if you were at the bash# prompt you would type in \"mount -o remount,rw -n \/dev\/hdxx \/\" where hdxx is the partition where \/etc is.\u00a0 Don't forget to type \"lilo\" and press enter after updating \/etc\/lilo.conf. <br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If you are using GRUB and copied or rearranged your Linux partitions then you can do one of the following:<br \/>\r\n<br \/>\r\n(Special thanks to Tom P. for providing this information)<br \/>\r\n<br \/>\r\n\"After doing some experimenting myself, the following 2 examples show what looks to me like the easiest way to handle Grub after copying a bootable Linux partition. There's other sequences that can be used, but these will work:\"<br \/>\r\n<br \/>\r\nExample 1: \/boot directory is on the root partition<br \/>\r\n- original root partition = \/dev\/hda1<br \/>\r\n- copy of root partition = \/dev\/hdb1<br \/>\r\n- kernel path = \/boot\/vmlinuz<br \/>\r\n- grub is originally installed in the boot sector of \/dev\/hda1<br \/>\r\n<br \/>\r\n1) After copying, set up the new boot item for \/dev\/hdb1 in BootIt BM<br \/>\r\n<br \/>\r\n2) Boot the new boot item from the BootIt BM Boot Menu<br \/>\r\n<br \/>\r\n3) At the Grub menu enter 'c' to go to command mode<br \/>\r\n<br \/>\r\n4) At the Grub command prompt, do these commands in order:<br \/>\r\n\u00a0\u00a0 root (hd1,0)\u00a0<br \/>\r\n\u00a0\u00a0 setup (hd1,0)<br \/>\r\n\u00a0\u00a0 kernel \/boot\/vmlinuz root=\/dev\/hdb1 ro<br \/>\r\n\u00a0\u00a0 boot<br \/>\r\n<br \/>\r\n5) Once booted, edit \/etc\/fstab to change \/dev\/hda1 reference to<br \/>\r\n\u00a0\u00a0 \/dev\/hdb1 (also change others if needed)<br \/>\r\n<br \/>\r\n6) Do the same in \/boot\/grub\/menu.lst, and also change (hd0,0)<br \/>\r\n\u00a0\u00a0 references to (hd1,0)<br \/>\r\n<br \/>\r\n7) Reboot to test, and use 'df' to verify root partition is \/dev\/hdb1<br \/>\r\n<br \/>\r\nNote 1: In Red Hat, menu.lst is a link to grub.conf<br \/>\r\n<br \/>\r\nExample 2: \/boot is on it's own partition<br \/>\r\n- original \/boot partition = \/dev\/hda1<br \/>\r\n- copy of \/boot partition = \/dev\/hdb1<br \/>\r\n- original root partition = \/dev\/hda2<br \/>\r\n- copy of root partition = \/dev\/hdb2<br \/>\r\n- kernel path = \/boot\/vmlinuz (but it's \/vmlinuz to grub)<br \/>\r\n- grub is originally installed in the boot sector of \/dev\/hda1<br \/>\r\n<br \/>\r\n1) After copying, set up the new boot item for \/dev\/hdb1 in BootIt BM<br \/>\r\n<br \/>\r\n2) Boot the new boot item from the BootIt BM Boot Menu<br \/>\r\n<br \/>\r\n3) At the Grub menu enter 'c' to go to command mode<br \/>\r\n<br \/>\r\n4) At the Grub command prompt, do these commands in order:<br \/>\r\n\u00a0\u00a0 root (hd1,0)\u00a0<br \/>\r\n\u00a0\u00a0 setup (hd1,0)<br \/>\r\n\u00a0\u00a0 kernel \/vmlinuz root=\/dev\/hdb2 ro<br \/>\r\n\u00a0\u00a0 boot<br \/>\r\n<br \/>\r\n5) Once booted, edit \/etc\/fstab to change \/dev\/hda1 and \/dev\/hda2<br \/>\r\n\u00a0\u00a0 references to \/dev\/hdb1 and \/dev\/hdb2 (also change others if needed)<br \/>\r\n<br \/>\r\n6) Don't edit \/boot\/grub\/menu.lst at this time since \/boot will still be<br \/>\r\n\u00a0\u00a0 \/dev\/hda1 (but see Note 2 below)<br \/>\r\n\u00a0\u00a0<br \/>\r\n7) Instead, mount \/dev\/hdb1 at a convenient mount point (\/mnt\/xxxx), and then edit \/mnt\/xxxx\/grub\/menu.lst to change \/dev\/hda2 to \/dev\/hdb2 and also hd(0,0) to hd(1,0)<br \/>\r\n<br \/>\r\n8) Reboot to test, and use 'df' to verify correct partitions are mounted<br \/>\r\n<br \/>\r\nNote 1: In Red Hat, menu.lst is a link to grub.conf<br \/>\r\n<br \/>\r\nNote 2: In Step 6, if \/etc\/fstab is using the \"LABEL=xxx\" syntax, the<br \/>\r\ncorrect \/boot partition may already be mounted. If it is, you should<br \/>\r\nget an error message in Step 7 that \/dev\/hdb1 is already mounted.<br \/>\r\n<br \/>\r\n<\/li>\r\n\t<li>If you have lost the ability to use LILO to boot your partition then, you can do one of the following:<br \/>\r\n<br \/>\r\n(Special thanks to Tom P. for providing this information)\r\n\r\n<p>1) Download a general purpose Linux boot disk like <a href=\"http:\/\/www.toms.net\/rb\/\" target=\"_blank\" rel=\"noopener\">tomsrtbt<\/a>, mount the root partition, make (any needed) changes to \/etc\/lilo.conf and run lilo. You may want to use chroot (change root) because lilo (on the boot disk) will complain if a different version of lilo was originally used. chroot allows you to run lilo on the root partition instead the boot disk so there's no version mismatch. It also makes sure that the \/etc\/lilo.conf on the root partition will be used.<\/p>\r\n<p>mount \/dev\/whatever_root_is \/mnt<br \/>\r\nchroot \/mnt \/sbin\/lilo<\/p>\r\n<p>2) Use Loadlin.exe to boot Linux from DOS (has to be real mode DOS). For that you need loadlin.exe and a kernel. Both can usually be found on the Linux CD. The kernel can be the default kernel from the CD (it's enough to boot and run Lilo). From a DOS prompt:<\/p>\r\n<p><span style=\"font-family: Verdana;\">loadlin kernel_filename root=\/dev\/whatever_root_is ro<\/span><\/p>\r\n<p><span style=\"font-family: Verdana;\">The 'ro' is to mount read-only.<\/span><\/p>\r\n<p>&nbsp;<\/p>\r\n<p>If you have Windows running, you could also use <a href=\"http:\/\/www.chrysocome.net\/explore2fs\" target=\"_blank\" rel=\"noopener\">Explore2fs<\/a> to get the actual kernel file from the Linux root partition via Windows, and then run loadlin. It works on 9X and NT for sure, and (probably) ME, although it hasn't been updated in a while.\u00a0<\/p>\r\n<p>3) You can boot another Linux installation (if you have one) and then do the same steps as number 1 above (using chroot etc...)<\/p>\r\n<p>4) Another way might be to boot from the Linux CD, switch to a console, mount the root partition, and then use chroot as above. How (exactly) to get to that console (probably) varies depending on the distribution, but most Linux install CDs should have a way to do it.\u00a0<\/p>\r\n<\/li>\r\n\t<li>\r\n<p>An example installation with <strong>Limit Primaries<\/strong> enabled:<\/p>\r\n<p>Suppose you have one hard drive, BootIt\u00a0BM installed and working, your BootIt\u00a0BM boot media, and\u00a0 the following partition layout:<\/p>\r\n<blockquote>\r\n<ul>\r\n\t<li>500MB FAT partition<\/li>\r\n\t<li>1.1GB Free Space<\/li>\r\n\t<li>9GB NTFS partition<\/li>\r\n\t<li>5.6GB\u00a0 FAT32 partition<\/li>\r\n<\/ul>\r\n<\/blockquote>\r\n<p>Now let's say you want\u00a0 to install Linux Red Hat 6.1:<\/p>\r\n<ol>\r\n\t<li>Since your limited to 4 primary partitions and Linux requires at least a Native and Swap partition you'll need to create an extended partition for the Linux installation.\r\n\r\n<ul>\r\n\t<li>Use the partition work dialog in BootIt\u00a0BM to create an extended partition. \u00a0 The new partition layout looks like this:\r\n\r\n<ul>\r\n\t<li>500MB FAT partition<\/li>\r\n\t<li>1.1GB Extended partition<\/li>\r\n\t<li>\u00a0\u00a0\u00a0 Free Space<\/li>\r\n\t<li>9GB NTFS partition<\/li>\r\n\t<li>5.6GB FAT32 partition<\/li>\r\n<\/ul>\r\n<\/li>\r\n\t<li>Now create two volumes in the extended partition (Free Space indented).\u00a0 The first one type 131 being 1024 MB's, the second one being type 130.\u00a0\u00a0 The new partition layout looks like this:\r\n\r\n<ul>\r\n\t<li>500MB FAT partition<\/li>\r\n\t<li>1.1GB Extended partition<\/li>\r\n\t<li>\u00a0\u00a0\u00a0 1GB Linux Native<\/li>\r\n\t<li>\u00a0\u00a0\u00a0 100MB Linux Swap<\/li>\r\n\t<li>9GB NTFS partition<\/li>\r\n\t<li>5.6GB FAT32 partition<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n\t<li>Reset your system to begin the Linux installation.\u00a0 Either via the boot diskette\/CD, or CD.\u00a0<\/li>\r\n\t<li>Once it boots, Press enter for GUI install<\/li>\r\n\t<li>Once installation begins, choose your installation type.\u00a0 Let's say you just choose the first option instead of custom.<\/li>\r\n\t<li>At the point where it asks on how to partition, choose \"Manually Partition\" (indented) then click next.<\/li>\r\n\t<li>Your partitions are listed. Choose your installation points.\u00a0 For this example just double click on the Linux Native partition and assign it root (\/).<\/li>\r\n\t<li>After this, just click next and continue with installation (If you choose custom you'll be given a chance to install LILO to the \"First sector of boot partition\".)<\/li>\r\n\t<li>Install is done and your system has just restarted and LILO boots.\r\n\r\n<ul>\r\n\t<li>If BootIt\u00a0BM boots, then LILO was installed correctly to the \"first sector of boot partition\".<\/li>\r\n\t<li>If BootIt\u00a0BM does not boot but LILO does then LILO ended up in the MBR - See the above help on how to install LILO to the root partition or how to use LILO from the MBR.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ol>\r\n<\/li>\r\n<\/ul>\r\n<hr \/>\r\n<ul type=\"square\">\r\n\t<li><a href=\"https:\/\/www.terabyteunlimited.com\/kb\/?p=100\">How to Install an OS to Its Own Partition<\/a><\/li>\r\n\t<li><a href=\"https:\/\/www.terabyteunlimited.com\/kb\/?p=101\">How to Activate Multi-OS<\/a><\/li>\r\n\t<li><a href=\"https:\/\/www.terabyteunlimited.com\/kb\/?p=102\">How to Add an OS to a Multi-OS Partition<\/a><\/li>\r\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>If the Limit Primaries option in BootIt BM is not enabled, then be sure that the Linux installation does not create any new partitions.\u00a0 You may need to use the custom option to ensure this. If Limit Primaries is not enabled then be sure you include the Linux Swap partition in the MBR Details of [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"lsvr_kba_cat":[1783],"lsvr_kba_tag":[2128],"class_list":["post-117","lsvr_kba","type-lsvr_kba","status-publish","hentry","lsvr_kba_cat-linux","lsvr_kba_tag-linux"],"_links":{"self":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":3,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/117\/revisions"}],"predecessor-version":[{"id":6489,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/117\/revisions\/6489"}],"wp:attachment":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_cat?post=117"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_tag?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}