Score:-1

How to install GRUB Legacy (0.97) on an USB pen-drive from Ubuntu 20.04/21.10?

gb flag

How to install GRUB Legacy (0.97) on an USB pen-drive from Ubuntu 20.04/21.10?

Ubuntu does no longer provide GRUB Legacy in their repository.
grub-install command will install GRUB 2.xx.

Probably I could look for an old bootable distro that ships GRUB 0.97 and grub-install from there, but maybe it can be done properly from my main OS.

Old Ubuntu's GRUB 0.97 package contains all the binary files for stage1, fat_stage1_5 (I'm using FAT32), and stage2 in data.tar.xz/usr/lib/grub/x86_64-pc/.
However running grub-install from that old Ubuntu package does not work.

How do I manually dd those files properly into the drive's MBR and following sectors?
I tried this (not to overwrite the partition table):

sudo dd if=stage1 of=/dev/sdX bs=446 count=1

What do I do with stages 1_5 and 2?

ChanganAuto avatar
us flag
Why do you think you need to use an obsolete Grub? This is probably an X-Y problem.
Piotr Henryk Dabrowski avatar
gb flag
I'm trying to chainload an iso image, which is impossible with GRUB2, but worked fine in GRUB 0.97. Here is a bug report for GRUB2: https://bugs.gentoo.org/385619
Score:0
gb flag

I've managed to use that old Ubuntu's package mentioned above to install GRUB 0.97:

  1. On the pendrive's main partition create /boot/grub directory:
cd /mnt/sdX1
mkdir -p boot/grub
  1. Copy all stages into it:
cd ${DATA_TAR_XZ}/usr/lib/grub/x86_64-pc
cp stage1 stage2 fat_stage1_5 /mnt/sdX1/boot/grub
  1. Now run GRUB 0.97 shell:
cd ${DATA_TAR_XZ}/usr/sbin
sudo ./grub --device-map=/dev/null
  1. And use it to setup GRUB for that pendrive:
device (hd0) /dev/sdX
geometry (hd0)
root (hd0,0)
setup --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0)
quit
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.