[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

my simple OS won't boot in QEMU

From: bilsch01
Subject: my simple OS won't boot in QEMU
Date: Fri, 2 Apr 2021 12:15:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

This post concerns booting sda2 using QEMU.  sda2 boots just fine when run on HD.
The layout of the HD looks like this:

Device     Boot     Start             End                 Sectors    Size       Id    Type
/dev/sda1            63                3903794         3903732   1.9G       6    FAT16
/dev/sda2   *        3903795      4032314           128520   62.8M    e     W95 FAT16 (LBA)
/dev/sda3            4032315      4082714             50400   24.6M    e     W95 FAT16 (LBA)
/dev/sda4            4083710   976771071     972687362 463.8G   5     Extended

The command line I have been using is:  qemu-system-i386  -drive  file=qemu4dell.img

File qemu4dell.img is an image of the first 3 partitions created using the linux dd command as follows:

dd if=/dev/sda of=qemu4dell.img bs=512 count=4082720 (the file has 6 extra bytes).

In the first sector (the MBR) of qemu4dell.img I have zeroed out line 4 of the partition table because the file does not include partition 4.

If the boot flag is set for sda1 in file qemu4dell.img the command line above boots sda1 (MSDOS 6.22) just fine.

If the boot flag is set for sda2 in file qemu4dell.img the command line above results in error message:

missing operating system. 

Careful examination of the boot program (IPL) in the first sector of qemu4dell.img shows that that message occurs if the IPL can't find the hex value AA55 at the end of the first sector of the partition to be booted (which is sda2). I refer to the first sector of sda2 as vbs2. I have double checked in qemu4dell.img and ensured that vbs2 sector is in the correct location in the file and that the value AA55 is in the correct place in the sector.

I can see no reason why QEMU doesn't boot sda2, because QEMU can boot sda1 ok, and also sda2 boots fine on the HD itself. Perhaps someone in this QEMU group knows the answer.


Bill Schaible

reply via email to

[Prev in Thread] Current Thread [Next in Thread]