LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.11 udevadm test Unable to open device /sys/block/hd (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-11-udevadm-test-unable-to-open-device-sys-block-hd-778696/)

dadrunamok 12-29-2009 09:30 AM

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.

dadrunamok 01-03-2010 07:53 AM

Gotta give it a bump. I'm still looking for an answer on this one.

Any bright ideas?

exvor 01-17-2010 07:31 PM

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


All times are GMT -5. The time now is 08:17 PM.