Thread View: comp.sys.next.misc
4 messages
4 total messages
Started by Karl Hanzel
Tue, 05 Jan 1993 22:20
how to read a (ie:'tar') floppy?!?
Author: Karl Hanzel
Date: Tue, 05 Jan 1993 22:20
Date: Tue, 05 Jan 1993 22:20
30 lines
1974 bytes
1974 bytes
Ok, i give up... What's the secret to being able to stuff (just for example) a 'tar' floppy into a NeXT's drive and then to read it? The scenario is this: i'm here at work, and i write off a 'tar' floppy on a machine here. I go home and plug it in my NeXT, only to be prompted "Floppy unreadable: initialize or eject?:" by a dialog window. It expects that any floppy you stick in it is supposed to be a mountable file system... that's what it will do to it if you select the "initialize" option. I need an "ignore" option that will just let it sit there in the drive until i later go to read it with 'tar'. The workspace has a preferences option that sounds like it would do the trick (under disk/removable_media, there is "do nothing") but it doesn't... you still get the prompt for "initialize or eject" when inserting a non-fs floppy. Now, i not too cleverly figured out how to work around this to write a 'tar' (or it might as well be 'cpio', 'dd'...) floppy. I go ahead and "initialize" it (wasting time while it creates the file system (and maybe does a format?)), but then as root, unmount that new filesytem without ejecting the floppy. Then, i'm free as me to do whatever with it... oh... until i want to eject it. Then what? "Eject" is not at that point selectable from the workspace's "disk" menu. I think i have to reboot the machine to get it to eject. This seems impossibly silly!... what am i missing here? The basic user doc doesn't even hint at how to proceed with this. pax, Karl *-----> (NeXT Mail to karl@khaos.com, thanks!)
Re: how to read a (ie: 'tar') floppy?!?
Author: Gordie Freedman
Date: Wed, 06 Jan 1993 06:01
Date: Wed, 06 Jan 1993 06:01
65 lines
2628 bytes
2628 bytes
In article <1id1irINNmr8@anthrax.solbourne.com> hanzel@solbourne.com (Karl
Hanzel) writes:
> Ok, i give up...
>
> What's the secret to being able to stuff (just for example) a 'tar' floppy
> into a NeXT's drive and then to read it? The scenario is this: i'm here
> pax,
> Karl
> *----->
>
> (NeXT Mail to karl@khaos.com, thanks!)
>
Note: This answer, or a better one should probably go into the FAQ, this
question (and other related ones, such as "my floppy is stuck I can't eject
it") is asked a lot.
When you use the tar command from the shell, specify /dev/rfd0b (for example to
read the table of contents on a floppy: "tar tf /dev/rfd0b"). The man page on
tar goes into more detail about the specifics. Don't insert the floppy, just
type your tar command, and NeXTSTEP will politely ask you to insert the disk.
Now, you need to set the permissions on /dev/rfd0b to rw for whoever is using
it. To do everyone (note /dev/rfd0b is owned by root):
% chmod 666 /dev/rfd0b
% ls -alsx /dev/rfd0b
0 crw-rw-rw- 1 root 41, 1 Nov 4 10:23 /dev/rfd0b
%
If you don't want to set the permissions, you have to run tar as root.
To eject the disk, there is a command somewhere, sorry I can't remember what it
is. However, a bit of hacking will get it ejected for you (see man page on fd
et al for more info).
Here's a program, name the source eject.m and do what the comments say.
-------------cut for eject.m-----------------
#include <stdio.h>
#include <sys/file.h>
#include <bsd/dev/disk.h>
#include <bsd/dev/fd_extern.h>
// save this file as eject.m
// % make eject # Make a binary (no makefile required)
// % strip ./eject # Shrink the binary
// % ./eject # to eject the disk
// As long as /dev/rfd0b is crw-rw-rw- this will work, else
// run this program as root.
void
main (int argc, char** argv)
{
int fd = open ("/dev/rfd0b", O_RDONLY, 0);
ioctl (fd, DKIOCEJECT);
close (fd);
exit (0);
}
-----------------end eject.m-------------
--
--- Gordie Freedman gordie@cyclesoft.com NeXTMail Yes! ---
>>> Thou shalt not inline functions more complicated than 20
Re: how to read a (ie: 'tar') floppy?!?
Author: Carl Lowenstein
Date: Wed, 06 Jan 1993 15:33
Date: Wed, 06 Jan 1993 15:33
24 lines
1692 bytes
1692 bytes
In article <1id1irINNmr8@anthrax.solbourne.com> hanzel@solbourne.com (Karl Hanzel) writes:
>
>What's the secret to being able to stuff (just for example) a 'tar' floppy
>into a NeXT's drive and then to read it? The scenario is this: i'm here
>at work, and i write off a 'tar' floppy on a machine here. I go home and plug
>it in my NeXT, only to be prompted "Floppy unreadable: initialize or eject?:"
>by a dialog window. It expects that any floppy you stick in it is supposed to
>be a mountable file system... that's what it will do to it if you select the
>"initialize" option. I need an "ignore" option that will just let it sit
>there in the drive until i later go to read it with 'tar'.
Don't insert the floppy until the OS asks for it. i.e. give the command
% tar xvf /dev/rfd0a
and wait for the prompt panel to come up and ask you to insert a disk.
This should probably be in the FAQ list, but I don't think it is.
--
carl lowenstein marine physical lab u.c. san diego
{decvax|ucbvax} !ucsd!mpl!cdl cdl@mpl.ucsd.edu
clowenstein@ucsd.edu
Re: how to read a (ie:'tar') floppy?!?
Author: Volker Herminghaus-Shirai
Date: Wed, 06 Jan 1993 21:11
Date: Wed, 06 Jan 1993 21:11
22 lines
1226 bytes
1226 bytes
In article <1id1irINNmr8@anthrax.solbourne.com> hanzel@solbourne.com (Karl Hanzel) writes: > Ok, i give up... > > What's the secret to being able to stuff (just for example) a 'tar' floppy > into a NeXT's drive and then to read it? The scenario is this: i'm here > at work, and i write off a 'tar' floppy on a machine here. I go home and plug > it in my NeXT, only to be prompted "Floppy unreadable: initialize or eject?:" > by a dialog window. It expects that any floppy you stick in it is supposed to > be a mountable file system. Simple. Issue the tar command first, before inserting the disk. You will be prompted to insert the disk. -- Volker Herminghaus-Shirai (vhs@qb.rhein-main.de), NeXTmail welcome Looks good on the outside, but - intel inside
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads