qLinux
… a distribution study
<< Prev Create an Initramfs
Next >> Reboot and Finish
Grub-2.06
Reference: 8.59. GRUB-2.06. For the first steps it is fine to create an menu entry in the host's boot loader. However, for an independent system we use grub as boot manager. Apply a patch to fix the build system:
patch -Np1 -i grub-2.06-bld-20220316.patch
Apply a patch to fix the sources:
patch -Np1 -i grub-2.06-src-20220316.patch
The above patch fixes the sources so that grub builds and works for qLinux from scratch. Using it to boot other OS' may work but it is not tested nor guaranteed.
./configure --prefix=/qlnx \ --datarootdir=/qlnx/dat \ --sbindir=/qlnx/bin \ --disable-rpath \ --with-bootdir=/qlnx/etc/.boot \ --disable-efiemu
Build and install grub1):
make make install
Change the mode of the admin executables:
cd /qlnx/bin for f in grub-bios-setup grub-macbless grub-ofpathname grub-reboot grub-sparc64-setup grub-install grub-mkconfig grub-probe grub-set-default; do chmod 0750 $f done
Move the bash completion file into the right location:
mv -v /qlnx/etc/bash_completion.d/grub /qlnx/dat/bash-completion/completions/ rmdir /qlnx/etc/bash_completion.d
Configuration
The file  default/grub 
is now in  /qlnx/etc/grub.d 
. The /boot directory is  /qlnx/etc/.boot 
. Install grub at the qLinux device, here  sdb 
.
grub-install /qlnx/dev/sdb
Now you can run  grub-mkconfig 
to create an template of  grub.cfg 
. But as DIY (wo)man we need one simple entry only:
- (hd0,msdos1) corresponds to /dev/sda1
- (hd1,msdos1) corresponds to /dev/sdb1
menuentry qLinux { #set root = (hd1,msdos1) linux (hd1,msdos1)/qlnx/etc/.boot/bzImage root=(hd1,msdos1) initrd (hd1,msdos1)/qlnx/etc/.boot/initrd.img }
On the host setup an entry for chain loading, similar like:
menuentry "qLinux chain" { insmod chain set root=(hd1,1) chainloader +1 }
<< Prev Create an Initramfs
Next >> Reboot and Finish