Problem installing GLFPE Linux 600 Series and solution 26 Sep 2020 GLF --------------------------------------------------------------------------------------- Normally GLF custom OS distributions (GLFPE, GPROG, etc.) are used only in live boot sessions without making permanent (unintentional) changes to the local PC, but the OS may be installed in completely functional state using the boot disk, with all applications and data as exist on the live boot image, using the boot time "Install" option. The installation process is occasionally tested by GLF to ensure potential users are assured of its functionality. However, a problem has been introduced since 2019 which requires a workaround involving several manual postinstallation steps. The workaround has been tested to be successful and is described below. NOTE: the "Install" process must be run from an OS image booted as the ONLY image on the booted drive, that is, from a DVD or USB stick burned in raw hybrid ISO form to the medium, NOT as one of a group of ISO images found on a multiboot disk. Even though one may boot a live session successfully from such a multiboot disk (based on multibootusb or Ventoy), the installer itself cannot find its data files on a multiboot disk, and installation will not proceed. PROBLEM ------- The Live Build system for producing Debian-based live bootable custom distributions of Linux OS, including GLFPE Linux, has always included an installer option. The installer has in practice always worked to install a working installation to a PC's hard drive, complete with all included applications, libraries, and menus found on the matching live boot image. GLF has tested this in the past on both 686 PCs and AMD64 PCs, and the install always worked if booted from a SINGLE BOOT IMAGE disk, DVD or USB. The recent upgrade of official Debian release from 9 (stretch) to 10 (buster) has apparently changed this hitherto smooth process. GLF testing of installations to 686-based PCs has stalled at the step where a Boot manager is installed. Until recently GLF had not tested the install process on amd64 systems, but that has now been tested, and the problem also applies to amd64 images. The default boot manager for Debian is now Grub2, but in tests using three different PCs (a Gateway laptop, an Acer Aspire One netbook, and an AMD64-compatible eMachines desktop), the Grub2 install step failed, and repeated attempts at normal instalation did not fix the issue. Eventually a workaround was determined to allow full installation, which involves extra manual steps. An early attempt was made to remain within options provided by the installer, to pass over the Grub2 installation and install Lilo, but that did not produce a desirable boot process either (It failed, too, but actually left a bootloader on the drive, which after a VERY LONG time (well over 5 minutes) it actually did boot. If both boot installers are passed over during installation, the core installation continues normally and leaves a theoretically bootable main drive, but without a boot loader to start it. The workaround described below explains how to add the bootloader manually. SOLUTION -------- The workaround for the problem which succeeds to install a boot loader requires another boot from the live boot installer disk, and a followup manual boot from the Grub2 command line. The process eventually installs a working boot loader in several tedious and arcane steps. It is arguably painful, but it works. This process has only been tested to work on systems with a single Linux-based OS installed, which is replaced by the selected OS. Prior versions (based on jessie and stretch) have installed successfully to multi-OS configurations (with Windows XP) but that has not yet been tested with the 600 series GLFPE Linux. Step 1: Basic install from live boot menu (allow bootloader installation to fail) ----------------------------------------------------------------------------------- The GLFPE Linux live boot disk includes two Install options, one text based, one graphical. Most of the time the text based version works as well as the graphical, and might run a little faster. Boot the selected OS Select Install Answer the Keyboard and locale questions Select hostname (default debian -- you can choose another, e.g. glfpe607-32). Choose Domain Name (blank is OK) Root password -- choose blank twice -- don't set root password directly, use sudo instead under main username account Name of user Account username Password (twice) Time Zone (GLF assumes Eastern) Partitioning -- guided use entire disk Select disk to partition All files one partition (look over list) Select "Finish Partitioning" Write changes to disk Move focus to select Yes (Wait for partitioning & formatting) (Wait for copying data) Select network mirror (defaults) HTTP Proxy (blank) (Configuring apt) Install Grub Bootloader -- HERE'S WHERE IT GETS PROBLEMATIC! If this step completes successfully, congratulations! It works and you won't need the workaround later. However, this procedure assumes it fails to install Grub at this point. "Grub installation failed" The workaround begins -- we will avoid installing any bootloader at this time. Select continue "Installation Step Failed" Select continue (Menu displays) Skip over "Install LILO" Select "Continue without boot loader" "No boot loader installed" Select Continue (Wait -- Finishing installation) "Installation Complete" Select Continue (Wait -- Finishing installation) (reboots automatically) ASSUMING the "Install Grub" step FAILED above, leave the live boot disk in to allow it to reboot to a live version of the selected OS (you have no bootloader to boot the installed version yet). Step 2: Install Grub from live session ---------------------------------------- When the live session is booted, bring up a terminal window. The necessary process is to install the bootloader manually. The commands below install grub2 (grub-pc) because that seems to work with fewer issues. It is necessary to mount the drive which will boot. The following assumes that drive is /dev/sda, and the root partition is /dev/sda1. If not, be sure to use the correct drive names. Mount the drive to mount point /mnt: sudo mount /dev/sda1 /mnt Install grub2: sudo apt-get -y install grub-pc (A configure script comes up. Press TAB to the OK then Enter. A list of disks will show. This will FAIL anyway, so don't bother to select one.) Hit Enter on Continue. (Process will finish installing) sudo grub-install --root-directory=/mnt /dev/sda (Installing) If at this point you try update-grub it will FAIL. However, a basic boot has been installed to the MBR and if you reboot, it will TRY to boot. Power off, remove live boot disk. Step 3: Manual boot from Grub2 command line -------------------------------------------- Power on. Grub2 should boot to command line. You will need to perform a manual boot from the command line. These procedures come from a web page at https://www.linux.com/LEARN/HOW-rescue-non-booting-grub-2-linux. From Grub command line: set pager=1 ls You will see a list of disks like: (hd0) (hd0,msdos5) and so on. ls (hd0,1)/ If you see the usual list of Linux filesystem folders (/etc, /boot, and so on) you have picked the right disk. Use this name in further commands. ls /boot/ You will get a list of files with long descriptive names beginning with config-, initrd.img, and vmlinuz-. These EXACT names will be used in the following commands. linux /boot/vmlinuz-4.19.0-5-686 root=/dev/sda1 initrd /boot/initrd.img-4.19.0-5-686 NOTE: On one GLF machine (eMachines amd64) known to have an obsolete Nvidia graphics card, the workaround initially failed after reboot due to the video driver attempting to use acceleration (screen hash). If this applies, a boot time parameter "nomodeset" must be set which disables acceleration at boot. It will also be necessary in this case to later setup Grub2 to use that same boot time parameter, or routine boots will have the same issue. If this applies, instead of the above "linux" line, add "nomodeset" to the end of the line. Example (use the correct version numbers for your OS): linux /boot/vmlinuz-4.19.0-5-686 root=/dev/sda1 nomodeset initrd /boot/initrd.img-4.19.0-5-686 Reboot the system (temporarily) by the following command: boot You should now find the system booting the newly installed OS. You will still need to make the Grub2 installation permanent after it boots. Step 4: Initial boot session of the installed OS ------------------------------------------------ Log in with the prearranged username and password. After booting and setting the time, bring up a terminal. You need to install Grub2 again, this time to the actual installed OS (last time it was only to the live session). First, catch up any late updates: sudo apt-get update (you will need to enter the password for sudo use) sudo apt-get -y install grub-pc This time the install of grub-pc should quietly find everything it needs and finish OK. sudo update-grub sudo grub-install /dev/sda (Installing) At this point Grub2 is fully installed (normally). NOTE: If the aforementioned video card problem exists ion this machine, you will still need to edit the boot configuration to remove graphics acceleration. Edit the file /etc/default/grub to add the necessary boot parameter: Using "nano" editor from the command line: sudo nano /etc/default/grub Look for the line containing: GRUB_CMDLINE_LINUX_DEFAULT="quiet" Edit the line to say the foollowing: GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset" Save the file with CTRL-O and exit with CTRL-X Implement the change by: sudo update-grub sudo grub-install /dev/sda At this point Grub2 is assumed fully installed. Test by rebooting. Shutdown the OS. Power back on. Normal Grub2 menu should show and allow normal boot. DONE!