-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HD reading problem. CHS/LBA? or unhandled type 5 partition? #2189
Comments
Installation with You need to decide between the And I think I had this problem where I just did not know which partition type to set or it was useless to set the type of partition for FAT. I think it is checking the beginning of the partition, so the type was not used, there was something like that. |
Mounting usually requires setting the type of the target partition. For FAT on ELKS use:
or
One of them should work. |
I've had issues with this part recently as well. This description just did not work for me anymore. It barked with |
You did check: https://github.com/ghaerr/elks/wiki#remarks ? So |
Yes and yes, I edited |
Also try to limit the space you would like to use. Even if you have a lot of space, use mkfs or mkfat with less. For example 33000 which is 33MBs. If it complains, just adjust it. On ELKS you will never need more than 33 MBs. Big sizes might not be supported. |
ELKS doesn't (yet) support HD access free from BIOS, unfortunately. The BIOS is always used to access a hard drive currently. In addition, ELKS uses only the ancient CHS (cylinder/head/sector) BIOS method to access drives. The new LBA (logical block address) BIOS sector addressing method is not supported. This means that disks with more than 1024 cylinders are supported, since the original BIOS INT 13h function(s) are used. I suspect this is the reason you're disk isn't working. The
I haven't studied your reproduction directions with too much detail just yet, because if your disk has more than 1024 cylinders, it can't be made to work at the moment until we 1) add a direct-access (non-BIOS) HD driver, or 2) your PC BIOS can be setup to specially map Heads or Sectors in a way that allows access past 1024 real cylinders while only using 1024 logical cylinders.
ELKS can handle DOS extended partitions of type 5, as well as Linux extended partitions of type 0x85, but the same restrictions apply - max 1024 cylinders for the disk in total.
The partition type is only used when checking for DOS or Linux extended partitions; it is not used for determining FAT vs MINIX filesystem types.
This will work.
Use "msdos" not "vfat" for mounting a FAT filesystem.
The max size able to be given to mkfs is 65535.
I suspect the reason for saying "cannot do more than 0" is because of integer overflow on trying to convert an ascii number larger than 65535, and returning "0" instead.
We should probably have somebody update the description in the Wiki if it is incorrect. |
But our example in wiki installation is: |
Yes, the maximum that will work is 65535 (64MB). I just checked the mkfs source and it should give an error if 180000 is specified, but the Wiki should still be updated. The mkfs usage line, which is displayed on error is:
|
Finally! I think I have it now:
1) delete hda2 and re-create it as type 6 partition. This way I have 2 type
6 (FAT16 primary) partitions.
2) from DOS, format D:
3) from DOS, copy hd32fatimg.img to D, as sectors, skipping first cylinder
(starting at the second block that contains AA55 as boot4) signature).
4) reboot DOS. Test D: can be read.
5) using fdisk, set D: as boot.
6) reboot. Elks tries to boot
7) reboot from floppy.
8) mount /dev/hda2 into /mnt. Now, ELKS can mount /dev/hda2.
9) makeboot -M /dev/hda2
10) umount /mnt
11) sys /dev/hda2
In my computer, this does not work 100% ok, but I think it is due I made a
mistake in the size of the D: partition (I made it 120Mb long instead of
32Mb, so weird messages start to appear when system is copied to /mnt/bin).
But at last I could open /dev/hda2 from elks.
El dom., 19 ene. 2025 23:28, Gregory Haerr ***@***.***>
escribió:
… But our example in wiki installation is: mkfs /dev/hda1 180000. So this
must be reduced?
Yes, the maximum that will work is 65535 (64MB). I just checked the mkfs
source and it should give an error if 180000 is specified, but the Wiki
should still be updated.
The mkfs usage line, which is displayed on error is:
Usage: mkfs /dev/name blocks (Max blocks=65535)
—
Reply to this email directly, view it on GitHub
<#2189 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATUKSVSBSC3PRBF5F7V3CD2LQRHFAVCNFSM6AAAAABVOTI5DKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBRGA2DMMZUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Your latest comment reads a bit like the dual-boot adventure I had to play some time back: (have not tried that in a while, though, no guarantees) :) |
Yes, the problem is I don't have a network card in this computer, so if I
want to install a system bigger than the floppy (for example, the man
pages) I have to copy from the hd32mbrfat.img to the harddrive.
And there is a mistery dd does not seem to work with partition 2, so I have
to switch to DOS and use Norton utilities instead.
If I could easily transfer files from a working linux machine (e.g. using a
network card or even a serial null-modem cable) I'll try to patch mount to
allow mounting of "loop" files (so I could mount my truncated version of
hd32mbrfat.img).
I have freedos utilities that can "loop" mount files, but I think most of
my freedos utilities are 32-bit, so there is no way I can use them.
Regards!
El mié, 22 ene 2025 a las 19:05, floriangit ***@***.***>)
escribió:
… Your latest comment reads a bit like the dual-boot adventure I had to play
some time back:
https://github.com/ghaerr/elks/wiki/Dual-boot-ELKS-and-DOS#ms-dos-50
—
Reply to this email directly, view it on GitHub
<#2189 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATUKSRWFMZ66XFIRUV4QA32L7MU3AVCNFSM6AAAAABVOTI5DKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBXHEYTSNRWG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I finally understand what happens with dd.
dd if=file of=block_device returns "error, writing past end of partition"
if your file does not have the same size than the block device (being
either bigger, as the message suggests, or smaller).
I finally managed to pick a right size for my partition: ending in start+63
cylinders, head 15, sector 63, wich makes 63504 sectors, which is the size
of my trucated hd image (it seems I downloaded hd32fatmbr,img, so I
stripped out the first cylinder / first 32768 bytes).
The partition has to be class 6, so you have to make it from ELKS. and
there is the problem ELKS shell can't do calculations (to get the size of
the image) and the size of the image is too long to make calculations in
elksbasic (at least I get an error message when I try). I don't know if
UBASIC (a 80286 basic aimed at maths that could handle big numbers) can be
ported to elks
Many thanks for all your help.
El jue, 23 ene 2025 a las 11:32, José G Moya Y. ***@***.***>)
escribió:
… Yes, the problem is I don't have a network card in this computer, so if I
want to install a system bigger than the floppy (for example, the man
pages) I have to copy from the hd32mbrfat.img to the harddrive.
And there is a mistery dd does not seem to work with partition 2, so I
have to switch to DOS and use Norton utilities instead.
If I could easily transfer files from a working linux machine (e.g. using
a network card or even a serial null-modem cable) I'll try to patch mount
to allow mounting of "loop" files (so I could mount my truncated version of
hd32mbrfat.img).
I have freedos utilities that can "loop" mount files, but I think most of
my freedos utilities are 32-bit, so there is no way I can use them.
Regards!
El mié, 22 ene 2025 a las 19:05, floriangit ***@***.***>)
escribió:
> Your latest comment reads a bit like the dual-boot adventure I had to
> play some time back:
> https://github.com/ghaerr/elks/wiki/Dual-boot-ELKS-and-DOS#ms-dos-50
>
> —
> Reply to this email directly, view it on GitHub
> <#2189 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AATUKSRWFMZ66XFIRUV4QA32L7MU3AVCNFSM6AAAAABVOTI5DKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBXHEYTSNRWG4>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Hello @jgmy,
Yes - from what I've read, certain MSDOS tools require that a partition start on a cylinder boundary, although I'm not aware that's a strict requirement in ELKS. Nonetheless, good idea - the ELKS fdisk does the same thing. I am a bit surprised your HD required a heads setting of 15, rather than 16, though. 63504 sectors is 63 * 16 * 63, which would be 63 sectors, 16 heads and 63 cylinders, still skipping the first cylinder for partition start.
I have had an idea of making the ELKS
ELKS basic calculates everything in floating point, so this should have worked. Do you have hardware floating point on your computer/CPU? I'd like to see the error message you got so we can chase this down. Thank you! |
Various hd issues.
Description
Hi!
I tried to install elks in my 1990 AT computer in order to use the entire hard drive (more than 1024 cylinders) ,using a unix-like, free from bios, approach.
Configuration
How to reproduce ?
Error:
Bioshd sector 2 access beyond partition.
Bioshd: I/O read error dev 302 lba sector 2
Minix: unable to read sb
FAT: me=0,csz=0,#f=0,floc=0,....
FAT: Unsupported format
Mount failed: unsupported argument.
Raw data
Screenshot(s):
Log file:
(Sorry I can't transfer log from 286 to my mobile phone without a hell of screwdriving horrors).
Additional information
Add any other context information about the problem here.
The text was updated successfully, but these errors were encountered: