Google Answers Logo
View Question
 
Q: /dev/mem Not Found By XFree86 Under Mandrake Linux 9.1 ( Answered 5 out of 5 stars,   1 Comment )
Question  
Subject: /dev/mem Not Found By XFree86 Under Mandrake Linux 9.1
Category: Computers > Operating Systems
Asked by: kingofblash-ga
List Price: $2.00
Posted: 28 Aug 2003 12:18 PDT
Expires: 27 Sep 2003 12:18 PDT
Question ID: 249823
I am running Mandrake Linux 9.1 (EN) with all the current patches.  It
crashed, and when I rebooted and it had fscked the drives dm -- the
display manager -- wouldn't load.  So I logged in under a tty and
typed startx as an underprivileged user and root, and I got told
XFree86 couldn't access /dev/mem and was exiting.  When I ls /dev/me*
/dev/mem didn't exist.  What happened and how do I fix it?

Request for Question Clarification by denco-ga on 28 Aug 2003 13:32 PDT
Howdy kingofblash,

Have you tried to manually (re)create /dev/mem on your system?

Thanks!  denco-ga

Clarification of Question by kingofblash-ga on 28 Aug 2003 17:19 PDT
When I googled for /dev/mem all I found was a bunch of kernel mailing
list archives telling me not to use nmap() (or was it mmap()?).  I
can't figure out how to rebuild /dev/mem.

I will tell you some interesting things though:

1.  Mandrake ships with 4 kernels I can choose through LILO -- The
most secure (default), down to least secure, and one failsafe kernel. 
I can run a kernel other then the secure version and get a /dev/mem
and a working dm and XFree86.  It also can be found and works when I
try using Knoppix, so I know it's not a hardware problem.

2.  About 2 days ago I had to restore my entire system from backup. 
(OpenBSD ate my partition table -- so much for trying it).  Although I
wasn't able to recover the /. partition I could get the /home
partition back, and just remounted it as /home.  Could this cause some
problems?

3.  After the restore (see question 2), my menus disappeared. 
Clicking the button in KDE or Gnome only brings up the options:

   a. shut down
   b. log off
   c. run commands
   d. quick browser
   e. bookmarks
   f. windoze applications (from a leftover version of Crossover
office).

/sbin/menudrake doesn't correct the problems.  (#3 does not appear
when run as root -- which I assume is because something in the menu is
overriding teh defaults, perhaps in a ~/.kde or ~/.gnome or something)

Does that help?

Request for Question Clarification by denco-ga on 28 Aug 2003 19:56 PDT
Howdy kingofblash,

You can try the following and see where that gets you.

cd /dev && mknod mem c 1 1

I suspect some of your problems might stem from the unrecovered
/ partition, perhaps some settings that are not being recreated,
but that's only a guess at this point.

Looking Forward, denco-ga

Clarification of Question by kingofblash-ga on 03 Sep 2003 11:13 PDT
I tried the mknod command and it worked like a charm.  Now how do I
close out this question and pay you?  And can you explain why this
would work?  i.e. what is /dev/mem?

Thanks,

Dan Anderson
Answer  
Subject: Re: /dev/mem Not Found By XFree86 Under Mandrake Linux 9.1
Answered By: denco-ga on 03 Sep 2003 13:56 PDT
Rated:5 out of 5 stars
 
Howdy Dan,

Greatly appreciate all of your patience with the process that we went
through.  Other than you rating my following answer, my answering the
question with this post will "close" the question.  Glad to have been
of assistance!

This Yahoo Groups "smalllinux" posting outlines the command needed
to recreate /dev/mem for you.
http://groups.yahoo.com/group/smalllinux/message/501

cd /dev && mknod mem c 1 1

This Humboldt University of Berlin, Department of Mathematics web
page explains what /dev/mem is all about.
http://cantelli.mathematik.hu-berlin.de/doc_link/en_US/a_doc_lib/files/aixfiles/mem.htm

"The mem special file has traditionally provided direct access to
physical memory."

To translate, essentially, /dev/mem is a "file" (well, actually a
device) that is a mapping of physical memory.

Even though it was intended to be used for diagnostic purposes,
some routines use it to check system status, etc. and without it
those routines crash, hence your problems.

If you need any clarification, feel free to ask.


Search Strategy

Too many years of Linux experience, along with some Google searches
so as to get the mknod command correct, etc.

Google search on phrase: "dev/mem"
://www.google.com/search?q=%22%2Fdev%2Fmem%22

Google search on phrase/keywords: mknod "/dev/mem"
://www.google.com/search?q=mknod+%22%2Fdev%2Fmem%22

Looking Forward, denco-ga
kingofblash-ga rated this answer:5 out of 5 stars and gave an additional tip of: $2.00
Excellent answer to the question.  The researcher spent some time in
the comments going over it with me and finally provided an excellent
answer when everything worked.

Comments  
Subject: Re: /dev/mem Not Found By XFree86 Under Mandrake Linux 9.1
From: denco-ga on 03 Sep 2003 20:02 PDT
 
Much thanks for the 5 star rating, kind comments and the tip, Dan.

Glad that it worked out!  denco-ga

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy