Author Topic: booting logical partitions?  (Read 10368 times)

mattrix

  • Newbie
  • *
  • Posts: 11
booting logical partitions?
« on: January 16, 2017, 12:06:30 PM »
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
« Last Edit: January 17, 2017, 02:25:51 AM by mattrix »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #1 on: January 17, 2017, 09:26:43 AM »
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

  • Newbie
  • *
  • Posts: 11
Re: booting logical partitions?
« Reply #2 on: January 17, 2017, 10:12:13 AM »
[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

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #3 on: January 17, 2017, 11:12:18 AM »
Did you change it with the boot manager or with another tool?

mattrix

  • Newbie
  • *
  • Posts: 11
Re: booting logical partitions?
« Reply #4 on: January 17, 2017, 11:22:48 AM »
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,
« Last Edit: January 17, 2017, 11:25:34 AM by mattrix »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #5 on: January 17, 2017, 11:27:43 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

  • Newbie
  • *
  • Posts: 11
Re: booting logical partitions?
« Reply #6 on: January 17, 2017, 11:39:23 AM »
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,
« Last Edit: January 17, 2017, 11:42:19 AM by mattrix »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #7 on: January 17, 2017, 12:08:56 PM »
Did you install grub or another linux loader to the boot sector of the logical partition?

mattrix

  • Newbie
  • *
  • Posts: 11
Re: booting logical partitions?
« Reply #8 on: January 17, 2017, 12:47:13 PM »
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.

« Last Edit: January 17, 2017, 12:49:40 PM by mattrix »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #9 on: January 17, 2017, 13:08:53 PM »
Ok, so L1 and L2 with FreeDOS is booting, but L3 with Linux not. Correct?

mattrix

  • Newbie
  • *
  • Posts: 11
Re: booting logical partitions?
« Reply #10 on: January 17, 2017, 13:17:35 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #11 on: January 17, 2017, 13:31:12 PM »
and what means

...., I just wanted to confirm L2 boots freedos first.

mattrix

  • Newbie
  • *
  • Posts: 11
Re: booting logical partitions?
« Reply #12 on: January 18, 2017, 00:38:58 AM »
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
« Last Edit: January 18, 2017, 01:13:26 AM by mattrix »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #13 on: January 18, 2017, 05:50:54 AM »
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

  • Newbie
  • *
  • Posts: 11
Re: booting logical partitions?
« Reply #14 on: January 18, 2017, 11:28:51 AM »
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
« Last Edit: January 18, 2017, 11:31:03 AM by mattrix »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #15 on: January 18, 2017, 11:51:52 AM »
I don't use qemu.

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


Unfortunately track0 did not survive my manipulations.

What kind of manipulations are you doing?


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


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????


... test 1 was a lot easier to set up than setting up a "flat" extended table.
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: booting logical partitions?
« Reply #16 on: January 18, 2017, 12:08:21 PM »
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.
« Last Edit: January 18, 2017, 12:19:28 PM by Elmar »