[ag-automation] Antwort: Re: Antwort: Re: Antwort: Re: Booting fails with 2.6.21.6-rt21

M.Voss at wzl.rwth-aachen.de M.Voss at wzl.rwth-aachen.de
Thu Nov 22 17:10:09 CET 2007


Juergen Beisert <jbe at pengutronix.de> schrieb am 22.11.2007 16:20:13:

> This could looke like this:
> 
> KERNEL=="sd[a-z]2", SYSFS{idProduct}=="frieselfrasel", 
> SYMLINK+="disk/by-id/scsi_SATA_Maxtor_33073H3_L3HC4GBC-part2"
> 
> "frieselfrasel" should identify your harddisk (you can check it 
> with "udevinfo -a -p /sys/block/<your harddisk entry>", something unique 
here 
> should identify your HD). Note: There are several ways to identify a 
device. 
> So the SYSFS{} is only an example.
> 
> Such a rule should be valid on your running system and in your initrd. 
If it 
> is not in your initrd, this SYMLINK will be never occur. You will get 
your 
> timeout...
> 
> BTW: The rule above *must* be the first one udev will find, when a 
sd[a-z]2 
> occur in the system! The first match wins!

In the /etc/udev directory I've found the following rule 
(60-persistent-storage.rules):

"# do not edit this file, it will be overwritten on update

# persistent storage links: 
/dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}
# scheme based on "Linux persistent device names", 2004, Hannes Reinecke 
<hare at suse.de>

ACTION!="add", GOTO="persistent_storage_end"

KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", IMPORT{program}="scsi_id --export 
--whitelisted --fallback-to-sysfs -s %p -d $tempnode", 
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"

# type 8 devices are "Medium Changers"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", 
IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p 
-d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"

SUBSYSTEM!="block", GOTO="persistent_storage_end"

# skip rules for inappropriate block devices
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", 
GOTO="persistent_storage_end"

# never access non-cdrom removable ide devices, the drivers are causing 
event loops on open()
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", 
GOTO="persistent_storage_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"

# ignore partitions that span the entire disk
ATTR{whole_disk}=="*", GOTO="persistent_storage_end"

# /sys/class/block will export this
ENV{DEVTYPE}!="?*", ATTR{range}=="?*", ENV{DEVTYPE}="disk"
ENV{DEVTYPE}!="?*", ATTR{start}=="?*", ENV{DEVTYPE}="partition"

# for partitions import parent information
ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"

# by-id (hardware serial number)
KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", 
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", 
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"

KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", 
ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", IMPORT{program}="usb_id 
--export %p"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}!="?*", 
IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p 
-d $tempnode"
KERNEL=="cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}!="?*", 
IMPORT{program}="scsi_id --export --whitelisted --ignore-sysfs -s %p -d 
$tempnode", ENV{ID_BUS}="cciss"
KERNEL=="sd*[!0-9]|sr*|cciss?c[0-9]d[0-9]", ENV{ID_SERIAL}=="?*", 
SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]|cciss*p[0-9]", ENV{ID_SERIAL}=="?*", 
SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
KERNEL=="st*", ENV{ID_SERIAL}=="?*", 
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"

# libata compat (links like hd*)
KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id 
$tempnode", RESULT=="?*", ENV{ID_ATA_COMPAT}="$result", 
SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", 
SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"

KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ATTRS{name}=="?*", 
ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", 
ENV{ID_SERIAL}="$attr{serial}", 
SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
KERNEL=="mmcblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", 
SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"

[...]"


Within the initrd there are some scripts like "03_storage.sh" and 
"04_udev.sh" that are executed which I guess will execute these rules.

During boot-up of the rt-patched kernel before it hangs I get the 
following messages on screen:

"[...]

SCSI 0:0:0:0: Direct-Acess ATA Maxtor 33073H3 YAH8 PQ: 0 ANSI: 5
[...]
Creating device nodes with udev
[...]"

And then after trying to get sda1 it fails....




--------------------------------------------------------------------- 
Dipl.-Inform. Markus Voss

Werkzeugmaschinenlabor - RWTH Aachen 
Lehrstuhl fuer Werkzeugmaschinen 
Steinbachstr. 53 B
D-52074 Aachen 

Tel:  ++49 241 80 28235
Fax: ++49 241 80 22293 

M.Voss at wzl.rwth-aachen.de
http://www.wzl.rwth-aachen.de 
-------------------------------------------------------------------- 


More information about the ag-automation mailing list