Nextor and automatic drive mappings

Page 1/3
| 2 | 3

By raymond

Hero (643)

raymond's picture

24-08-2021, 20:08

I have a Turbo-R machine with a Carnivore 2 with the Sunrise IDE v0.1.7 driver. I have created several 4GB partitions on the CF-card and activated them via fdisk. As I understood from the manual they should automatically be mounted when booting. However, I only get the first partition... What am I doing wrong?

Login or register to post comments

By Manuel

Ascended (19462)

Manuel's picture

24-08-2021, 21:17

As far as I understand, that's normal.

What I did myself is add a mapping in the AUTOEXEC.BAT as follows:
mapdrv b: 2 1 1-1
to get the 2nd partition mapped as drive B:.

By Pencioner

Scribe (1563)

Pencioner's picture

24-08-2021, 21:28

Nextor only automatically mounts first partition of each drive (so f.e. if you have more than one Nextor device in system, you will have first partition of each drive mounted automatically. To mount other partitions you have to use AUTOEXEC.BAT which is not ideal solution either because MAPDRV accepts slot-subslot as argument, so if you insert cartridge in another slot, it will fail

BTW, i always wanted MAPDRV to accept drive letter of already mounted partition instead of slot-subslot-LUN information as reference to mount another partition. Technically it is possible, because you can fetch Nextor related information of already mounted partition with DRVINFO command, so it could be possible to mount another, f.e. second partition like:
MAPDRV F: 2 A:
instead of
MAPDRV F: 2 0-1 1
here '1-0 1' depends on device driver implementation and slot were device is inserted, this can be fetched from the A: device which is already mounted, so in theory it is possible to make it work without specifying it in command line, but specifying a reference - already mounted drive letter

By sdsnatcher73

Prophet (3951)

sdsnatcher73's picture

24-08-2021, 21:38

That’s a nice idea Pencioner, however I would really wish Nextor would go back to how MSX-DOS2 does it. DOS2 just mounts all the partitions on a drive, one after another.

By Pencioner

Scribe (1563)

Pencioner's picture

24-08-2021, 21:55

sdsnatcher73 wrote:

That’s a nice idea Pencioner, however I would really wish Nextor would go back to how MSX-DOS2 does it. DOS2 just mounts all the partitions on a drive, one after another.

This would be less flexible, as with Nextor you can have more than 8 partitions, and mount/unmount by demand. But some option for DOS2 compatibility mode would be nice to have too

By Manuel

Ascended (19462)

Manuel's picture

24-08-2021, 23:58

Nestor wrote to me when I asked about this in the past:

Quote:

Anyway, there are basically four ways to use MAPDRV (not counting disk image mounting):

MAPDRV <drive>: <partition> - change partition, keep the same device already mapped.
MAPDRV <drive>: <device> - change to partition in specified device, which is attached to the controller already mapped.
MAPDRV <drive>: <device> <slot> - change to partition in specified device, which is attached to the specified controller.
MAPDRV <drive>: <partition> <device> 0 - change to partition in specified device, which is attached to the primary controller.

Usually you'll have only one controller, so you'll just need the first two.

Quote:

I copied nextor.dat to it, expeciting I wouldn't need to do the mapping next boot. But to my surprise, the mapping was not done after rebooting.

First of all, NEXTOR.DAT is no longer a thing since Nextor 2.1. If you want to specify which partition will be the chosen one at boot, you need to set its "active" flag. You can do that via the built-in FDISK (it will let you change the flag on existing partitions, no need to repartition the device).

And second, drive mappings set with MAPDRV are not persistent; Nextor has no way to store any custom mapping performed after boot. So of course after you reboot your mapping is lost. The most you can do is to run MAPDRV in AUTOEXEC.BAT.

So, the way I did it can be simplified.

By sdsnatcher73

Prophet (3951)

sdsnatcher73's picture

25-08-2021, 11:06

I'll try that out, should make life a bit simpler. Still if we could have e.g. a NEXTOR.INI that if it has AUTOMOUNT=Y will mount all partitions that would be much easier for many novice MSX'ers. I would argue AUTOMOUNT should be the default even and people that have special use cases or need more flexibility can set AUTOMOUNT to N.

By erpirao

Paragon (1315)

erpirao's picture

25-08-2021, 20:35

the truth is that it is a detail that I miss a lot in the nextor, maybe you could make a program like "eset" of mega-scsi, and map the boot partitions, as sdsnatcher73 says

By konamiman

Paragon (1198)

konamiman's picture

26-08-2021, 09:13

Hi, let me throw in my 0.02€:

Quote:

However, I only get the first partition

I just want to remind that you can choose which partition is mounted at boot by setting its "active" flag with FDISK. Mounting the first existing partition is the default behavior when no partitions have this flag set.

Quote:

That’s a nice idea Pencioner, however I would really wish Nextor would go back to how MSX-DOS2 does it. DOS2 just mounts all the partitions on a drive, one after another.

MSX-DOS knows nothing about devices or partitions. It just asks the driver how many drives does it control, maps one drive letter to each of those drives, and that's it. If you have a device that maps all the existing partitions at boot, that's because the device developers implemented it that way, not because "MSX-DOS 2 does it". This ad-hoc behavior is what the Nextor device drivers design aimed to avoid.

Quote:

This would be less flexible, as with Nextor you can have more than 8 partitions, and mount/unmount by demand. But some option for DOS2 compatibility mode would be nice to have too

Exactly, that's the point. If you have a device with a ton of partitions it would easily eat all the drives at boot, making the other devices (e.g. the internal disk drive) invisible. And for sure, someone would complaint about that as well. Smile

But again, there's really no "DOS 2 compatibility" to discuss here; DOS 2 doesn't handle partitions at all, the partition related behavior on devices with MSX-DOS kernel is implemented in the driver.

Quote:

To mount other partitions you have to use AUTOEXEC.BAT which is not ideal solution either because MAPDRV accepts slot-subslot as argument, so if you insert cartridge in another slot, it will fail

Usually you'll use just one controller, then you can specify slot number 0 to MAPDRV, meaning "the primary controller". But may I ask how often do you change the slot where you have your storage controller inserted? Smile

Quote:

BTW, i always wanted MAPDRV to accept drive letter of already mounted partition instead of slot-subslot-LUN information as reference to mount another partition. Technically it is possible, because you can fetch Nextor related information of already mounted partition with DRVINFO command, so it could be possible to mount another

Now that's a really nice idea and I don't think it would be very complicated to implement. Feel free to create an enhancement request for this in GitHub and I'll take a look.

Quote:

Still if we could have e.g. a NEXTOR.INI that if it has AUTOMOUNT=Y will mount all partitions that would be much easier for many novice MSX'ers. I would argue AUTOMOUNT should be the default even and people that have special use cases or need more flexibility can set AUTOMOUNT to N.

That's also a really nice idea... but that one would be not so easy to implement. Sad The kernel would have to scan the root directory of the main device for that NEXTOR.INI (although it did that already in the past for NEXTOR.DAT), parse and verify the file, then apply it once everything has been properly initialized.

I see more viable to develop an AUTOMAP.COM tool and run it on AUTOEXEC.BAT. All the required function calls for such a tool are already in place.

Finally, a couple of pseudo-random thoughts:

I realize that the partition management behavior and tools in Nextor are far from ideal. With the "map just one partition of each device" approach I tried to find a compromise solution that was at least minimally acceptable to everybody: you see all your devices at boot and you are able to use MAPDRV to map others.

Also, the Nextor repository is open to pull requests in case anyone is willing (and able) to give me a hand. Going back to that AUTOMAP.COM tool, for example, I don't think I'll implement it myself (I prefer to dedicate my always shrinking free time to improving/fixing the kernel), but if someone wants to take the challenge, go for it and of course AMA.

By Grauw

Ascended (10768)

Grauw's picture

26-08-2021, 12:23

konamiman wrote:

I just want to remind that you can choose which partition is mounted at boot by setting its "active" flag with FDISK. Mounting the first existing partition is the default behavior when no partitions have this flag set.

Selecting which partitions auto-mount by setting the “active” seems like the perfect solution to me to be honest. (I presume you can set this flag on more than one partition.)

konamiman wrote:

Usually you'll use just one controller, then you can specify slot number 0 to MAPDRV, meaning "the primary controller". But may I ask how often do you change the slot where you have your storage controller inserted? Smile

Ah since you ask, I change slots quite often, I swap my MegaFlashROM SCC+ SD between my MSX machines quite a lot and am not paying attention to what slot I insert it in. Also sometimes I change the slot to get some other extension to work. I also share the same SD card between different disk interface extensions, which have different internal slot layouts.

So avoiding the need for the end user to use slot identifiers seems like a good concept to me. I like Pencioner’s idea, and that automap tool idea would achieve something similar as well.

But then again I don’t feel the need to have more than 1 partition. 4 GB is plenty enough for me, and I find dealing with multiple drives a hassle because it makes it harder to find where you put things. And if I had a need for more than one partition, I can use the active partition flag.

konamiman wrote:

That's also a really nice idea... but that one would be not so easy to implement. Sad The kernel would have to scan the root directory of the main device for that NEXTOR.INI (although it did that already in the past for NEXTOR.DAT), parse and verify the file, then apply it once everything has been properly initialized.

In my opinion AUTOEXEC.BAT fulfills exactly the same purpose that such an INI file would, in a more flexible way. You can define environment variables and execute programs.

By sdsnatcher73

Prophet (3951)

sdsnatcher73's picture

26-08-2021, 12:52

Grauw wrote:
konamiman wrote:

I just want to remind that you can choose which partition is mounted at boot by setting its "active" flag with FDISK. Mounting the first existing partition is the default behavior when no partitions have this flag set.

Selecting which partitions auto-mount by setting the “active” seems like the perfect solution to me to be honest. (I presume you can set this flag on more than one partition.)

Only one partition can be marked active and only the marked partition is mounted as A: (unless your disk interface is in a lower slot, then it becomes C: unfortunately), in my opinion (although off topic slightly) Nextor should always let any disk ROM initialize first and let it mount its drives, afterwards Nextor can mount the partitions. That way the resulting operating environment will always be the same regardless the location of the disk ROM.

Grauw wrote:
konamiman wrote:

Usually you'll use just one controller, then you can specify slot number 0 to MAPDRV, meaning "the primary controller". But may I ask how often do you change the slot where you have your storage controller inserted? Smile

Ah since you ask, I change slots quite often, I swap my MegaFlashROM SCC+ SD between my MSX machines quite a lot and am not paying attention to what slot I insert it in. Also sometimes I change the slot to get some other extension to work. I also share the same SD card between different disk interface extensions, which have different internal slot layouts.

So avoiding the need for the end user to use slot identifiers seems like a good concept to me. I like Pencioner’s idea, and that automap tool idea would achieve something similar as well.

But then again I don’t feel the need to have more than 1 partition. 4 GB is plenty enough for me, and I find dealing with multiple drives a hassle because it makes it harder to find where you put things. And if I had a need for more than one partition, I can use the active partition flag.

I do this as well (swap SD between OCM, MFR, GR8NET) and computers (some with disk ROM in slot 0). I do have multiple partitions, 1 with the OS, utilities and applications (2GB in size). A second one with ROM and disk images (4GB) and 2 more partitions with VGM packs (both also 4GB).

Grauw wrote:
konamiman wrote:

That's also a really nice idea... but that one would be not so easy to implement. Sad The kernel would have to scan the root directory of the main device for that NEXTOR.INI (although it did that already in the past for NEXTOR.DAT), parse and verify the file, then apply it once everything has been properly initialized.

In my opinion AUTOEXEC.BAT fulfills exactly the same purpose that such an INI file would, in a more flexible way. You can define environment variables and execute programs.

I disagree, AUTOEXEC.BAT is for when the OS has finished booting, a NEXTOR.INI (or CONFIG.SYS if you compare it to MS-DOS) would configure the OS during boot time.

Page 1/3
| 2 | 3