[techtalk] linux 6.1 install

Laurel Fan lf25+ at andrew.cmu.edu
Fri Oct 29 04:03:26 EST 1999


Excerpts from linuxchix: 29-Oct-99 Re: [techtalk] linux 6.1 in.. by Kir
Kolyshkin at sgp.sever. 
> 2. Mount CD-ROM, cd to its "images" directory (on my machine I type "mount
> /mnt/cdrom; cd /mnt/cdrom/images") and do
>  
>   cp boot.img /dev/fd0
>  
> This command will create boot disk for you.

Are you sure this will work?  If you aren't, I don't recommend trying it
as root unless you wouldn't mind fixing /dev [0].  Try

dd if=boot.img of=/dev/fd0

instead.

[0]. /dev/fd0 is a file.  Usually, when cp gets an existing file as a
destination argument, it overwrites it.  Assuming that it treats special
files no different from regular files, what this will do is take out
/dev/fd0 and replace it with a random image file, which means you won't
be able to use your floppy drive until you fix this [1]. Assuming that
it treats it like a character special device, it's sort of like a named
pipe to a device driver, in which case it will confuse the floppy driver
and do nothing useful [2].  Its possible that cp does something special
for a block special file, but anyway, the dd command is only about 8
keystrokes longer, and is the Right Way to do it.  (If you've actually
tried cp'ing to a floppy device or know what it will do, please tell me,
because I'm curious now, and don't feel like messing with things at the
moment :))

[1] Yes, probably at worst you'll just have to fix /dev/fd0 with
  mknod /dev/fd0 b 2 0
but who knows...

[2] You can cp to character special files, such as /dev/audio, and do
something useful. Try
  cp somefile /dev/audio
or  
  cat somefile > /dev/audio
but turn your speakers down first.  I've noticed that ELF executables
and .o's have recognizable patterns...



************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list