You know, there was an easier way....

At the LILO prompt, type "1" or "init=/bin/sh" at the end of your image
name.  That will get you to a root prompt.

Then cd into /dev.

The program "mknod" creates device files.  /dev/null is no exception; it
can be recreated.  mknod --help reveals the syntax:

mknod <filename> <type> <major> <minor>

/dev/null is a character device.  After looking at the file on my
system (via ls -l), I find the "major" number of device /dev/null is 1;
the minor is 3.  So:

mknod /dev/null c 1 3

Now change permissions as you like (I recommend chmod 666, chown
root.mem), and you're back in business.  Restart, and continue as normal.

Again, it's nice to know that there are few problems that are unsolvable
in this system.  All it takes is knowledge, not a reinstall (Unlike that
other OS...).

You could have also just used "cp -a" to copy the /dev/null from the
ramdisk into your filesystem's /dev.  The "-a" (or "archive) switch makes
sure it saves file information, like devices, when copying.

-- Asheesh.

On Fri, 28 Sep 2001, Franki wrote:

> I did it...
>
> can't believe it,, I got the barstard working again.. (scuse language)
>
> Here is what I did,
>
> I booted rescue and deleted every directory in the ram disk....that I
> could..
>
> /usr /etc /var /dev /usr and /tmp (think that was it...) it probably wasn't
> necessary to do all of them, but I figured what the hell,,   I was being
> fastidious... :-)
>
> then I mounted all the partitions on the hard drive into those places
> respectively
>
> so that essentially, the hard disk partitions listed above had replaced
> those on the ramdisk..
>
> Then I deleted /dev/null and reinstalled (forced and nodeps) the dev rpm,
> (had to do etc because the ramdisk /etc didn't have a user mem and wouldn't
> let me create one.. using my old passwd file in my old /etc worked...)
>
> Thanks for the URL below, I checked to make sure that the rpm installed
> /dev/null as owner root:mem
>
> then I rebooted.. and the damn thing worked.. I swear I thought this install
> was toast... I was so surprised when aurora came up,, (up till now, it got
> to the interactive boot prompt and errored out..)
>
> This just blows me away, I had no idea I could get this working, just trying
> because I am an obstinate mongrel...
>
> how cool is that?? I know it sounds daft to be excited over the prospect of
> fixing an install that I was going to wipe in a week or two when my 8.1
> powerpack arrives ,, but still its cool to know that there are not too many
> screwups that can't be rectified if you know where to start... and I learned
> important lessons from this experiance too...
>
> even better, now that I got the /var partition corrected with reiserfsck
> postfix uninstalled without the system crashes and all the relivent
> files/dirs were removed... and I just reinstalled it without problem as
> well... (and its running again)
>
> This is soooooooooooooo cool, I feel like a hacker  :-)
>
>
> rgds
>
> Frank
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Joseph Baker
> Sent: Friday, 28 September 2001 10:41 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [expert] Now I screwed up..
>
>
> Searching google.com/linux  for  /dev/null and mknod
> I found this sight.
>
> http://www.linux.com/develop/man/4/null/
>
> which contains...
>
> NAME
> null, zero - data sink
> DESCRIPTION
> Data written on a null or zero special file is discarded.
>
> Reads from the null special file always return end of file, whereas
> reads from zero always return \0 characters.
>
> null and zero are typically created by:
>
>     mknod -m 666 /dev/null c 1 3
>     mknod -m 666 /dev/zero c 1 5
>     chown root:mem /dev/null /dev/zero
>
>
> NOTES
> If these devices are not writable and readable for all users, many
> programs will act strange.
> FILES
> /dev/null
> /dev/zero
> SEE ALSO
> mknod(1), chown(1)
>
>
>
> --- Franki <[EMAIL PROTECTED]> wrote:
> > well, as an update, I used the cd to boot rescue..
> >
> > then I did reiserfsck to check all partitions,,,
> >
> > then I went in and deleted /dev/null off the drive..
> > (because of my copying it was now /bounce from the postfix dir (see
> > earlier
> > email)
> >
> > Then I tried booting again in the hope that linux would replace it..
> > it
> > didn't
> >
> > then I booted again rescue and copied /dev/null from the rescue disk
> > to the
> > hard drive /dev folder... restared and tried again..
> >
> > no good, same messages..
> >
> > So now my question is this./...
> >
> > I though I might try to "upgrade" something on the hard disk in the
> > hope
> > that mdk would over write the problems and fix my little issue..
> >
> > I can't fingure out how to get 7.2 to do an upgrade, if I boot it and
> > press
> > enter (as it says for install and upgrade) it doesn't give me any
> > upgrade
> > options at all... so I am alittle lost here...
> >
> > any suggestions at all??
> >
> >
> > rgds
> >
> > Frank
> >   -----Original Message-----
> >   From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Franki
> >   Sent: Friday, 28 September 2001 5:16 PM
> >   To: [EMAIL PROTECTED]
> >   Subject: [expert] Now I screwed up..
> >
> >
> >   Hi again,,
> >
> >   Thought I was smart today, so I tried to copy /var/spool/postfix to
> > dev/null
> >
> >   now when I boot, I get this message...
> >
> >   Mounting proc filesystem dup2: Bad file descriptor        [FAILED]
> >   Setting default font dup2: Bad file descriptor
> > [FAILED]
> >
> >   /etc/rc.sysinit: /dev/null: is a directory
> >
> >   have I just hosed my install???
> >
> >   somehow I have set /dev/null to be a directory by copying
> > /var/spool/postfix to it...
> >
> >   how can that be fixed?? anyone know??
> >
> >
> >   many thanks
> >
> >
> >   rgds
> >
> >   Frank
> >
>
>
> =====
> Joseph Baker
> President, Digital Communications Research, Inc.
> [EMAIL PROTECTED]
> 414-788-8284 Cell
> 414-427-6140 Office
> 414-325-1440 Home
>
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com
>
>
>
>

-- 
Sometimes when I get up in the morning, I feel very peculiar.  I feel
like I've just got to bite a cat!  I feel like if I don't bite a cat
before sundown, I'll go crazy!  But then I just take a deep breath and
forget about it.  That's what is known as real maturity.
                -- Snoopy


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to