The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
CD-ROM saga (a funny story)
9 July 1998
|
After much delay, for what reason, I don't know, I finally dropped into Quay Computers and bought a CD-ROM. Not a flash
one, just an old 24x speed which had a 30 day warranty. A decent deal for NZ$95.
I planned to install it that night, but something else came up. When I got home later that day, I found that the FreeBSD box had rebooted. At first I thought 'power cut'. Then I saw that NT1 was still running. And both used the same UPS. So it wasn't a power problem. There was no reason for the reboot that I could see. So I decided to ignore it and press on with other things. Namely, the CD-ROM. I switched off the firewall and installed the CD-ROM. When I switched on the machine, the screen filled with Ys. Lots of them. Continuously filling the screen. Line by line. I couldn't figure it out. So I disconnected the drive from the IDE controller. The machine then ran OK. But I couldn't connect from NT1 through the firewall to the Internet. And my DNS was stuffed. What was going on here! I figured something really serious had gone wrong. Anything from someone hacking into my system and changing something to a power surge blowing some code on the hard drive. I spent 4 hours trying to get it running again. Finally, I sent a message to the FreeBSD Questions mailing list and headed off to bed. Very annoyed! |
10 July 1998 - Inspiration
|
The next day I figured it out during a lull at work (actually, I was staring out the
window at the harbour wondering why I wasn't out there riding my bike).
Master. Slave. Can't have two masters. DOH. That night, I got it right. I swapped the little plug thing at the back of the CD-ROM and converted it from a master to a slave. You see, the IDE controller was already looking after the hard drive. Which is normally the master. And the machine booted. The next step was mounting the drive. Which was a journey in own right. |
Mounting the CD-ROM Drive
|
I received one suggestion about making sure the network cards where both working.
They were. So I gave up on the firewall problem and decided to install the
CD-ROM. The FreeBSD site was down and I couldn't search for instructions on how to mount the drive. It's not like Windows where the thing is just there. You actually have to issue commands in order to see the drive. I rang up Jay, who had a guest, but helped anyway. We found out what device the drive was mapped to. By using the command dmesg, you can see the boot time messages. We found wcd0. He told me to try:
It didn't work. We tried the MAKEDEV command on the device in order to make sure it's there. It still didn't work. So I tried searching the web. Eventually I found
And tried it. It works. I could read the CD-ROM. Yea! |
Where's my file system?
|
After the CD-ROM was mounted and I proved to myself that I could read the contents, I
unmounted the drive and rebooted. I placed the drive into the final resting place,
dropping a few screws underneath the motherboard in the process. Getting them out
was a real pain. I had to shake the box really hard to dislodge them. I wired everything up, put it all back together again. And rebooted the machine. Oh. What's that message mean:
Well. I was annoyed. I couldn't figure out why this was happening now. |
Restoring my botched system
|
I bypassed the firewall and connected to EFnet IRC Network and into #freebsd. Here's the
chat session, just for a laugh. I've removed the extraneous stuff and changed other
names to protect identity. JunkMale is my nickname, and xyz is the person that
offered help.
In short, what I did was:
then I rebooted. And all was well. I had the system back and my CD-ROM worked. |
7 August 1998
|
I've just noticed that I haven't actually indicated how to mount the cdrom.
Here's the command I use now:mount -t cd9660 /dev/wcd0c /cdrom To unmount the above: umount /cdrom |
There is a shortcut to mounting a CD-ROM. It includes placing a list in /etc/fstab
which looks something like this:/dev/wcd0c /cdrom cd9660 ro,noauto 0 0 With such a line, you can mount your cdrom with just the following command: mount /cdrom |