bilsch01
2021-03-25 18:20:22 UTC
I have a simple OS on partition #2 of the HD (sda2) and I have GRUB set
up to display a menu option to boot sda2. It boots and runs fine. Note
also, I have MSDOS 6.22 on sda1, which also boots and runs fine. The
boot flag in the partition table is set for sda1, but GRUB overrides
that, as it should, and boots the partition selected with the GRUB menu.
I made an image of the first 3 partitions, which is in a file named
qemu4dell.img, which I want to use for booting with QEMU. The first
sector of the image (MBR) had a non-standard booting program, which is
used by GRUB, and I replaced that with a known, standard booting program
which I have used successfully in the past. (I refer to this program as
the IPL). The command I use with QEMU is of the form:
qemu-system-i386 -drive file=qemu4dell.img
which I have been using successfully for other situations.
OK. The boot flag in the partition table is set on partition #1 (sda1)
and when I enter the QEMU command above the MSDOS partition boots in
QEMU. Great! Next, using a hex editor I un-set the boot flag for sda1
and set it for sda2 and try the QEMU command again - expecting the OS on
sda2 to boot in QEMU. Instead an error message is displayed:
missing operating system.
I know for a fact that message is displayed by the IPL program if the
first sector (volume boot sector, vbs) of the partition to be booted
does not have the signature AA55 in the last 2 bytes of the sector.
Note: partition #2 (sda2) on the HD gets booted by GRUB when selected in
the GRUB menu, so I would expect it to boot in QEMU if the boot flag is
set. Also note MSDOS on sda1 boots in QEMU when the boot flag is set.
Here's what I did to troubleshoot this problem:
1) checked the first sector of qemu4dell.img to verify that the 32-bit
sector number indicated for the start of sda2 matches the sector number
reported by fdisk -l. Note: the sector number is the location of vbs#2.
2) checked the location of vbs#2 in file qemu4dell.img and verified the
vbs is there and the AA55 signature is present.
3) just in case I'm having an "off by one error" OBOE in my brain I made
a copy of vbs#2 and wrote the copy both before and after the location of
the existing vbs#2 in qemu4dell.img. So if I'm off by one the IPL
program will find one of the copies of vbs#2 and the error won't be
reported. That didn't fix the problem.
Does anybody know what might be wrong?
TIA. Bill S.
up to display a menu option to boot sda2. It boots and runs fine. Note
also, I have MSDOS 6.22 on sda1, which also boots and runs fine. The
boot flag in the partition table is set for sda1, but GRUB overrides
that, as it should, and boots the partition selected with the GRUB menu.
I made an image of the first 3 partitions, which is in a file named
qemu4dell.img, which I want to use for booting with QEMU. The first
sector of the image (MBR) had a non-standard booting program, which is
used by GRUB, and I replaced that with a known, standard booting program
which I have used successfully in the past. (I refer to this program as
the IPL). The command I use with QEMU is of the form:
qemu-system-i386 -drive file=qemu4dell.img
which I have been using successfully for other situations.
OK. The boot flag in the partition table is set on partition #1 (sda1)
and when I enter the QEMU command above the MSDOS partition boots in
QEMU. Great! Next, using a hex editor I un-set the boot flag for sda1
and set it for sda2 and try the QEMU command again - expecting the OS on
sda2 to boot in QEMU. Instead an error message is displayed:
missing operating system.
I know for a fact that message is displayed by the IPL program if the
first sector (volume boot sector, vbs) of the partition to be booted
does not have the signature AA55 in the last 2 bytes of the sector.
Note: partition #2 (sda2) on the HD gets booted by GRUB when selected in
the GRUB menu, so I would expect it to boot in QEMU if the boot flag is
set. Also note MSDOS on sda1 boots in QEMU when the boot flag is set.
Here's what I did to troubleshoot this problem:
1) checked the first sector of qemu4dell.img to verify that the 32-bit
sector number indicated for the start of sda2 matches the sector number
reported by fdisk -l. Note: the sector number is the location of vbs#2.
2) checked the location of vbs#2 in file qemu4dell.img and verified the
vbs is there and the AA55 signature is present.
3) just in case I'm having an "off by one error" OBOE in my brain I made
a copy of vbs#2 and wrote the copy both before and after the location of
the existing vbs#2 in qemu4dell.img. So if I'm off by one the IPL
program will find one of the copies of vbs#2 and the error won't be
reported. That didn't fix the problem.
Does anybody know what might be wrong?
TIA. Bill S.