How to install LFA Linux to hard drive
About Grub2 if you already have one Linux system installed
If you already have one Linux system (for example Ubuntu) installed on your computer you can refrain from installing Grub during the installation of LFA (for example on /dev/sda5). Instead just add the lines below in Ubuntu. I.e. to /boot/grub/grub.cfg. Or start up Ubuntu and run the command sudo update-grub. Start data for LFA will then be added to Grub automatically. Example Grub configuration – see below – when LFA has been installed on /dev/sda5.
menuentry ‘LFA (sda5) 240718’ –class gnu-linux –class gnu –class os $menuentry_id_option ‘gnulinux-simple-ccde3409-b7fc-4759-af5e-69b557c97467’ {
insmod gzio
insmod part_gpt
insmod ext2
set root=’hd0,gpt5′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,gpt9 –hint-efi=hd0,gpt5 –hint-baremetal=ahci0,gpt5 ccde3409-b7fc-4759-af5e-69b557c97467
else
search –no-floppy –fs-uuid –set=root ccde3409-b7fc-4759-af5e-69b557c97467
fi
linux /boot/6.9.8-amd64-exton root=UUID=ccde3409-b7fc-4759-af5e-69b557c97467 rw
initrd /boot/initrd.img-6.9.8-amd64-exton
}
NOTE: On certain computers you may have to add nomodeset to the boot line so it looks like this:
linux /boot/vmlinuz-6.9.8-amd64-exton root=UUID=ccde3409-b7fc-4759-af5e-69b557c97467 rw nomodeset
Special notes about using Refracta Installer on non-efi computers
LFA runs very well live in VirtualBox and VMware. If you want to install LFA in VirtualBox/VMware or on a non UEFI-enabled computer you’ll have to replace grub-efi-amd64 with grub-pc. Do it like this.
1. Start up Refracta Installer a go through all installation steps. In the end of the installation you will get a message saying that the installation has failed. That’s because LFA is made for UEFI-enabled computers. Just close Refracta Installer.
2. To be able to boot LFA in VirtualBox or VMware from the virtual hard drive you’ll have to chroot into the install partition (normally /dev/sda1) and manually install Grub2. Run the following commands:
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
mount -t proc proc /mnt/sda1/proc
mount -o bind /sys /mnt/sda1/sys
mount –bind /dev /mnt/sda1/dev
mount -o bind /dev/pts /mnt/sda1/dev/pts
chroot /mnt/sda1 /bin/bash
apt update
apt install grub-pc
grub-install /dev/sda
update-grub
exit
umount /mnt/sda1/proc
umount /mnt/sda1/sys
umount /mnt/sda1/dev/pts
umount /mnt/sda1/dev
umount /mnt/sda1
3. Close down VirtualBox or VMware and remove the LFA ISO file. Start up LFA from the virtual hard drive. Everything will be alright. NOTE: Normally just replace grub-efi-amd64 with grub-pc before you start up Refracta Installer on a non UEFI-enabled computer. Running LFA on any computer you can refrain from installing Grub2 in MBR providing that you already have Grub2 installed (on another partition). Just edit your Grub2 configuration when the installation of LFA is ready – see my example above.
IMPORTANT NOTE
When installing LFA Build 240718 in VirtualBox you can refrain from chroot the way I describe above. When Refracta Installer asks you about Grub just choose to chroot within the program. Then run the following two commands: grub-install /dev/sda and update-grub. Done! Watch this screenshot.
WARNING: When installing LFA on a UEFI-enabled computer do not replace your efi partition – watch this screenshot. Instead edit you Grub2 configuration as shown above.
Please read my instruction How To dual-boot, triple-boot or multi-boot Linux with Windows in a simple way and be happy…