Re: [Freedos-kernel] re: Re: reload partition table and reassign drive letters

2005-10-19 Thread Arkady V.Belousov
Hi!

20-Окт-2005 00:42 [EMAIL PROTECTED] (Bernd Blaauw) wrote to
freedos-kernel@lists.sourceforge.net:

>> style driver which MOUNTS an arbitrary FAT partition: You only
BB> except it cannot re-assign already used driveletters I guess. Same as

 There exists utilities, which swaps drive letters (for example,
SSWAP.EXE from Stacker). So, this is possible to handle drive mappings with
help of external utilities on the fly.

 Though, I suggest, this may be dangerous, if some other utility (like
disk cache) links itself to drive letters.

BB> If C..F are still available, dismount + remount.





---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] re: Re: reload partition table and reassign drive letters

2005-10-19 Thread Bernd Blaauw

Eric Auer schreef:

Hi, yes, FreeCOM can handle changing drive letters. The PROBLEM
is that harddisk letters are handled by a kernel driver which
can only do one hole-free range of drive letters. So if you
could enable a new partition on the fly, all subsequent drive
letters would move. HOWEVER, you are free to write a RAMDISK
style driver which MOUNTS an arbitrary FAT partition: You only
have to provide sector read/write and calculate the right (read:
offset by partition start position) sector numbers, and the
kernel will do the rest. Such a driver can even be loaded from
the prompt with devload...
except it cannot re-assign already used driveletters I guess. Same as 
Jason Hood's disk mounting tools cannot use B:,
the kernel already claims it as alternative for A:. There's no " if B: 
refers to same drive as A:, then allow another disk mounting tool to 
install itself as B:"

(hm, nice idea. No idea if possible).
Kernel can access the partition table, thus also count/determine how 
many FAT partitions are present.
1st FAT partition will be C:. So a certain range must be free [4 
partitions: C..F ].

If C..F are still available, dismount + remount.
I like this remount idea, it proves how much we consider the existing 
limits of DOS, even while writing replacement components that optionally 
may behave smarter/better as long as it doesn't hurt compatibility. 
Quarterdeck's quickboot was such an idea, and Eric implemented something 
like it in FDAPM (is there a single known case of "hotboot works" 
though?). Quickboot ment "skip BIOS part of boot process upon warm reboot".


DOS disk partitioning tools only insist on rebooting because the kernel 
only recognizes harddisk partitions upon initialisation of the kernel, 
not at runtime.
If the FreeDOS kernel would allow rescanning somehow, FreeDOS Fdisk 
could be made to not reboot if user decides so.


I realize the investment/profit ratio is very bad, which would mean this 
option would not be implemented any time soon, and would probably be a 
patch contributed by an 'external' developer instead of regular people 
working on the kernel.


@echo off
echo FAT partition on harddisk required, as drive C:
if exist c:\nul goto skipfdsk
fdisk
rem let the used DOS kernel re-initialise driveletters assigned to disk 
partitions. Don't touch A,B, and driveletters installed by drivers.

Fdisk /rescanharddisks
if not exist c:\nul fdisk /reboot
goto skipfdsk
:skipfdsk


a driver for mount/initialisation also sounds nice.

Eric


Bernd


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


[Freedos-kernel] re: Re: reload partition table and reassign drive letters

2005-10-19 Thread Eric Auer

Hi, yes, FreeCOM can handle changing drive letters. The PROBLEM
is that harddisk letters are handled by a kernel driver which
can only do one hole-free range of drive letters. So if you
could enable a new partition on the fly, all subsequent drive
letters would move. HOWEVER, you are free to write a RAMDISK
style driver which MOUNTS an arbitrary FAT partition: You only
have to provide sector read/write and calculate the right (read:
offset by partition start position) sector numbers, and the
kernel will do the rest. Such a driver can even be loaded from
the prompt with devload...

Eric



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel