vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Recently I installed Fedora Core 3. My machine has a CD-ROM drive and a CD-R drive. The file systems on my single 40G disk are Windows, ext2 and swap. My hostname was a combination of cableone and my IP address. I put a data disk in my CD-ROM drive and a blank CD-R in my CD-R drive. As root I gave the command readcd dev=ATA:1,0,0 -clone f=somefile It hung. somefile was created at 0 bytes. somefile.toc became 50 bytes. After a few minutes I was feeling murderous. As root, I tried to kill the process with kill -9. It didn't die. kill didn't complain, it just didn't get the job done. Repeated effort didn't help. I tried umount /media/cdrom . I expected to get a device busy error. I did the third time. The first umount hung. The second had to be done in another window. It finished. readcd was still running, as was the first umount. Control-C didn't help either. Eventually I resorted to reboot. In the shutdown phase, I think I saw some things like umount failed, device busy go by. In the boot phase, I was told to run fsck, so I did. Absent any reason to do otherwise, I answered y to all of its questions. Rebooting eventually seemed to be successful. Now my hostname is stmike. Huh? I'd seen that name before when Fedora thought that I didn't have an internet connection and wouldn't even offer DHCP. Presumably Fedora knows better now, since I'm using it and the internet to type this. What's going on? Why doesn't readcd like me? Why couldn't I kill it? What about umount? Why did DHCP go away? Where did stmike come from? I never tell a computer my name is mike. Even if I did, where would the st come from? /etc/fstab looks like this: # This file is edited by fstab-sync - see 'man fstab-sync' for details LABEL=/1 / ext2 defaults 1 1 LABEL=/boot1 /boot ext2 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 LABEL=/home1 /home ext2 defaults 1 2 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 LABEL=/usr/local1 /usr/local ext2 defaults 1 2 LABEL=SWAP-hda5 swap swap defaults 0 0 /dev/hdd /media/cdrecorder auto pamconsole,fscontext=system_u 0 0 /dev/hdc /media/cdrom auto pamconsole,fscontext=system_u 0 0 /dev/fd0 /media/floppy auto pamconsole,fscontext=system_u 0 0 Help. |
| |||
| On 2005-04-14, Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > As root I gave the command > readcd dev=ATA:1,0,0 -clone f=somefile If you wanted to copy the cd why didn't you do something like dd if=/dev/cdrom of=somefile and then used cdrecord to slap the image on the destination cd? > As root, I tried to kill the process with kill -9. > It didn't die. It was probably stuck in some kernel function, so he wasn't going to die. > Why did DHCP go away? > Where did stmike come from? You badly crashed some processes in a futile attempt at killing a process that was a) running as root b) accessing low-level driver c) using kernel functions. What do you expect? Davide -- How about some patent on "(a+b)^2 == a^2 + 2ab + b^2"? Choose free software! -- Laurent Szyster |
| |||
| Davide Bianchi wrote: > On 2005-04-14, Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > > As root I gave the command > > readcd dev=ATA:1,0,0 -clone f=somefile > > If you wanted to copy the cd why didn't you do something like > dd if=/dev/cdrom of=somefile and then used cdrecord to slap the image on > the destination cd? Because I had no clue what that would do. The examples in dd's info file leave me more puzzled than informed. I am quite unsure what dd is supposed to do with anything other than a plain file. Also, I don't have a /dev/cdrom. How about dd if=/dev/hdc of=/dev/hdd ? Maybe cp dev/hdc dev/hdd ? I still don't know what flags cdrecord should get after dd if=/dev/hdc of=somefile . The command sequence I was attempting came almost verbatim from the man page for cdrecord. Not only didn't it work, it did a fair amount of damage. > > As root, I tried to kill the process with kill -9. > > It didn't die. > > It was probably stuck in some kernel function, so he wasn't going to die. > > > Why did DHCP go away? > > Where did stmike come from? > > You badly crashed some processes in a futile attempt at killing a process > that was a) running as root b) accessing low-level driver c) using kernel > functions. What do you expect? In the future what should I do about a process that is a) running as root b) accessing a low-level driver c) using kernel functions and d) hung? What does any of that have to do with DHCP? How do I get DHCP back? I had it for a while after my most recent install. Where did stmike come from? |
| |||
| On 2005-04-14, Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > I am quite unsure what dd is supposed to do with anything other than > a plain file. dd is just a souped-up (or down) cp. > Also, I don't have a /dev/cdrom. > How about dd if=/dev/hdc of=/dev/hdd ? Well... most distribution make a symlink called 'cdrom' to make things more easy, if you don't have such link, just use the 'real' device name. It's the same. > I still don't know what flags cdrecord should get after > dd if=/dev/hdc of=somefile . somefile will be a full copy of the CD, filesystem and everything, you can even mount it using mount -o ro,loop somefile /were/you/want/it and browse his content. To write on the CD, use cdrecord dev=... somefile (add speed= option or wathever you like). > almost verbatim from the man page for cdrecord. My man page doesn't report cdcopy at all. > In the future what should I do about a process that is > a) running as root b) accessing a low-level driver > c) using kernel functions and d) hung? I'm afraid that there is nothing you can do but to attempt a clean shutdown of the machine. But a clean shutdown when something is stuck at the kernel level is not always possible, so expect something to go wrong at the next boot. > How do I get DHCP back? Well, if your machine was requesting ip from dhcp, you should have a configuration file in /etc/ that report such option for your network card. If you are using a red-hat derivative (IIRC from your previous post), it should be in /etc/sysconfig/network-scripts and named something like ifcfg-ethX (where X is the number of your network card), in there you find BOOTPROTO=... that should be DHCP. > Where did stmike come from? Check /etc/sysconfig/network, probably when you get the IP from dhcp it also overwrite your hostname. Davide -- I'm an apatheist. The question is no longer interesting, and the answer no longer matters. -- from alt.sysadmin.recovery |
| |||
| Davide Bianchi wrote: > On 2005-04-14, Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > > I am quite unsure what dd is supposed to do with anything other than > > a plain file. > > dd is just a souped-up (or down) cp. So dd doesn't have any device-specific knowledge built in? It just issues reads and writes? The block sizes just affect how much it tries to read and write at a time? > > Also, I don't have a /dev/cdrom. > > How about dd if=/dev/hdc of=/dev/hdd ? Would this actually work? > > I still don't know what flags cdrecord should get after > > dd if=/dev/hdc of=somefile . > > somefile will be a full copy of the CD, filesystem and everything, you > can even mount it using mount -o ro,loop somefile /were/you/want/it and > browse his content. To write on the CD, use cdrecord dev=... somefile > (add speed= option or wathever you like). If I understand this correctly, unless told otherwise, cdrecord takes a file that is a byte-for-byte copy of what is to go on the CD-R. mkisofs's job is to make such a file that corresponds to an ISO file system. If I wanted, I could take any 800MB file and pass it to cdrecord. If my CD-R is big enough, reading that CD-R back would just be a matter of directly reading the correct /dev/* file. > > almost verbatim from the man page for cdrecord. > > My man page doesn't report cdcopy at all. >From man cdrecord: To copy a CD in clone mode, first read the master CD using: readcd dev=b,t,l -clone f=somefile or (in case the CD contains many sectors that are unreadable by inten- tion) by calling: readcd dev=1,0 -clone -nocorr f=somefile will create the files somefile and somefile.toc. Then write the CD using: cdrecord dev=1,0 -raw96r -clone -v somefile > > How do I get DHCP back? > > Well, if your machine was requesting ip from dhcp, you should have a > configuration file in /etc/ that report such option for your network card. > If you are using a red-hat derivative (IIRC from your previous post), > it should be in /etc/sysconfig/network-scripts and named something like > ifcfg-ethX (where X is the number of your network card), in there > you find BOOTPROTO=... that should be DHCP. It is, ifcfg-eth0: DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes TYPE=Ethernet > > > Where did stmike come from? > > Check /etc/sysconfig/network, probably when you get the IP from dhcp it > also overwrite your hostname. /etc/sysconfig/network: NETWORKING=yes HOSTNAME=localhost.localdomain Is the fact that I can get to the internet evidence that DHCP is running? Is a hostname of stmike evidence that it isn't running correctly? I've seen the hostname stmike before, when I'd installed without giving enough information to connect to the internet. Where that name came from was a mystery to me then also. |
| |||
| Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > Davide Bianchi wrote: > > On 2005-04-14, Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> > wrote: > > > I am quite unsure what dd is supposed to do with anything other > than > > > a plain file. > > > > dd is just a souped-up (or down) cp. > > So dd doesn't have any device-specific knowledge built in? None whatsever. > It just issues reads and writes? Exactly. > The block sizes just affect how much > it tries to read and write at a time? That is one the ways in which it has more configurability than plain cp. Yu can decide the blocksize, how much of the input t sip, how much f the output to skip, how much to write, etc. > > > Also, I don't have a /dev/cdrom. > > > How about dd if=/dev/hdc of=/dev/hdd ? > > Would this actually work? Why wouldn't it? It's just a "cp /dev/hdc /dev/hdd". All the data goes from one side to the other. > If I understand this correctly, unless told otherwise, > cdrecord takes a file that is a byte-for-byte > copy of what is to go on the CD-R. Fine, yes. > mkisofs's job is to make such a file > that corresponds to an ISO file system. Yes. You can take an existing cd instead, of course. And you don't have to use an iso9660 file system! > If I wanted, I could take any 800MB file and pass it to cdrecord. > If my CD-R is big enough, reading that CD-R back would just > be a matter of directly reading the correct /dev/* file. Sure. > /etc/sysconfig/network: > NETWORKING=yes > HOSTNAME=localhost.localdomain That's the wrong name. "Localhost" means "me". You can't call yourself "me" as a name. It's confusing! How will other people talk to you? > Is the fact that I can get to the > internet evidence that DHCP is running? No. Dhcp is a server/broadcast client mechanism for configuring things like yur IP address, netmask, hostname, etc. You can et yourself up for internet use without it. > Is a hostname of stmike evidence that it isn't running correctly? ?? No. I would have said it's evidence that something or someone has set you a hostname that at least is more correct than "localhost"! Whether DHCP did it or not you can check by looking in yur logs. Or just checking your dhcp leases. > I've seen the hostname stmike before, when I'd installed without giving > enough information to connect to the internet. > Where that name came from was a mystery to me then also. If it was not you, it was someone else. Peter |
| |||
| On 2005-04-14, Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > It just issues reads and writes? Yes. > The block sizes just affect how much > it tries to read and write at a time? Yes. >> > How about dd if=/dev/hdc of=/dev/hdd ? > Would this actually work? Always done this way, never had a problem. > mkisofs's job is to make such a file > that corresponds to an ISO file system. Exactly. > If I wanted, I could take any 800MB file and pass it to cdrecord. > If my CD-R is big enough, reading that CD-R back would just > be a matter of directly reading the correct /dev/* file. Exactly. >>From man cdrecord: Hummm... my manpage doesn't report that, it does mention readcd in the 'see also' section. > It is, ifcfg-eth0: > DEVICE=eth0 > BOOTPROTO=dhcp then it should get his IP by dhcp. > HOSTNAME=localhost.localdomain > Is the fact that I can get to the > internet evidence that DHCP is running? Probably yes. > Is a hostname of stmike evidence that it isn't running correctly? Don't know your system enough to tell. Davide -- If at first you don't succeed, get a job with Microsoft. -- Gareth Barnard |
| |||
| Peter T. Breuer wrote: > Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > > So dd doesn't have any device-specific knowledge built in? > > > > Also, I don't have a /dev/cdrom. > > > > How about dd if=/dev/hdc of=/dev/hdd ? > > > > Would this actually work? > > Why wouldn't it? It's just a "cp /dev/hdc /dev/hdd". All the data goes > from one side to the other. Reasonable, but not obvious. For all I knew bad things might happen if cp or dd issued 3k reads and writes. > > /etc/sysconfig/network: > > NETWORKING=yes > > HOSTNAME=localhost.localdomain > > That's the wrong name. "Localhost" means "me". You can't call yourself > "me" as a name. It's confusing! How will other people talk to you? I know its wrong. Others can ping me with my IP address, but ssh doesn't seem to work. Eventually I got a Secure connection to 24.116.184.201 refused. |
| |||
| "Michael Hennebry" <hennebry@web.cs.ndsu.nodak.edu> wrote in message news:1113518565.885758.74440@g14g2000cwa.googlegro ups.com... > Peter T. Breuer wrote: >> Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > >> > So dd doesn't have any device-specific knowledge built in? > >> > > > Also, I don't have a /dev/cdrom. >> > > > How about dd if=/dev/hdc of=/dev/hdd ? >> > >> > Would this actually work? >> >> Why wouldn't it? It's just a "cp /dev/hdc /dev/hdd". All the data > goes >> from one side to the other. > > Reasonable, but not obvious. > For all I knew bad things might happen if cp or dd > issued 3k reads and writes. "cp -a" would copy the block device, not the contents of it. |
| ||||
| Davide Bianchi wrote: > On 2005-04-14, Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> wrote: > > It is, ifcfg-eth0: > > DEVICE=eth0 > > BOOTPROTO=dhcp > > then it should get his IP by dhcp. I can't find a dhcp executable anywhere. There are dhclient, dhcp6c, and dhclient-script. dhclient is the only one running. According to ps its WCHAN is -. Is that the way it is supposed to be? > > HOSTNAME=localhost.localdomain > > Is the fact that I can get to the > > internet evidence that DHCP is running? > > Probably yes. > > > Is a hostname of stmike evidence that it isn't running correctly? > > Don't know your system enough to tell. I finally found another reference to stmike. It's listed in dhclient-eth0.leases. There are two leases. Each has the line option host-name "stmike"; |