Re: [Freedos-user] Thousands of Run chkdsk: Bad FAT I/O: 0x... messages, error when formatting

2012-11-10 Thread André Bachmann
2012/11/9 Eric Auer e.a...@jpberlin.de:

 Hi Bernd, Andre,

 I was going to install FreeDOS 1.1 on a USB drive within qemu 1.1.1 on
 Opensuse 12.2 32 bit. After selecting the language in the FreeDOS
 installer, my notebook was busy during the next hour with thousands of
 thousands of messages like Run chkdsk: Bad FAT I/O: 0x

 The kernel produces that message when getblock fails. Bernd,
 the message is printed by clusterMessage and getblock is a
 macro for getblk (x, y, FALSE) which apparently is, more or
 less, a wrapper for dskxfer to let BUFFERS do their work...

 Probably something tried to access the drive as if it already
 was formatted while it was not, maybe failed to set a flag to
 mark the drive as unformatted in some internal processing...


Yesterday I tested a little bit more and I noticed that these messages
(Run chkdsk: Bad FAT I/O: 0x...) don't appear if I change only one
small step in my way: If I use the partition label c (FAT32) instead
of 6 (FAT16), all is fine. Maybe this helps you to further track down
the errors?

 I've seen this as well, usually with a drive C: (primary active FAT32
 partition) that didn't have a filesystem on it yet (done by FORMAT) Some
 installation tools check drive C: to see if it's present.

 That might fit the above, yes. Is it specific to USB drives?

 Here is exactly what I did:
 - plugged in a USB drive
 - erased all partition data with dd if=/dev/zero of=/dev/sdb bs=1M 
 count=16
 - created a new FAT16 partition with fdisk (1 GB, partition label 6),
 set this to active
 - created the filesystem with mkfs -t vfat -n FreeDOS /dev/sdb1

 You should reboot between the last 2 steps if it were DOS,
 but apparently you used Linux. When you create DOS drives
 in Linux, you might accidentally mismatch CHS, LBA, FAT32
 and FAT16 at some point, although I am not sure if there
 is a risk to do so during the steps described above. Also,
 at least with older mkdosfs (from dosfstools) it happened
 that the partition offset and/or geometry were not nicely
 set in the boot sector, causing extra work for my boot
 sector installing Perl script sys-freedos-linux. I think
 that using SYS in DOS itself had no problems, though, at
 least when you booted via any non-virtual way first :-)

 You could try providing this USB Flash Device to QEMU without first
 assigning a partition and filesystem. FreeDOS is able to do it by itself
 using the FDISK program to create a partition, and FORMAT program (after
 rebooting QEMU once FDISK has finished). FORMAT C: /Q should do the
 trick. Afterwards run SYS C:

 Actually you should NOT use FORMAT /Q in this case: That
 would try to backup some details to support later UNFORMAT
 which does not make much sense on a freshly partitioned
 drive. You can use FORMAT /Q /U to avoid the saving of
 unformat data if speed is an issue, or just use FORMAT
 without /Q option to get a non-quick format process :-)
 If you use /U without /Q, the whole drive contents will
 be wiped which can take a very long time in DOS.

 After that, I started qemu with qemu-system-i386 -hda /dev/sdb -cdrom
 fd11src.iso -boot d. The FreeDOS installer started, I begun the
 installation with 1. It let me choose my language, and after this
 the enormous amount of error messages. About an hour later, the
 installer finally asked me where to install - I chose C: (the
 installer showed me mysteriously only 255 MB). Then it asked me if I
 want to format the drive with FAT32 - which I accepted. However, now
 it showed me the following error message:

 Invalid Drive! Aborting.
   [Error 61]
 FORMAT status: 4
 Could not format your hard disk

 The main.c source code of FORMAT suggests that this will
 happen if your drive is neither remote nor SUBST-ed but
 still you cannot get a truename of X:\ where X is the
 drive letter of the drive in question... Truename here
 is used to check for ASSIGN, JOIN or SUBST, but as it
 fails to check this at all, the drive is probably not
 even registered for DOS yet... Maybe rebooting between
 the FDISK and the FORMAT step would help here - in the
 QEMU case virtually rebooting is of course enough :-)

 Is your USB stick more emulator-friendly if performing the partitioning
 with Gparted or something?

 I would also suggest that. GPARTED makes it very easy
 to partition and format a drive with a few mouse clicks
 and as you have QEMU, you apparently already have Linux.
 If not, there are also a number of nice ISOs to make a
 bootable CD or DVD with GPARTED, or make a boot stick.


I will try it with gparted.

 Standard reference procedure should be something like detailed in:
 http://sourceforge.net/apps/mediawiki/freedos/index.php?title=VirtualBox

 Good point. We already have that howto for VirtualBox,
 somebody could make a howto for Qemu based on that :-)

 Eric


Well, all of this problems would be much less annoying if there would
be an image on the FreeDOS site which I can simply dd to an USB drive
- all of these error prone steps would 

Re: [Freedos-user] Thousands of Run chkdsk: Bad FAT I/O: 0x... messages, error when formatting

