booting logical partitions?

Started by mattrix, January 16, 2017, 12:06:30 PM

Previous topic - Next topic

mattrix

Hi Elmar,

I'm still having trouble with logical drives.
I have installed plop 5.0.15 into track0.

I have set up my disk with a "flat" extended partition table, currently it is
   L1 FAT Sys'd  FreeDos (hidden)
   L2 FAT sys'd  FreeDos
   L3 Ext2
   L4 Unused

The first table has a system installed that needs 3 primary partitions.

Linux and FreeDos can both see & use their file systems, when booted from external media.

I set up a profile with these "linked partitions"
HDA    HDA1
          HDA2
          HDA3
   80h HDA4   L1
HDB ....

and it boots fine. :)

I want L2 to be a linux boot partition.
So I hid L1 and set up a profile for L2 the same as L1.

but when I boot this profile, plop gives me
"Warning: No valid bootsector signature"
and if I contine the OS doesn/t start. :(

What am I doing wrong?
Where is plop looking for the boot sector?
When I boot from L1 I can see the files on L2 and examine the boot sector which looks valid.

It looks like plop is looking in the wrong place for the boot sector.
Is there a way to find out where plop is looking?

Regards,
matt

Elmar

Quote from: mattrix on January 16, 2017, 12:06:30 PM
So I hid L1 and set up a profile for L2 the same as L1.

Why and how do you hide L1?

Best regards
Elmar

mattrix

[quote ]
Why and how do you hide L1?
[/quote]

I changed the partition type to 7F, so that freedos would not find a pre-existing installation.

Regards,

Elmar

Did you change it with the boot manager or with another tool?

mattrix

#4
Quote
Did you change it with the boot manager or with another tool?

With another tool. I couldn't find any partition definitions for logical partitions in the boot manager.

Regards,

Elmar

Quote from: mattrix on January 17, 2017, 11:22:48 AM
With another tool. I couldn't find any partition definitions for logical partitions in the boot manager.

Correct, the boot manager has none. I thought, maybe you disabled the whole extended partition when you hide it.

How did you check that its a classic extended partition?

mattrix

#6
Quote
How did you check that its a classic extended partition?

I had to create it manually with a sector editor.

As I said Freedos and linux can see and use their respective file systems from the extended table.

Regards,

Elmar

Did you install grub or another linux loader to the boot sector of the logical partition?

mattrix

#8
the extended sector has nothing but a table and 55AA
L1 and L2 have freedos boot sectors
L3 has whatever linux puts there after mke2fs.

No linux loaders at this stage, I just wanted to confirm L2 boots freedos first.


Elmar

Ok, so L1 and L2 with FreeDOS is booting, but L3 with Linux not. Correct?

mattrix

No.

L1 boots if I un-hide it.
L2 does not boot.
L3 has no boot loader associated with it

Actually I think L1 boots hidden or not.


Elmar

and what means

Quote from: mattrix on January 17, 2017, 12:47:13 PM
...., I just wanted to confirm L2 boots freedos first.

mattrix

#12
Hello Elmar,

I have conducted the following testing.

I have created a definition in the partition menu, that describes L2 relative to the start of disk.
     And it does boot freedos.
     Conclusion: the filesystem in L2 is valid and operational.

When I boot freedos from L1, I am able to use the file system in L2, eg to store files.
     Conclusion:  the extended table is valid.

When I try to boot L2 using this profile:
HDA    HDA1
          HDA2
          HDA3
   80h HDA4   L2
HDB ....

     plop gives me
     "Warning: No valid boot sector signature"

     Conclusion plop is looking in the wrong place for a boot sector.

Suggestion it would be useful if plop's message was:
     "Warning: No valid signature in boot sector  XXXXX"
     where XXXX is the sector it is trying to load.

Note Apart from losing a primary partition, test 1 was a lot easier to set up than setting up a "flat" extended table.

Regards,
matt

Elmar

I also created a test.

I created a 300 MB disk image. Booted a MS-DOS floppy with qemu.

With fdisk i created
    one primary partition (unused, just required by fdisk to enable the creation of an extended partition)
    one extended partition that has 2 logical partitions

I formatted both logical partitions and also made them boot able with MS-DOS. (booting does not work, see later)

I installed the Plop Boot Manager and configured 2 profiles for the logical partitions.

Then I tried to boot MS-DOS from logical 1 and 2. I don't get the invalid boot sector warning on L1 or L2. MS-DOS begins to boot, but later it did not find command.com.
Then I tried it with FreeDOS. Unfortunately, FreeDOS hangs on both partitions. I don't know why. No error message.
Then I tried it with Syslinux and it starts without problems from both partitions. Visible with different output of the menu. You see in the first menu line what logical partition has been booted.

The compressed image size is about 40 MB. You can download it from https://download.plop.at/files/bootmngr/logpart-test.img.gz (Note: Maybe the download is not available after one month)

Best regards
Elmar





mattrix

#14
Hello Elmar,

I don't use qemu.
Unfortunately track0 did not survive my manipulations.
However I was able to examine the resulting file.

I found 3 chained partition tables on the disk:
CHS = 0:0:1       With the extended definition
CHS = 102:0:1   with the definition of L1
CHS = 265:0:1   with the definition of L2
> could you please confirm this?

As both L1 and L2 boot for you, it seems plop does NOT support flat extended tables.
If plop told me which boot sector it was trying to load, I should have been able to work this out.

Regards,
matt

Elmar

Quote from: mattrix on January 18, 2017, 11:28:51 AM
I don't use qemu.

Then use another virtual machine. It's just a raw disk image.


Quote from: mattrix on January 18, 2017, 11:28:51 AM
Unfortunately track0 did not survive my manipulations.

What kind of manipulations are you doing?


Quote from: mattrix on January 18, 2017, 11:28:51 AM
I found 3 chained partition tables on the disk:
CHS = 0:0:1       With the extended definition
CHS = 102:0:1   with the definition of L1
CHS = 265:0:1   with the definition of L2
> could you please confirm this?

L1 is CHS 102:1:1
The extended partition is CHS 102:0:1


Quote from: mattrix on January 18, 2017, 11:28:51 AM
As both L1 and L2 boot for you, it seems plop does NOT support flat extended tables.

This sentence makes no sense to me. When it boots, then the boot manger does not support it????


Quote from: mattrix on January 18, 2017, 00:38:58 AM
... test 1 was a lot easier to set up than setting up a "flat" extended table.
Quote from: mattrix on January 18, 2017, 11:28:51 AM
If plop told me which boot sector it was trying to load, I should have been able to work this out.

From your writings, I think, that you created your "flat" extended partition by hand. If its so, then I think, that's the source of the problem.

Elmar

#16
I checked again the image file and I have to correct my previous post. The MS-DOS fdisk also created a cascaded extended partition.

It so long time ago (January 2010), when I wrote the extended partition support for the boot manager, that I can't remember all changes. I have to look at my code to check how extended partitions are handled. 4 classic logical partitions have been supported long time ago. It seems, I changed that. Now it looks like 1 logical (L1) + 1 cascaded logical partition (L2) are working and L3/L4 does not work. But I have to check my code.