LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-23-2003, 10:38 PM   #1
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Rep: Reputation: 30
Chp6: Creating devices (Makedev-1.7)


So everything has worked fine up until now.

I ran "./MAKEDEV -v generic-nopty" as directed from wthin the /dev folder, chrooted into the LFS environment, and the following happened:

PHP Code:
root:/dev# ./MAKEDEV -v generic-nopty
./MAKEDEVline 1: /dev/nullPermission denied
NOTICE
Resolving user/group names manually using /etc/group and /etc/passwd
./MAKEDEVline 1: /dev/nullPermission denied
NOTICE
Resolving user/group names manually using /etc/group and /etc/passwd
create mem     c 1 1 root
:kmem 0640
create kmem     c 1 2 root
:kmem 0640
create null     c 1 3 root
:root 0666
create port     c 1 4 root
:kmem 0640
create zero     c 1 5 root
:root 0666

// continues on like this, casually erroring about [b]/dev/null[/b] 
At first, I paid no mind to the errors. I continued onto the Linux headers installation with "mrproper" and such, until I executed "make include/linux/version.h" and was confronted by the following:

PHP Code:
root:/sources/linux-2.4.22# make include/linux/version.h
/bin/shline 1: /dev/nullPermission denied
/bin/shline 1: /dev/nullPermission denied
KERNELRELEASE 
"2.4.22" exceeds 64 characters
make
: *** [include/linux/version.hError 1 
I consulted google for an answer, and one came up. It was a message board, one of the posters suggested to the thread starter:

Quote:
Lets give /dev/null a test...

create a simple little file that contains anything, say "hello" somewhere. Then type this:

mv /path/to/little/file /dev/null
Well, I did just that. Soon I realize what had happened, the null device was simply replaced by the 'test' file I created. I confirmed this by doing 'cat /dev/null', it printed out the contents of the file.

So, fearing an error, I opened a terminal into my host environment. As a normal user, I executed "cat "test" >> /dev/null; echo "$?". In my host terminal, I got "0", meaning it was a success, whereas in the LFS chrooted terminal, I got:

PHP Code:
root:/sources/linux-2.4.22# cat "test" >> /dev/null;echo "$?"
bash: /dev/nullPermission denied

So, what, may I ask, did I do wrong? Anyone know of how to fix this?

Last edited by fr0zen; 11-23-2003 at 10:57 PM.
 
Old 11-23-2003, 11:16 PM   #2
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Original Poster
Rep: Reputation: 30
Well, as happy as I am that I solved the problem, I feel somewhat deprived of the 8 minutes it took me to compose the above message.

Anywho, I simply looked a bit further (actually right in this forum). All I needed to do was add "dev" to my fstab for the mount. Then, I remounted, voila. For archiving's sake:

/dev/hda5 /mnt/lfs ext2 defaults,users,exec,dev,rw 1 2
 
Old 01-22-2004, 12:35 AM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Cool, the BEST feature of this forum is the search button.
I ran into same problem..........
Quote:
root:/sources/linux-2.4.22# make include/linux/version.h
/bin/sh: line 1: /dev/null: Permission denied
/bin/sh: line 1: /dev/null: Permission denied
KERNELRELEASE "2.4.22" exceeds 64 characters
make: *** [include/linux/version.h] Error 1
and solved it the same way........adding "dev" to the fstab line where lfs is mounted............
a little search goes a long way.......thx fr0zen


<edit/> -------heh, here is something else I found out........for those who read this after the fact...you need to make sure that "dev" is at the END of the fstab line, it has to go after EXEC!!
or you will continue to get the same error message!! just do it as you see above in fr0zen's post........

Last edited by 320mb; 01-31-2004 at 09:02 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using MAKEDEV with UDEV sausagejohnson Fedora 0 04-26-2005 07:13 PM
creating new devices chilehead Linux - Newbie 4 08-29-2004 09:56 PM
MAKEDEV not found cadj *BSD 4 08-28-2004 09:19 PM
MAKEDEV error rahul_jain_9684 Linux From Scratch 3 09-20-2003 06:13 PM
makedev watashiwaotaku7 Linux - Software 6 12-30-2002 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration