LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-29-2009, 09:30 AM   #1
dadrunamok
Member
 
Registered: Dec 2009
Location: Maryland, USA
Distribution: Ubuntu 11.04, that alternative OS from Washington State
Posts: 31

Rep: Reputation: 16
LFS 7.11 udevadm test Unable to open device /sys/block/hd


My LFS system is nearly complete, but I have run into an unexpected result in chapter 7.10 (creating custom symlinks to devices). My build system runs Ubuntu 9.04. Although it is a 64-bit machine, I have opted to build only a 32-bit OS since I have not had good results using 64-bit distros.

I have gotten all the way through to chapter 7.10 without receiving any unexpected errors in building the system. However, when I issued the command "udevadm test /sys/block/hd", I received the following return:
Code:
root:/sys/block# udevadm test /sys/block/hdd
run_command: calling: test
udevadm_test: version 145
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

parse_file: reading '/lib/udev/rules.d/40-isdn.rules' as rules file
parse_file: reading '/lib/udev/rules.d/40-pilot-links.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-firmware.rules' as rules file
parse_file: reading '/lib/udev/rules.d/50-udev-default.rules' as rules file
parse_file: reading '/etc/udev/rules.d/55-lfs.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-alsa.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-input.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-serial.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-storage.rules' as rules file
parse_file: reading '/lib/udev/rules.d/60-persistent-v4l.rules' as rules file
parse_file: reading '/etc/udev/rules.d/61-cdrom.rules' as rules file
parse_file: reading '/lib/udev/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-device-mapper.rules' as rules file
parse_file: reading '/lib/udev/rules.d/64-md-raid.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-cd-aliases-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/75-persistent-net-generator.rules' as rules file
parse_file: reading '/lib/udev/rules.d/79-fstab_import.rules' as rules file
parse_file: reading '/lib/udev/rules.d/80-drivers.rules' as rules file
parse_file: reading '/lib/udev/rules.d/95-udev-late.rules' as rules file
udev_rules_new: rules use 13044 bytes tokens (1087 * 12 bytes), 7931 bytes buffer
udev_rules_new: temporary index used 8560 bytes (428 * 20 bytes)
unable to open device '/sys/block/hdd'
I ran this from the chroot environment, entered per the instructions at the top of page 6.61. All of the virtual kernel filesystems specified in 6.2.2 and 6.2.3 are mounted as directed, although /dev/shm is empty.

I did a bit more digging around in the chroot environment and determined that the /sys/block folder does not contain anything called 'hdd'. Here is the content of /sys/block:
Code:
root:/# cd /sys/block 
root:/sys/block# ls
root:/sys/block# ls -al
total 0
drwxr-xr-x  2 root root 0 Dec 28 16:32 .
drwxr-xr-x 12 root root 0 Dec 26 19:39 ..
lrwxrwxrwx  1 root root 0 Dec 29 10:19 fd0 -> ../devices/platform/floppy.0/block/fd0
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop0 -> ../devices/virtual/block/loop0
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop1 -> ../devices/virtual/block/loop1
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop2 -> ../devices/virtual/block/loop2
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop3 -> ../devices/virtual/block/loop3
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop4 -> ../devices/virtual/block/loop4
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop5 -> ../devices/virtual/block/loop5
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop6 -> ../devices/virtual/block/loop6
lrwxrwxrwx  1 root root 0 Dec 29 10:19 loop7 -> ../devices/virtual/block/loop7
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram0 -> ../devices/virtual/block/ram0
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram1 -> ../devices/virtual/block/ram1
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram10 -> ../devices/virtual/block/ram10
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram11 -> ../devices/virtual/block/ram11
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram12 -> ../devices/virtual/block/ram12
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram13 -> ../devices/virtual/block/ram13
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram14 -> ../devices/virtual/block/ram14
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram15 -> ../devices/virtual/block/ram15
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram2 -> ../devices/virtual/block/ram2
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram3 -> ../devices/virtual/block/ram3
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram4 -> ../devices/virtual/block/ram4
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram5 -> ../devices/virtual/block/ram5
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram6 -> ../devices/virtual/block/ram6
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram7 -> ../devices/virtual/block/ram7
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram8 -> ../devices/virtual/block/ram8
lrwxrwxrwx  1 root root 0 Dec 29 10:19 ram9 -> ../devices/virtual/block/ram9
lrwxrwxrwx  1 root root 0 Dec 29 10:19 sda -> ../devices/pci0000:00/0000:00:08.0/host2/target2:0:0/2:0:0:0/block/sda
lrwxrwxrwx  1 root root 0 Dec 29 10:19 sdb -> ../devices/pci0000:00/0000:00:08.0/host3/target3:0:0/3:0:0:0/block/sdb
lrwxrwxrwx  1 root root 0 Dec 29 10:19 sdc -> ../devices/pci0000:00/0000:00:06.0/host4/target4:0:0/4:0:0:0/block/sdc
lrwxrwxrwx  1 root root 0 Dec 29 10:19 sr0 -> ../devices/pci0000:00/0000:00:06.0/host5/target5:0:1/5:0:1:0/block/sr0
Did I miss something and therefore fail to get the 'hdd' item created? If so, where was it so that I can go back and fix it?

note: Please forgive me if I have included way too much information; in my regular line of work I find that I generally don't get near enough to solve people's problems and I tend to err in the opposite direction when I am looking for a solution.
 
Old 01-03-2010, 07:53 AM   #2
dadrunamok
Member
 
Registered: Dec 2009
Location: Maryland, USA
Distribution: Ubuntu 11.04, that alternative OS from Washington State
Posts: 31

Original Poster
Rep: Reputation: 16
Gotta give it a bump. I'm still looking for an answer on this one.

Any bright ideas?
 
Old 01-17-2010, 07:31 PM   #3
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,485

Rep: Reputation: 66
The reason they tell you to do this in the book is so you can locate the cdrom on the system and create a custom symlink to it. They assume that you have a IDE cdrom as most of them currently are but that is changing. More and more cdrom drives are acutally sata drives now and there identifier in the /sys/block is slightly diffrent. By the way this step is only optional.


From looking at your above ouput I would say that
Code:
lrwxrwxrwx  1 root root 0 Dec 29 10:19 sr0 -> ../devices/pci0000:00/0000:00:06.0/host5/target5:0:1/5:0:1:0/block/sr0
is the cdrom device

Last edited by exvor; 01-17-2010 at 07:40 PM.
 
  


Reply

Tags
chapter, lfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Unable to mount CDROM in Suse Linux (Able to open the CD in windows in another sys) AmeenaB Linux - Newbie 1 05-16-2009 11:34 AM
LFS 6.3 Kernel panic - not syncing:VFS: Unable to mount root fs on unknown-block(2,0) wyylling Linux From Scratch 4 09-24-2008 03:15 PM
LVM and sys/block cantabile Linux - General 0 08-27-2005 10:47 AM
gmplayer - Unable to open vo device Jose Muņiz Linux - Software 0 07-20-2003 12:14 PM
Volume control is unable to run correctly. Unable to open audio device '/dev/mixer'. sevenreams Slackware 1 05-16-2003 07:29 PM


All times are GMT -5. The time now is 03:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration