From e7c0c929ede4ce9762b9aae99f75748af6fc82ed Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Jul 2010 21:15:54 +0000 Subject: [PATCH] * Work around a bug in QEMU, which doesn't implement the "READ DISC INFORMATION" SCSI command: https://bugzilla.redhat.com/show_bug.cgi?id=609049 As a result, `cdrom_id' doesn't print ID_CDROM_MEDIA_TRACK_COUNT_DATA, which in turn prevents the /dev/disk/by-label symlinks from being created. We need these in the NixOS installation CD, so use ID_CDROM_MEDIA in the corresponding udev rules for now. This was the behaviour in udev <= 154. See also http://www.spinics.net/lists/hotplug/msg03935.html svn path=/nixos/trunk/; revision=22691 --- modules/system/boot/stage-1.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index ab94c157874..eb823a88757 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -249,7 +249,20 @@ let # Such a link can get obsolete in a running system, but # during boot stage 1 it is unlikely. We need this change # to be able to boot on a wider choice of CD drives. - sed -e '/^ENV[{]DEVTYPE[}]=="disk", .*GOTO/d' -i $out/60-persistent-storage.rules + sed -e '/^ENV[{]DEVTYPE[}]=="disk", .*GOTO/d' -i $out/60-persistent-storage.rules + + # Work around a bug in QEMU, which doesn't implement the "READ + # DISC INFORMATION" SCSI command: + # https://bugzilla.redhat.com/show_bug.cgi?id=609049 + # As a result, `cdrom_id' doesn't print + # ID_CDROM_MEDIA_TRACK_COUNT_DATA, which in turn prevents the + # /dev/disk/by-label symlinks from being created. We need these + # in the NixOS installation CD, so use ID_CDROM_MEDIA in the + # corresponding udev rules for now. This was the behaviour in + # udev <= 154. See also + # http://www.spinics.net/lists/hotplug/msg03935.html + substituteInPlace $out/60-persistent-storage.rules \ + --replace ID_CDROM_MEDIA_TRACK_COUNT_DATA ID_CDROM_MEDIA ''; # */ };