2012-11-10 Thread Bernd Blaauw
Op 10-11-2012 12:11, André Bachmann schreef:

 Well, all of this problems would be much less annoying if there would
 be an image on the FreeDOS site which I can simply dd to an USB drive
 - all of these error prone steps would be unnecessary.

Which emulation or (para)virtualisation product uses/produces harddisk 
images that can directly be 'dd'ed to a physical disk? I've experimented 
a bit with Isohybrid images (CD image with harddisk header) that can be 
written to USB stick, but afterwards Windows doesn't like the stick 
anymore as it wants to format it. Also installing FreeDOS on the same 
stick isn't that much of a success.

USB stick partition layout:
* MBR (not UEFI/EFI's GPT)
* partition 1: active, primary, (unknown / non-DOS) read-only ISO9660
* partition 2: primary, FAT32, writeable.

After writing the FreeDOS CD to partition 1, and booting from the stick, 
the idea is a small bootdisk image is loaded in memory from this CD 
filesystem (DOS boots only from FAT, not ISO9660) after which the rest 
of the 1st partition is accessed. Unfortunately no CD driver exists for 
this kind of scenario.
A workaround is loading a secondary ISO file in memory from this 1st 
partition, allowing FreeDOS to find its files using the ELTORITO.SYS driver.
With the files found, creation and installation to partition 2 is possible

Windows insisting on removable media not being allowed to have 
partitions, let alone using unrecognised filesystems on them, isn't 
helping at all to proceed.

[ 
http://code.google.com/p/nanox-microwindows-nxlib-fltk-for-dos/wiki/XFDOS ] 
uses a bootable harddisk image but no individual harddisk image file is 
available, only a CD which uses harddisk-emulation.

Bernd

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Thousands of Run chkdsk: Bad FAT I/O: 0x... messages, error when formatting

2012-11-10 Thread Eric Auer

Hi!

(Note to Felix: That yahoo group seems to be not open?)

 Yesterday I tested a little bit more and I noticed that these messages
 (Run chkdsk: Bad FAT I/O: 0x...) don't appear if I change only one
 small step in my way: If I use the partition label c (FAT32) instead
 of 6 (FAT16), all is fine. Maybe this helps you to further track down
 the errors?

Maybe your drive is too big (more than 8 GB if geometry
is perfect) or has confused geometry (USB does not have
any real CHS geometry, so mismatches between different
components about what CHS should be are frequent) which
made FAT16 CHS a problem? Try using type e (FAT16 LBA)
and maybe compare if type b (FAT32 CHS) fails as type 6
(FAT16 CHS) if you want to do some more experiments :-)

 Actually you should NOT use FORMAT /Q in this case: That
 would try to backup some details to support later UNFORMAT

I think FORMAT /Q /U or format without options are nice.

 Well, all of this problems would be much less annoying if there would
 be an image on the FreeDOS site which I can simply dd to an USB drive
 - all of these error prone steps would be unnecessary.

That would be relatively easy with a FAT partitioned image
but gives you side effects: If the image is for size X and
your stick has more space, the rest just stays unused. But
then on the other hand, more fancy approaches like Bernd's
image with ISO and FAT partitions combined have other side
effects, in his case making Windows think that the stick is
so weird that Windows wants to format it :-p

I think because everybody has sticks around and prices are
low, we could try to make people happy with a small image
(whatever is appropriate, maybe 1 GB? Then you also have a
lot of space to add your own data) with fixed partitioning.

Advanced users can use e.g. GPARTED to grow the partition
to fill the stick or can add more partitions, while others
can just re-format the stick when they are done with using
it for DOS. I assume re-formatting is easy in Windows??

Regards, Eric



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Thousands of Run chkdsk: Bad FAT I/O: 0x... messages, error when formatting

2012-11-09 Thread Bernd Blaauw
Op 9-11-2012 16:47, André Bachmann schreef:
 Hi there,

 I was going to install FreeDOS 1.1 on a USB drive within qemu 1.1.1 on
 Opensuse 12.2 32 bit. After selecting the language in the FreeDOS
 installer, my notebook was busy during the next hour with thousands of
 thousands of messages like Run chkdsk: Bad FAT I/O: 0x

I've seen this as well, usually with a drive C: (primary active FAT32 
partition) that didn't have a filesystem on it yet (done by FORMAT) Some 
installation tools check drive C: to see if it's present.

 Here is exactly what I did:
 - plugged in a USB drive
 - erased all partition data with dd if=/dev/zero of=/dev/sdb bs=1M count=16
 - created a new FAT16 partition with fdisk (1 GB, partition label 6),
 set this to active
 - created the filesystem with mkfs -t vfat -n FreeDOS /dev/sdb1

You could try providing this USB Flash Device to QEMU without first 
assigning a partition and filesystem. FreeDOS is able to do it by itself 
using the FDISK program to create a partition, and FORMAT program (after 
rebooting QEMU once FDISK has finished). FORMAT C: /Q should do the 
trick. Afterwards run SYS C:

 After that, I started qemu with qemu-system-i386 -hda /dev/sdb -cdrom
 fd11src.iso -boot d. The FreeDOS installer started, I begun the
 installation with 1. It let me choose my language, and after this
 the enormous amount of error messages. About an hour later, the
 installer finally asked me where to install - I chose C: (the
 installer showed me mysteriously only 255 MB). Then it asked me if I
 want to format the drive with FAT32 - which I accepted. However, now
 it showed me the following error message:

 Invalid Drive! Aborting.
   [Error 61]
 FORMAT status: 4
 Could not format your hard disk

Not seen this error before, sorry.

Is your USB stick more emulator-friendly if performing the partitioning 
with Gparted or something?

Standard reference procedure should be something like detailed in:
http://sourceforge.net/apps/mediawiki/freedos/index.php?title=VirtualBox

Bernd

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Thousands of Run chkdsk: Bad FAT I/O: 0x... messages, error when formatting

2012-11-09 Thread Eric Auer

Hi Bernd, Andre,

 I was going to install FreeDOS 1.1 on a USB drive within qemu 1.1.1 on
 Opensuse 12.2 32 bit. After selecting the language in the FreeDOS
 installer, my notebook was busy during the next hour with thousands of
 thousands of messages like Run chkdsk: Bad FAT I/O: 0x

The kernel produces that message when getblock fails. Bernd,
the message is printed by clusterMessage and getblock is a
macro for getblk (x, y, FALSE) which apparently is, more or
less, a wrapper for dskxfer to let BUFFERS do their work...

Probably something tried to access the drive as if it already
was formatted while it was not, maybe failed to set a flag to
mark the drive as unformatted in some internal processing...

 I've seen this as well, usually with a drive C: (primary active FAT32 
 partition) that didn't have a filesystem on it yet (done by FORMAT) Some 
 installation tools check drive C: to see if it's present.

That might fit the above, yes. Is it specific to USB drives?

 Here is exactly what I did:
 - plugged in a USB drive
 - erased all partition data with dd if=/dev/zero of=/dev/sdb bs=1M count=16
 - created a new FAT16 partition with fdisk (1 GB, partition label 6),
 set this to active
 - created the filesystem with mkfs -t vfat -n FreeDOS /dev/sdb1

You should reboot between the last 2 steps if it were DOS,
but apparently you used Linux. When you create DOS drives
in Linux, you might accidentally mismatch CHS, LBA, FAT32
and FAT16 at some point, although I am not sure if there
is a risk to do so during the steps described above. Also,
at least with older mkdosfs (from dosfstools) it happened
that the partition offset and/or geometry were not nicely
set in the boot sector, causing extra work for my boot
sector installing Perl script sys-freedos-linux. I think
that using SYS in DOS itself had no problems, though, at
least when you booted via any non-virtual way first :-)

 You could try providing this USB Flash Device to QEMU without first 
 assigning a partition and filesystem. FreeDOS is able to do it by itself 
 using the FDISK program to create a partition, and FORMAT program (after 
 rebooting QEMU once FDISK has finished). FORMAT C: /Q should do the 
 trick. Afterwards run SYS C:

Actually you should NOT use FORMAT /Q in this case: That
would try to backup some details to support later UNFORMAT
which does not make much sense on a freshly partitioned
drive. You can use FORMAT /Q /U to avoid the saving of
unformat data if speed is an issue, or just use FORMAT
without /Q option to get a non-quick format process :-)
If you use /U without /Q, the whole drive contents will
be wiped which can take a very long time in DOS.

 After that, I started qemu with qemu-system-i386 -hda /dev/sdb -cdrom
 fd11src.iso -boot d. The FreeDOS installer started, I begun the
 installation with 1. It let me choose my language, and after this
 the enormous amount of error messages. About an hour later, the
 installer finally asked me where to install - I chose C: (the
 installer showed me mysteriously only 255 MB). Then it asked me if I
 want to format the drive with FAT32 - which I accepted. However, now
 it showed me the following error message:

 Invalid Drive! Aborting.
   [Error 61]
 FORMAT status: 4
 Could not format your hard disk

The main.c source code of FORMAT suggests that this will
happen if your drive is neither remote nor SUBST-ed but
still you cannot get a truename of X:\ where X is the
drive letter of the drive in question... Truename here
is used to check for ASSIGN, JOIN or SUBST, but as it
fails to check this at all, the drive is probably not
even registered for DOS yet... Maybe rebooting between
the FDISK and the FORMAT step would help here - in the
QEMU case virtually rebooting is of course enough :-)

 Is your USB stick more emulator-friendly if performing the partitioning 
 with Gparted or something?

I would also suggest that. GPARTED makes it very easy
to partition and format a drive with a few mouse clicks
and as you have QEMU, you apparently already have Linux.
If not, there are also a number of nice ISOs to make a
bootable CD or DVD with GPARTED, or make a boot stick.

 Standard reference procedure should be something like detailed in:
 http://sourceforge.net/apps/mediawiki/freedos/index.php?title=VirtualBox

Good point. We already have that howto for VirtualBox,
somebody could make a howto for Qemu based on that :-)

Eric


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user