Most of what I've found online (e.g. The puppylinux wiki) -- including on these forms -- has been about configuring grub2
I'm using tahrpup 6.0.6 so some things may be tahrpup specific.
The reason that I decided to delve into grup2 is because the hard drive has a gpt partition table. My understanding is grup4dos won't work with this type of partition table.
I read on archwiki that there can be issue with setting the bootflag using gparted for gpt partitions. So I used the following command to set the bootflag:
Code: Select all
cfdisk /dev/sdc
Tahrpup comes with grub2 installed but not with all packages. I installed additional packages in the package manager which may or may not have been necessary. The following files are in my ~.packages folder:
Code: Select all
grub2_2.02.files
grub2-common_2.02.files
grub2-splashimages_1.0.1+nmu1.files
grub-common_2.02.files
grub-gfxpayload-lists_0.6.files
grub-imageboot_0.6.files
grub-pc_2.02.files
grub-pc-bin_2.02.files
Code: Select all
root# grub-install --boot-directory=/mnt/sdc1/boot /dev/sdc1
Installing for i386-pc platform.grub-install:
warning: File system `fat' doesn't support embedding.grub-install:
warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..grub-install: error: will not proceed with blocklists.
Code: Select all
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Puppy tahr 6.0.6 (sdc1 - WD My Book 25EE)" {
insmod vfat
search --no-floppy --fs-uuid --set F709-8F1C
linux /vmlinuz pmedia=usbhd psubdir=/ pdrv=F709-8F1C psave=F709-8F1C:tahrsave.4fs
initrd /initrd.gz
}
The next step is to update grub. The following doesn't work:
Code: Select all
root# update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `unionfs'.
Code: Select all
#!/bin/sh
#https://askubuntu.com/questions/254491/failed-to-get-canonical-path-of-cow
MTpoint="/mnt/sdc1"
Mtdev="/dev/sdc1"
mkdir "$MTpoint"
mkdir "$MTpoint/boot"
mount "$Mtdev" "$MTpoint"
for dir in proc dev sys etc bin sbin var usr lib lib64 tmp; do
mkdir "$MTpoint/$dir" && mount --bind /$dir "$MTpoint/$dir"
done
chroot "$MTpoint"
#update-grub2 # Type this at the prompt in the chroot environment
Code: Select all
/usr/share/syslinux/memdisk
Code: Select all
/mnt/sdc1/boot
P.S. some interesting low level info on how grub2 works can be found at:
https://pete.akeo.ie/2014/05/compiling- ... 2-for.html
but it is mostly for MBR type installations.
Notes
---------------------------
1 - The puppylinux wiki has two examples of grub2 menu configurations (#1 #2) and some [url=http://puppylinux.org/wikka/grub2tut]instructions on configuring grub2 but they are incomplete.