public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* 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 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

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