View previous topic :: View next topic |
Author |
Message |
psy_ill Tux's lil' helper
Joined: 06 Jul 2003 Posts: 106
|
Posted: Sat Feb 11, 2006 9:41 pm Post subject: [SOLVED] dd if=/dev/zero of=/dev/fd0 bs=1k count=1440 error |
|
|
I'm trying to copy an image of smart boot manager to a floppy using dd from coreutils 5.93, but it won't work.
So I tried to just zero every bit of the whole floppy, but it won't work.
I figured it was a bad floppy and switched to another, almost never used before floppy, but it won't work.
I do:
Code: |
dd if=/dev/zero of=/dev/fd0 bs=1k count=1440
|
and get
Code: |
dd: skriver "/dev/fd0": In/ut-fel
1+0 poster in
0+0 poster ut
0 byte (0 B) kopierade, 1,24379 sekunder, 0,0 kB/s
|
and my dmesg gives me:
Code: |
floppy0: data CRC error: track 0, head 0, sector 1, size 2
floppy0: data CRC error: track 0, head 0, sector 1, size 2
end_request: I/O error, dev fd0, sector 0
|
Why? What am I missing? These floppies have worked before!
Last edited by psy_ill on Tue Feb 14, 2006 1:07 am; edited 1 time in total |
|
Back to top |
|
|
Aysen Apprentice
Joined: 18 May 2005 Posts: 187 Location: Poland
|
Posted: Sat Feb 11, 2006 9:52 pm Post subject: |
|
|
Any chance that permissions on /dev/fd0 are screwed up? Although, looking at that dmesg, it's probably something else... |
|
Back to top |
|
|
psy_ill Tux's lil' helper
Joined: 06 Jul 2003 Posts: 106
|
Posted: Sat Feb 11, 2006 9:57 pm Post subject: |
|
|
Nothing wrong with my permissions.
Btw, I have tried doing the dd thing as root too.
Code: |
$ ls /dev/fd0
lrwxrwxrwx 1 root root 8 12 feb 00.04 /dev/fd0 -> floppy/0
$ ls /dev/floppy/0
brw-rw---- 1 root floppy 2, 0 12 feb 00.04 /dev/floppy/0
$ groups
foo floppy bar
|
|
|
Back to top |
|
|
sge_kane Tux's lil' helper
Joined: 10 Oct 2004 Posts: 84 Location: Germany (Frankfurt)
|
Posted: Sat Feb 11, 2006 10:16 pm Post subject: |
|
|
What if you choose to use
instead of your bs=1k and omit that count option....
Cheers |
|
Back to top |
|
|
psy_ill Tux's lil' helper
Joined: 06 Jul 2003 Posts: 106
|
Posted: Sat Feb 11, 2006 10:27 pm Post subject: |
|
|
Ok, I get a new error:
Code: |
$ dd if=/dev/zero of=/dev/fd0 bs=2x80x18b
dd: skriver "/dev/fd0": Enheten är full
1+0 poster in
0+0 poster ut
4096 byte (4,1 kB) kopierade, 1,06633 sekunder, 3,8 kB/s
|
Allow me to translate :)
dd: writing "/dev/fd0": unit is full
dmesg:
Code: |
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
floppy0: probe failed...
end_request: I/O error, dev fd0, sector 0
floppy0: fractionary current count b=0 s=0
addr=0, length=0
st=0 ast=0 mse=16 msi=8
ssize=10 SIZECODE=6
command=c5 SECTOR=1 HEAD=0, TRACK=0
buffer drive=0
buffer track=0
buffer_min=0
buffer_max=8
end_request: I/O error, dev fd0, sector 0
Buffer I/O error on device fd0, logical block 0
lost page write due to I/O error on fd0
|
|
|
Back to top |
|
|
psy_ill Tux's lil' helper
Joined: 06 Jul 2003 Posts: 106
|
Posted: Sat Feb 11, 2006 10:49 pm Post subject: |
|
|
I have tried various ways of loading the floppy module, to avoid any potentially dangerous operations.
Still no luck. I guess I will have to check the floppy cable once more and then I will probably have to find a new FDD. |
|
Back to top |
|
|
psy_ill Tux's lil' helper
Joined: 06 Jul 2003 Posts: 106
|
Posted: Tue Feb 14, 2006 12:27 am Post subject: |
|
|
News, bad news:
I checked the cable and it looked ok.
I got the crazy idea of booting a win98-dos-boot-floppy-cd to test if ms-dos 7.1 was able to do something useful with the floppy.
I ran
(the fake boot floppy on the cd was given the letter a, hence the b)
and I got a formatted floppy and
Code: |
1,457,664 bytes total disk space
27,648 bytes in bad sectors
1,430,016 bytes available
512 bytes in every allocation unit
2,793 allocation units available
|
Apparantly, the drive was working just fine.
I can now mount the floppy back in Gentoo using the vfat filesystem.
I can do this too:
Code: |
# mkfs.ext2 /dev/fd0
mke2fs 1.36 (05-Feb-2005)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
184 inodes, 1440 blocks
72 blocks (5.00%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
184 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
|
and then mount the floppy.
All of a sudden, dd starts working again:
Code: |
$ dd if=sbootmgr.dsk of=/dev/fd0
216+0 poster in
216+0 poster ut
110592 byte (111 kB) kopierade, 7,5805 sekunder, 14,6 kB/s
|
Of course, there are some problems with the bad blocks, but it is still a better result compared to my previous attempts:
Code: |
$ dd if=/dev/zero of=/dev/fd0 bs=512 count=2880
dd: skriver "/dev/fd0": In/ut-fel
2593+0 poster in
2592+0 poster ut
1327104 byte (1,3 MB) kopierade, 106,924 sekunder, 12,4 kB/s
|
In this last case, dmesg | tail gives me:
Code: |
floppy0: data CRC error: track 72, head 0, sector 4, size 2
floppy0: data CRC error: track 72, head 0, sector 4, size 2
end_request: I/O error, dev fd0, sector 2595
|
which means that some of the tracks have been mysteriously repaired, dd doesn't choke on the first track anymore!
What magic did ms-dos do and how do I make Gentoo Linux do the same trick? |
|
Back to top |
|
|
psy_ill Tux's lil' helper
Joined: 06 Jul 2003 Posts: 106
|
Posted: Tue Feb 14, 2006 1:06 am Post subject: |
|
|
Aha! I think I've found it!
Code: |
$ fdformat /dev/floppy/0
Dubbelsidig, 80 spår, 18 sektorer/spår. Total kapacitet 1440 kB.
Formaterar... klar
Verifierar... klar
|
After that, everything worked like a charm:
Code: |
$ dd if=resc1440-safe.bin of=/dev/fd0 bs=1b
2880+0 poster in
2880+0 poster ut
1474560 byte (1,5 MB) kopierade, 102,153 sekunder, 14,4 kB/s
|
fdformat did the magic! I now have a beautiful old boot floppy for Debian Slink with a 2.1.12 kernel, which (hopefully) will boot my friend's IBM Aptiva, which gets kernel panic when using a kernel after 2.2.20... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|