[Novalug] How the blazes do I write to a floppy?
DonJr
djr1952 at hotpop.com
Wed Feb 6 11:13:22 EST 2008
On Wed, 2008-02-06 at 07:05 -0800, Beartooth wrote:
> On Tue, 5 Feb 2008, DonJr wrote:
>
> > On Tue, 2008-02-05 at 12:01 -0800, Beartooth wrote:
> [...]
> >> [root at topblack ~]# grep -A 5 Sony /var/log/messages
> >> [root at topblack ~]#
> >> <shrug>
> >
> >
> > Ok now try:
> > dmesg | grep -i -A 5 -B 3 floppy
> >
> > { should output about 8 lines of text }
>
> [root at topblack ~]# dmesg | grep -i -A 5 -B 3 floppy
> usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid
> 0x03F0 pid 0x3F11
> usbcore: registered new interface driver usblp
The above is your USB driver being loaded
> input: PC Speaker as /class/input/input5
/\ The beep beep speaker
> Floppy drive(s): fd0 is 1.44M
> FDC 0 is a post-1991 82077
/\ The Floppy daa, but it looks almost like mine that's built in.
[17179607.492000] bttv0: PLL: 28636363 => 35468950 .<6>Floppy drive(s): fd0 is 1.44M
[17179607.508000] . ok
[17179607.540000] FDC 0 is a post-1991 82077
> parport_pc 00:06: reported by Plug and Play ACPI
> parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
Your Printer port
> ACPI: PCI Interrupt 0000:00:11.5[C] -> GSI 22 (level, low) -> IRQ
> 20
> PCI: Setting latency timer of device 0000:00:11.5 to 64
The ACPI being found and activated.
> [root at topblack ~]#
>
> (All of which is Geek to me ...)
> > There was a reference in dmesg about your "Floppy" you just
> > didn't get enough information about what it had to say.
> >
> >
> > What does the command:
> > lsusb
> >
> > output? {lists the usb interface much like lspci does for pci}
> >
> > If 'lsusb' fails then your usb support driver itself hasn't
> > been loaded.
>
> Well, at least now it sees it. (The HP is the printer.)
>
> [root at topblack ~]# lsusb
> Bus 001 Device 001: ID 0000:0000
> Bus 005 Device 001: ID 0000:0000
> Bus 004 Device 004: ID 054c:002c Sony Corp. USB Floppy Disk Drive
> Bus 004 Device 002: ID 03f0:3f11 Hewlett-Packard
> PSC-1315/PSC-1317
> Bus 004 Device 001: ID 0000:0000
> Bus 003 Device 001: ID 0000:0000
> Bus 002 Device 001: ID 0000:0000
> [root at topblack ~]#
>
> I neglected to mention at one point that I had gotten an
> error saying "Only root can do that!"
>
> [btth at topblack ~]$ mount /home/btth/DSLbootfloppy-grub.img
> /dev/floppy
> mount: only root can do that
Yes this is normal. As root most likely own '/dev/floppy'.
Plus that command doesn't really make any sense anyway.
It you want to access the contents of the file DSLbootfloppy-grub.img as
if it was a mounted floppy or partition the commands would be:
# mkdir -p /tmp/gfloppy
# mount -o loop /home/btth/DSLbootfloppy-grub.img /tmp/gfloppy
And you could then do:
ls -l /tmp/gfloppy
or whatever you wanted and anything that modified files in the
directory /tmp/gfloppy would modify the contents
of /home/btth/DSLbootfloppy-grub.img.
Although the above will only work if it has a FILESYSTEM
and a Grub Boot Floppy by default normally doesn't.
They are created by the command:
grub-floppy DSLbootfloppy-grub.img
Which internally does something close to the following:
dd if=/lib/i386-pc/stage1 of=floppy.img bs=512 count=1
dd if=/lib/i386-pc/stage2 of=floppy.img bs=512 skip=1
Those two files combine together like that pretty much fill up a floppy.
> [btth at topblack ~]$
>
> -- but when I tried it as root, it didn't help :
>
> [root at topblack btth]# mount /home/btth/DSLbootfloppy-grub.img
> /dev/floppy
> mount: /home/btth/DSLbootfloppy-grub.img is not a block device
> (maybe try `-o loop'?)
> [root at topblack btth]#
>
> -- nor did this (afaict) :
>
> [root at topblack btth]# file /home/btth/DSLbootfloppy-grub.img
> /home/btth/DSLbootfloppy-grub.img: x86 boot sector; GRand Unified
> Bootloader, stage1 version 0x3, boot drive 0x0, 1st sector stage2
> 0x5a, GRUB version n.m, code offset 0x48
> [root at topblack btth]#
Back to finding where the access device for the floppy really is:
UNPLUG the Floppy for a few minutes or even possible BOOT the system
without the USB floppy attached at all.
Then Plug the floppy in wait a minute or so and do the command again:
dmesg | grep -i -A 5 -B 3 floppy
BTW you don't have to be 'root' when you do the above command.
dmesg has always been a normal user usable command.
--
DonJr
More information about the Novalug
mailing list