🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.setup
Article #201

Re: Writing fat16 partition from image file

#201
From: Howard Johnson
Date: Tue, 04 Aug 1998 00:00
36 lines
2552 bytes
In article <togu0lmq9.fsf@wcl-l.bham.ac.uk>,
Brian McCauley  <B.A.McCauley@bham.ac.uk> wrote:
>"Darren Mackay" <dcmackay@tech-center.com> writes:

>> Is is possible to this in linux?
>> 1. Create an image file of a fat16 partition.
>I tried the other day and failed.  mkfs.msdos seems to require
>knowlege of the disk geometry.  An image file has no geometry.  You
>could of course use a parition then read it into a file.

Why not build the fat16 partition directly using DOS/Windows?  Then it
could be copied out to an image file with Linux or a custom DOS program.

>> 2. Can the image file be written directly to empty drive space
>I'm assuming if you need geometry to create a FAT16 fs this info is
>actually needed by something.  I'd guess this means that an image file
>from a parition with one geometry would fail if you wrote it to one
>with another.

True.  The partitions must be of identical size, and each image would
need to run on essentially identical hardware.  In addition, the
geometry (number of heads/cylinder and sectors/track) according to
INT13 convention would need to be the same.  I've been able to move
DOS/Win16 partitions around (to different starting cylinders), but I
haven't had as much luck with Win95.

>> 3. How can I set the active partition using a script
>
>There's a program called "activate" out there somewhere but I've not
>looked at it for several years.  It exists (or at least existed) for
>DOS and Linux.

I'd be a bit concerned about what got written to the boot sector also.

I don't know how picky mkfs.msdos is about disk geometry.  I have been
able to create ext2 partitions using /dev/loop* pseudo-devices.
Technical Details
Message-ID: <6q7i6c$8sk$1@xmission.xmission.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6q5uq5$338$1@bunyip.cc.uq.edu.au> <togu0lmq9.fsf@wcl-l.bham.ac.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1103af,3a4b808ac28d8a36
X-Google-Attributes: gid1103af,public
X-Google-Thread: 102983,3a4b808ac28d8a36
X-Google-Attributes: gid102983,public
X-Google-Thread: f9b51,3a4b808ac28d8a36
X-Google-Attributes: gidf9b51,public
From: hjohnson@xmission.xmission.com (Howard Johnson)
Subject: Re: Writing fat16 partition from image file
Date: 1998/08/04
Message-ID: <6q7i6c$8sk$1@xmission.xmission.com>
X-Deja-AN: 377888877
References: <6q5uq5$338$1@bunyip.cc.uq.edu.au> <togu0lmq9.fsf@wcl-l.bham.ac.uk>
X-Complaints-To: abuse@xmission.com
X-Trace: news.xmission.com 902253586 6359 198.60.22.2 (4 Aug 1998 17:59:46 GMT)
Organization: XMission Internet   http://www.xmission.com
NNTP-Posting-Date: 4 Aug 1998 17:59:46 GMT
Newsgroups: comp.os.linux.setup,comp.os.linux.misc,aus.computers.linux