Subject: Cannot boot from hard drive on a Pentium1 system

From: Moritz Strohm <[email-masked]>
Date: Sun, 9 May 2021 12:27:48 +0000

Hello

I tried several times to install Alpine Linux 3.13.5-x86 (using the
standard image) on a Pentium1 (586) system. The CD booted and the
installer ran through without reporting errors, but after rebooting,
all I get is the following output when the computer tries to boot from
the hard drive:

> PRESS ANY KEY TO REBOOT

During the installation process of Alpine Linux, I noticed that the
installer takes a long time (minutes) after it printed the line regarding
the generation of the initrd image. dmesg didn't report any issues with
the IDE drives and I can chroot into the installed system once I booted
again from the CD.
Just to be sure, I tried an installation on another hard drive, but I
still get the same message when trying to boot from the hard drive.
I also tried to install grub2 after chrooting into the system on the
hard drive, but I ended up in grub2 rescue mode and grub2 couldn't read
the content of any partition from any drive with the ls command.

The computer meets the minimum hardware requirements, as specified on the
installation page in the Alpine Linux wiki.

What else can I try to get a bootable Alpine Linux installation
on a hard drive of that computer?

Regards
Moritz

---

From: Donoban <[email-masked]>
Date: Sun, 9 May 2021 18:28:51 +0000

> all I get is the following output when the computer tries to boot from

Is this a BIOS message? It seems that syslinux failed to install or 
there is no booteable partition, are you booting legacy or uefi?

---

From: Donoban <[email-masked]>
Date: Sun, 9 May 2021 18:57:33 +0000

> there is no booteable partition, are you booting legacy or uefi?

With than system I suppose that it will be legacy. Check with fdisk that 
your boot partition is bootable and try (install syslinux if needed first):

extlinux -i /mnt/boot

dd if=/usr/share/syslinux/mbr.bin of=/dev/sda

---

From: Moritz Strohm <[email-masked]>
Date: Sun, 9 May 2021 16:28:41 +0000

I was able to install FreeDOS on the hard drive and it booted
from there without problems, so it seems to be a software problem,
not a hardware problem.

---

From: Moritz Strohm <[email-masked]>
Date: Mon, 10 May 2021 20:29:06 +0000

> Check with fdisk that your boot partition is bootable and try
> (install syslinux if needed first):
> 
> extlinux -i /mnt/boot
>

The boot partition is marked as bootable according to fdisk.
I chrooted from the Alpine Linux CD to the Alpine Linux on the
hard drive and executed the two commands, but without success.
In the chroot environment, the first command was:

extlinux -i /boot

extlinux recognised that /dev/sda1 is the boot partition
(which should be correct) and reported no errors.

I also tried to install the alt-mbr.bin with dd, but the result
is the same. I checked that the MBR ends with the sequence
0x55 0xAA (using dd and xxd) before making attempts to reinstall
syslinux in it.

---

From: Donoban <[email-masked]>
Date: Wed, 12 May 2021 21:48:04 +0000

On 5/10/21 8:29 PM, Moritz Strohm wrote:
> The boot partition is marked as bootable according to fdisk. I  > chrooted from the Alpine Linux CD to the Alpine Linux on the hard > 
drive and executed the two commands, but without success. In the > 
chroot environment, the first command was: > > extlinux -i /boot > > 
extlinux recognised that /dev/sda1 is the boot partition (which > should 
be correct) and reported no errors. > > I also tried to install the 
alt-mbr.bin with dd, but the result is > the same. I checked that the 
MBR ends with the sequence 0x55 0xAA > (using dd and xxd) before making 
attempts to reinstall syslinux in > it.
For alt-mbr.bin did you set the boot partition?

'printf '\1' | cat altmbr.bin - | dd bs=440 count=1 iflag=fullblock 
conv=notrunc of=/dev/sda'

For /dev/sda1 according to 
https://wiki.syslinux.org/wiki/index.php?title=Mbr

If you can boot apine from a usb, maybe you could configure it to boot 
your hard disk install as a workaround until fixing this.

---

From: Moritz Strohm <[email-masked]>
Date: Sat, 22 May 2021 16:56:30 +0000

> your hard disk install as a workaround until fixing this.

No, that is not possible since the BIOS doesn't really support USB at all.

I tried to install Grub2 again, since Grub2 did at least boot, contrary to
syslinux/extlinux that didn't show any sign of booting at all (see above).

grub-mkconfig detected the vmlinuz-image and the ramdisk, so I assume it
generated a correct configuration file in /boot/grub/grub.cfg. Then, I called
grub-install like this:

grub-install --target=i386-pc --modules="boot ext2 elf vga vga_text msdospart configfile fat echo normal linux" /dev/sda

The installation reported no errors and after a reboot, I landed in the normal
grub mode, not the rescue mode, but grub2 still could not load the content of
the boot partition, which has an ext4 file system, set up by the alpine linux
installer. Event after manually loading the ext2 module in grub using
"insmod ext2", the content of the partitions cannot be read by grub.

---

From: Moritz Strohm <[email-masked]>
Date: Sun, 23 May 2021 12:35:43 +0000

I tried booting via Super Grub Disk (Version 2.04s1), but it also didn't
detect a grub.cfg file on the boot partition of the hard drive.