Bug 586550 - /dev/live points to incorrect device
Summary: /dev/live points to incorrect device
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: livecd-tools   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Keywords:
Depends On: 584185
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-27 20:40 UTC by Joey Boggs
Modified: 2010-11-11 14:50 UTC (History)
7 users (show)

Fixed In Version: livecd-tools-031-2.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 14:50:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (1.09 KB, patch)
2010-06-08 18:31 UTC, Alan Pevec
no flags Details | Diff

Description Joey Boggs 2010-04-27 20:40:44 UTC
/dev/live should point to /dev/loop0 or /dev/sr0 or similar device depending on boot media. It currently points to /dev/dm-1  (live-osimg-min) Which contains contents of the live root rather than the contents of the iso image where the kernel and initrd are located.

Comment 3 RHEL Product and Program Management 2010-04-28 09:35:35 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 7 Alan Pevec 2010-05-28 11:27:06 UTC
Here is the problem: modules.d/90dmsquash-live/parse-dmsquash-live.sh
    live:CDLABEL=*|CDLABEL=*)
        root="${root#live:}"
        root="$(echo $root | sed 's,/,\\x2f,g')"
        root="live:/dev/disk/by-label/${root#CDLABEL=}"

So we need to fix livecd-tools to produce different labels for ISO vs rootfs image, otherwise /dev/live points to whatever gets by-label symlink !
I'm also not sure yet how does this effect dmsquash-live setup, since root is resolved directly to /dev/mapper/live-osimg-min which supposed to be used only for Anaconda's liveinst.

David, would that break livecd i.e. is there assumption anywhere that ISO label=e2label for LiveCDs ?

Harald, this is FYI, since you last touched this dracut script:
http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=commit;h=1cf0b1750be8fc65939f746793219cdd40f72c13
And also question for you as udev maintainer: how are conflicts under /dev/disk/by-label/ resolved (i.e. multiple filesystems with the same label, like we have in livecd case) ?

Comment 8 Harald Hoyer 2010-05-28 11:34:44 UTC
(In reply to comment #7)
> And also question for you as udev maintainer: how are conflicts under
> /dev/disk/by-label/ resolved (i.e. multiple filesystems with the same label,
> like we have in livecd case) ?    

first one recognized wins. if it goes away, the first of the rest takes the symlink

Comment 9 Harald Hoyer 2010-05-28 11:35:17 UTC
(In reply to comment #7)
> Here is the problem: modules.d/90dmsquash-live/parse-dmsquash-live.sh
>     live:CDLABEL=*|CDLABEL=*)
>         root="${root#live:}"
>         root="$(echo $root | sed 's,/,\\x2f,g')"
>         root="live:/dev/disk/by-label/${root#CDLABEL=}"
> 
> So we need to fix livecd-tools to produce different labels for ISO vs rootfs
> image, otherwise /dev/live points to whatever gets by-label symlink !
> I'm also not sure yet how does this effect dmsquash-live setup, since root is
> resolved directly to /dev/mapper/live-osimg-min which supposed to be used only
> for Anaconda's liveinst.
> 
> David, would that break livecd i.e. is there assumption anywhere that ISO
> label=e2label for LiveCDs ?

should be easy to fix!

Comment 10 Alan Pevec 2010-05-31 13:14:59 UTC
Upstream patch http://lists.fedoraproject.org/pipermail/livecd/2010-May/005857.html

Comment 11 Alan Pevec 2010-06-08 18:31:45 UTC
Created attachment 422312 [details]
Proposed patch

Comment 12 Vladimir Benes 2010-06-30 12:54:55 UTC
just wondering why I haven't got /dev/live present in my liveCD root..

root -> /dev/mapper/live-rw
scd0 -> sr0
cdrom -> sr0 

what exactly should be checked to verify this?

Comment 13 Harald Hoyer 2010-06-30 13:09:50 UTC
(In reply to comment #12)
> just wondering why I haven't got /dev/live present in my liveCD root..
> 
> root -> /dev/mapper/live-rw
> scd0 -> sr0
> cdrom -> sr0 
> 
> what exactly should be checked to verify this?    

/dev/live missing bug: bug 605356

Comment 14 Dennis Gregorovic 2010-08-18 16:28:06 UTC
livecd-tools is not a part of RHEL 6, but I'm moving this bug to ON_QA since there is a build available for those who are interested.

Comment 15 Vladimir Benes 2010-08-31 11:55:58 UTC
at my box /dev/live points to sr0
-> VERIFIED

Comment 16 releng-rhel@redhat.com 2010-11-11 14:50:57 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.