* Re: unable to boot as user
@ 2002-06-16 21:51 Stas Sergeev
2002-06-17 10:44 ` Baurjan Ismagulov
0 siblings, 1 reply; 8+ messages in thread
From: Stas Sergeev @ 2002-06-16 21:51 UTC (permalink / raw)
To: linux-msdos; +Cc: Baurjan Ismagulov
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
Hello.
Baurjan Ismagulov wrote:
> I've thought about that, but was not sure whether that was indended
> behaviour for bootoff.
That is intended behaviour for bootoff
but since you don't use bootoff...
> however, for some
> reason, dosemu disables a: after booting, which results in "Current
> drive is no longer valid>" prompt (I don't use bootoff)
Yep, I can see something similar
here.
> which is kind
> of unexpected -- all I needed floppy for was doing "sys c:" and copying
> a couple of files to c:.
Agreed that it is confusing, but
I don't see any clear logic to handle
this setuation.
What I can propose is only the attached
hack. Does it fix your problems this time?
[-- Attachment #2: floppy.diff --]
[-- Type: text/plain, Size: 769 bytes --]
--- src/base/misc/disks.c Tue Mar 19 00:58:12 2002
+++ src/base/misc/disks.c Fri Jun 14 23:17:10 2002
@@ -891,6 +891,12 @@
else dp->rdonly = dp->wantrdonly;
}
+ if (!FDISKS && use_bootdisk) {
+ /* if we don't have any configured floppies, we have to use bootdisk instead */
+ memcpy(&disktab[0], &bootdisk, sizeof(bootdisk));
+ FDISKS++; /* now we have one */
+ }
+
/*
* Open hard disks
*/
@@ -1011,10 +1017,9 @@
int checkdp_val;
disk = LO(dx);
- if (disk < FDISKS) {
- if (!disk && use_bootdisk)
- dp = &bootdisk;
- else
+ if (!disk && use_bootdisk)
+ dp = &bootdisk;
+ else if (disk < FDISKS) {
dp = &disktab[disk];
switch (HI(ax)) {
#define DISKETTE_MOTOR_TIMEOUT (*((unsigned char *)0x440))
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: unable to boot as user
2002-06-16 21:51 unable to boot as user Stas Sergeev
@ 2002-06-17 10:44 ` Baurjan Ismagulov
2002-06-17 13:04 ` Bart Oldeman
0 siblings, 1 reply; 8+ messages in thread
From: Baurjan Ismagulov @ 2002-06-17 10:44 UTC (permalink / raw)
To: linux-msdos
Hello,
On Mon, Jun 17, 2002 at 01:51:47AM +0400, Stas Sergeev wrote:
> I don't see any clear logic to handle
> this setuation.
> What I can propose is only the attached
> hack. Does it fix your problems this time?
Yes, thank you. Why you are considering it a hack? I.e., what, in your
opinion, would be a "clean" solution?
With best regards,
Baurjan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to boot as user
2002-06-17 10:44 ` Baurjan Ismagulov
@ 2002-06-17 13:04 ` Bart Oldeman
2002-06-17 13:43 ` Baurjan Ismagulov
0 siblings, 1 reply; 8+ messages in thread
From: Bart Oldeman @ 2002-06-17 13:04 UTC (permalink / raw)
To: Baurjan Ismagulov; +Cc: linux-msdos
On Mon, 17 Jun 2002, Baurjan Ismagulov wrote:
> On Mon, Jun 17, 2002 at 01:51:47AM +0400, Stas Sergeev wrote:
> > I don't see any clear logic to handle
> > this setuation.
> > What I can propose is only the attached
> > hack. Does it fix your problems this time?
>
> Yes, thank you. Why you are considering it a hack? I.e., what, in your
> opinion, would be a "clean" solution?
I was just thinking: isn't $_vbootfloppy *intended* to be used with
bootoff, so it needs access to a "real" floppy?
If you want to use A: permanently as a file you ought to be able to
specify something like
$_floppy_a ="atapi:/path/to/image"
I am not sure if that that works now (I saw several ioctl's in disks.c,
except for "atapi" where it reads #sectors/track etc. from the boot
sector).
Bart
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to boot as user
2002-06-17 13:04 ` Bart Oldeman
@ 2002-06-17 13:43 ` Baurjan Ismagulov
0 siblings, 0 replies; 8+ messages in thread
From: Baurjan Ismagulov @ 2002-06-17 13:43 UTC (permalink / raw)
To: linux-msdos
On Mon, Jun 17, 2002 at 02:04:30PM +0100, Bart Oldeman wrote:
> I was just thinking: isn't $_vbootfloppy *intended* to be used with
> bootoff, so it needs access to a "real" floppy?
This is exactly what I've meant in
http://marc.theaimsgroup.com/?l=linux-msdos&m=102424304029792&w=2 by
saying "intended behaviour for bootoff" in an attempt to explain why I
patched the documentation rather than the code.
> If you want to use A: permanently as a file you ought to be able to
> specify something like
>
> $_floppy_a ="atapi:/path/to/image"
This works if I boot from c:. "dosemu -A" gives "Disk I/O error".
With best regards,
Baurjan.
P.S. Please cc to me, I'm not subscribed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to boot as user
@ 2002-06-16 16:02 Baurjan Ismagulov
0 siblings, 0 replies; 8+ messages in thread
From: Baurjan Ismagulov @ 2002-06-16 16:02 UTC (permalink / raw)
To: linux-msdos
Hello,
> Your patch doesn't seem to attack
> the root of the problem:)
> Does the attached patch fixes this?
It does, thank you.
I've thought about that, but was not sure whether that was indended
behaviour for bootoff. In fact, when I start dosemu with your patch, it
boots from vbootfloppy even after "chmod 0 /dev/fd0"; however, for some
reason, dosemu disables a: after booting, which results in "Current
drive is no longer valid>" prompt (I don't use bootoff), which is kind
of unexpected -- all I needed floppy for was doing "sys c:" and copying
a couple of files to c:.
Please cc to me, as I'm not subscribed.
With kind regards,
Baurjan.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unable to boot as user
@ 2002-06-14 19:25 Stas Sergeev
0 siblings, 0 replies; 8+ messages in thread
From: Stas Sergeev @ 2002-06-14 19:25 UTC (permalink / raw)
To: linux-msdos
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
Hello.
> At last I was able to track down the problem. It turned out to be that
> one should have the real floppy accessible in order to boot from the
> image. In my case, ordinary users have no access to /dev/fd0.
> I suggest the change below.
Your patch doesn't seem to attack
the root of the problem:)
Does the attached patch fixes this?
[-- Attachment #2: floppy.diff --]
[-- Type: text/plain, Size: 451 bytes --]
--- src/base/misc/disks.c Tue Mar 19 00:58:12 2002
+++ src/base/misc/disks.c Fri Jun 14 23:17:10 2002
@@ -1011,10 +1011,9 @@
int checkdp_val;
disk = LO(dx);
- if (disk < FDISKS) {
- if (!disk && use_bootdisk)
- dp = &bootdisk;
- else
+ if (!disk && use_bootdisk)
+ dp = &bootdisk;
+ else if (disk < FDISKS) {
dp = &disktab[disk];
switch (HI(ax)) {
#define DISKETTE_MOTOR_TIMEOUT (*((unsigned char *)0x440))
^ permalink raw reply [flat|nested] 8+ messages in thread* unable to boot as user
@ 2002-06-14 14:21 Baurjan Ismagulov
2002-06-14 17:14 ` Baurjan Ismagulov
0 siblings, 1 reply; 8+ messages in thread
From: Baurjan Ismagulov @ 2002-06-14 14:21 UTC (permalink / raw)
To: linux-msdos
Hello,
I'm trying to boot win98 under dosemu 1.0.2.1-8 from debian sid. I put
the diskette image under /var/lib/dosemu, set
$_vbootfloppy = "win98.img"
in dosemu.conf and run dosemu. It boots as expected if dosemu is run by
root, and otherwise fails with the following message:
Linux DOS emulator 1.0.2.1 $Date: 2001/10/13 $
Last configured at Sun Apr 28 14:06:33 EST 2002 on linux
Disk I/O error
Replace the disk, and then press any key
Pressing any key just causes the message to repeat. Dosemu exits after
retrying three times.
I have "all c_all" in dosemu.users. I've tried setting $_secure to ""
and "0" in dosemu.conf and making dosemu.bin suid root -- the same
result.
List archives and Google retrieve quite a few threads discussing similar
issues, but I couldn't figure out how I can solve that. I would
appreciate any help. Please cc to me, as I'm not subscribed.
Attached are relevant (IMHO, that is) snippets from -D+a and strace -f
outputs.
Thanks in advance,
Baurjan.
Debug output (user):
CONSOLE MSG: 'Linux DOS emulator 1.0.2.1 $Date: 2001/10/13 $'
CONSOLE MSG: 'Last configured at Sun Apr 28 14:06:33 EST 2002 on linux'
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
DISK: null dp
Sector not found 1!
DISK 0 read [h:1,s:1,t:0](1)->0x700
DISK 0 undefined.
Debug output (root):
CONSOLE MSG: 'Linux DOS emulator 1.0.2.1 $Date: 2001/10/13 $'
CONSOLE MSG: 'Last configured at Sun Apr 28 14:06:33 EST 2002 on linux'
int 0x1c, ax=0x0000
DEFIVEC: int 0x1c @ 0xf000:0x01c0
Return from vm86() for STI
DISK: /var/lib/dosemu/win95.img: Trying to read 1 sectors at T/S/H
0/1/1+0 at pos 9728
DISK read @1/0/1 (1) -> 0x700 OK.
DISK: /var/lib/dosemu/win95.img: Trying to read 1 sectors at T/S/H
0/15/1+0 at pos 16896
DISK read @1/0/15 (1) -> 0x700 OK.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: unable to boot as user
2002-06-14 14:21 Baurjan Ismagulov
@ 2002-06-14 17:14 ` Baurjan Ismagulov
0 siblings, 0 replies; 8+ messages in thread
From: Baurjan Ismagulov @ 2002-06-14 17:14 UTC (permalink / raw)
To: linux-msdos
Hello,
On Fri, Jun 14, 2002 at 05:21:23PM +0300, Baurjan Ismagulov wrote:
> I'm trying to boot win98 under dosemu 1.0.2.1-8 from debian sid. I put
> the diskette image under /var/lib/dosemu, set $_vbootfloppy=win98.img
> in dosemu.conf and run dosemu. It boots as expected if dosemu is run
> by root, and otherwise fails with the following message:
> Disk I/O error
> Replace the disk, and then press any key
At last I was able to track down the problem. It turned out to be that
one should have the real floppy accessible in order to boot from the
image. In my case, ordinary users have no access to /dev/fd0.
I suggest the change below.
With kind regards,
Baurjan.
diff -Naur -x *.OLD dosemu-1.0.2.1.orig/etc/dosemu.conf dosemu-1.0.2.1/etc/dosemu.conf
--- dosemu-1.0.2.1.orig/etc/dosemu.conf Fri Jun 14 18:40:59 2002
+++ dosemu-1.0.2.1/etc/dosemu.conf Fri Jun 14 20:03:02 2002
@@ -125,10 +125,14 @@
# file name of the floppy image under DOSEMU_LIB_DIR
# e.g. "floppyimage" disables $_hdimage
# "floppyimage +hd" does _not_ disable $_hdimage
+ # Note that you MUST have $_floppy_a defined and
+ # accessible (check, for example, /dev/fd0 permissions)
+ # by the users running dosemu, otherwise you won't be
+ # able to boot from your image.
$_floppy_a ="threeinch" # or "fiveinch" or "atapi" or empty, if not existing
# optionally the device may be appended such as
# "threeinch:/dev/fd0"
-$_floppy_b = "" # dito for B:
+$_floppy_b = "" # ditto for B:
$_hdimage = "freedos" # list of hdimages under DOSEMU_LIB_DIR
# assigned in this order such as
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-06-17 13:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-16 21:51 unable to boot as user Stas Sergeev
2002-06-17 10:44 ` Baurjan Ismagulov
2002-06-17 13:04 ` Bart Oldeman
2002-06-17 13:43 ` Baurjan Ismagulov
-- strict thread matches above, loose matches on Subject: below --
2002-06-16 16:02 Baurjan Ismagulov
2002-06-14 19:25 Stas Sergeev
2002-06-14 14:21 Baurjan Ismagulov
2002-06-14 17:14 ` Baurjan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox