In December 2019 I managed to ship multiboot GNU/Linux to Sulawesi Island, Indonesia. One among operating systems in that USB flash drive is Vector. My customer ordered it so I cannot make it works multiboot with GLIM Maker as of course it is not supported (although the forum is still having new posts in 2020). The secret is, Vector is an old distribution based on Slackware with latest release dated back to 2015 and now it does not receive updates anymore. Fortunately, I finally can make custom GRUB configuration script so it works. You can learn my scripts however to make similar distros working or if someday Vector being actively developed again. Happy hacking!

Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.

Get Vector OS


Download it from http://vectorlinux.com. For this case I use latest Vector version 7.0 which is still loadable in a CD with 700MB capacity.

grub.cfg


for isofile in ${isopath}/vector/VECTOR*.iso; do
  if [ -e "$isofile" ]; then
    menuentry "Vector >" --class vector {
      configfile "${prefix}/inc-vector.cfg"
    }
    break
  fi
done
This code represents the first page of GRUB bootloader of the USB. This code reads whether there is a VECTORblablabla.iso filename available under /vector/ folder. If exists, then display an entry "Vector > " with icon named "vector". If user presses Enter key, then read inc-vector.cfg script. This is the 2nd entry among other entries displayed in final result photo below.

inc-vector.cfg


# VECTOR GNU/LINUX
for isofile in $isopath/vector/VECTOR*.iso; do
  if [ ! -e "$isofile" ]; then break; fi
  regexp \
    --set 1:isoname \
    --set 2:version \
    --set 3:arch \
    --set 4:variant \
    "^${isopath}/vector/(VECTOR([^-]+)-([^-]+)-([^-]+)\.iso)\$" "${isofile}"
  menuentry "Vector Live ${version} ${arch} ${variant}" "${isofile}" "${isoname}" --class vector {
    set isofile=$2
    set isoname=$3
    bootoptions="livemedia=/dev/disk/by-uuid/$rootuuid:$isofile load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=us tz=localtime locale=us_EN.utf8"
    loopback loop $isofile
    linux (loop)/isolinux/kernel/sata  $bootoptions
    initrd (loop)/isolinux/init.lz
  }
done

This script mainly sets up a long and unique boot options and then call the kernel and the inited after activating ISO loopback. Yes, this script boots up Vector iso image with loopback technology provided by GRUB.

Icon & Directory Structure


Download this Vector official logo as vector.png and store it under /grub/themes/invader/icon/. Final directory structure displaying icon, grub.cfg, and inc-vector.cfg files should look like picture below.






Code Screenshot


To make sure your code placed in right places, see my screenshot below. The important thing is do not forget to make caller code in grub.cfg. Without it, your inc-vetor.cfg will not work.

 


Bootloader


Boot up your USB Flash Drive and now you should see a new entry named Vector on bootloader.

 

Result


Successful multiboot making will run blue Vector Setup like this while Vector selected at booting time. From this, you can install Vector GNU/Linux to your computer. Do not worry seeing such appearance, as I said, Vector is indeed very similar to Slackware. Congrats!




This article is licensed under CC BY-SA 3.0.


, , , , , , , ,