I wanted to copy a CD so I pressed the eject button my IDE DVD player to
insert the new CD. However, the old one was still mounted. I thought the
drive was locked when a CD was mounted ? But no harm done - I simply
umounted and mounted again. The sequence is illustrated below, which I cut
and pasted from an xterm, slightly edited for clarity.
niall at bagend:~ >mount /cdrom
mount: /dev/cdrom already mounted or /media/cdrom busy
mount: according to mtab, /dev/hdd is already mounted on /media/cdrom
niall at bagend:~ >df /cdrom
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdd 653208 653208 0 100% /media/cdrom
niall at bagend:~ >umount /cdrom
niall at bagend:~ >mount /cdrom
niall at bagend:~ >df /cdrom
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdd 600526 600526 0 100% /media/cdrom
niall at bagend:~ >umount /cdrom
niall at bagend:~ >sudo dd if=/dev/hdd of=/mnt/xyzzy.iso bs=100k
niall at bagend:~ >sudo mount -o loop /mnt/xyzzy.iso /mnt1
niall at bagend:~ >df /mnt1
Filesystem 1k-blocks Used Available Use% Mounted on
/mnt/xyzzy.iso 653208 653208 0 100% /mnt1
Do you see the problem here ? I dd'ed the second CD to the file yet when I
loopback mount the iso image, the filesystem appears to have the size of the
first CD and an ls of the root of that filesystem show its contents to be
the same as the first CD. Something stinks here :-( Yet an ls of the actual
iso image shows that its size corresponds with the size of the filesystem
mounted from the second CD.
niall at bagend:~ >ls -l /mnt/xyzzy.iso
-rw-r--r-- 1 root root 615354368 Nov 12 11:46 /mnt/xyzzy.iso
No real harm done, as I'll simply make a new ISO which I'm doing now, but
there's definitely something awry. It started with my being able to eject a
mounted CD and went downhill from there. Any ideas ?
Niall
P.S. Interactive response on my box suffers when I do such a dd. I've an
idea it's IDE related. Any more ideas ?
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!