Integrating Win95 and Samba in detail (long)

Louis Mandelstam lma at sacc.org.za
Fri Oct 3 18:33:16 GMT 1997


On Fri, 3 Oct 1997, John Blair wrote:

> 1) How do you format the C: drive from Linux so Win95 can use it?  
> Have you already exited Linux and I'm missing something?
> 2) What tricky problems did you run into with IO.SYS?

I found that the best way to prepare C: before installing the pre-made
Win95 tree onto it, was to use the command-line utilities supplied with
Win95.  That part of the process looks something as follows:

1. Run Linux fdisk with commands piped to it, causing it to remove any
   currently existing partitions on the hard drive, then creating one
   partition which takes up all the space, has it's partition ID set to 6
   (DOS 16-bit >= 32M) and is has the DOS active flag enabled.

   The script code that does this is:

   echo -e 'd\n 1\n d\n 2\n d\n 3\n d\n 4\n' \
           'n\n p\n 1\n 1\n' \
           $(hdparm -gq /dev/hda \
             | tr -s ' ' \
             | cut -d ' ' -f 4 \
             | cut -d / -f 1)'\n' \
           't\n 1\n 6\n a\n 1\n w\n' \
   | fdisk > /dev/tty3 2> /dev/tty3

   (Note that all the workstations I need to support with this have one
    IDE hard drive, but the size varies.  The above copies with this
    nicely.)

2. Second, I boot dosemu (Linux DOS enviroment), with its boot floppy
   image set to a file mounted from the server, which is a DOS 7.0 boot
   disk image containing:
   <standard DOS boot files>
   FDISK.EXE
   FORMAT.COM
   AUTOEXEC.BAT (contents below)
   EXITEMU.COM (exits dosemu)

   AUTOEXEC.BAT contains:
      fdisk /mbr (sets the hard drive master boot record)
      format c: /s /u /autotest (something like that at least)
      exitemu (exits the emulator, so the process continues inside Linux)

   This effectively means that when I execute dosemu, it prepares C:, then
   exits immediately - no user interaction involved.

   The format happens quite quickly, since dosemu "absorbs" the BIOS int
   0x13h (I presume) calls issued to format disk tracks, so only the
   filesystem creation etc really occurs, which is perfect for what we're
   doing.

   This puts IO.SYS etc on C: where we want them - later when the archive
   is extracted onto the hdd, IO.SYS is overwritten, but since it's the
   same file, it gets overwritten in place and stays valid.  If not, I'd
   simply remove IO.SYS from the install tree, of course.

> I'm know I'm asking for all sorts of details, but you've hit on 
> something potentially really useful.  I'm excited to try it out.

Please ask away - I'll be leaving the office shortly, but I'll be back to
follow up on Monday morning.

Regards

---------------------------------------------------------------|-----|--
Louis Mandelstam              Tel +27 83 227-0712   Symphony  /|\   /|\
Linux systems integration     http://sr.co.za       Research {   } {   }
Johannesburg, South Africa    mailto:louis at sr.co.za (Pty)Ltd {___} {___}






More information about the samba mailing list