Return-Path: Received: from mail-yw0-f196.google.com (mail-yw0-f196.google.com [209.85.161.196]) by mail.openembedded.org (Postfix) with ESMTP id 5C4A2784CA for ; Sat, 29 Jul 2017 00:13:16 +0000 (UTC) Received: by mail-yw0-f196.google.com with SMTP id s143so7289979ywg.4 for ; Fri, 28 Jul 2017 17:13:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wAJJrKB341TxNosayL0FIbilDL/phSZf5iAuZV6VIU4=; b=m/0bf3LMsC1Zxr1z5xt2F6ouTRop1w/yKc8DoTbk8y5iP3h9P/xwdUyne24nwuGSdm lsX5hpwn0lO+e9KJwE3FxPH7lq7JX2nv8OsPMFmWKmC3ui5e1IMF8Ek0vSjl0bd31Nq8 oynu2fpAQ4khcOHH9MYlAszM4gdH2QmNYNpDMclTlWiVdVB01I/8MtLDDFt/OOMs58pM pBIVSH6AKOpKO6pijnvPigd80oFw0PHmsVtByHLuu/M6IpASOkbp8nfWy2iL8auX8DHM rah9lx5dIwFXT3QVm71u6zqy3OUEgphdPfpRC7g0+cbr6+JyvudSqb+9sXZgYZpHuhta DQjw== X-Gm-Message-State: AIVw112YK3vlxYERg/BB8c7/oETVaIuIfkqURerSPOXH3d2+SfvshltO A73WBK7krLSuMsAY X-Received: by 10.37.210.12 with SMTP id j12mr8873093ybg.343.1501287198053; Fri, 28 Jul 2017 17:13:18 -0700 (PDT) Received: from localhost.localdomain (cpe-174-106-0-58.ec.res.rr.com. [174.106.0.58]) by smtp.gmail.com with ESMTPSA id l7sm8368499ywl.92.2017.07.28.17.13.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Jul 2017 17:13:17 -0700 (PDT) From: Tom Rini To: openembedded-core@lists.openembedded.org Date: Fri, 28 Jul 2017 20:14:33 -0400 Message-Id: <1501287276-28699-2-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501287276-28699-1-git-send-email-trini@konsulko.com> References: <1501287276-28699-1-git-send-email-trini@konsulko.com> Subject: [PATCHv4 2/5] wic: Switch to using --use-uuid by default X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 00:13:17 -0000 The most portable way to specifiy a root device in a disk image that we create is to use PARTUUID rather than /dev/sda2. As background, both GPT and MBR tables provide valid UUID values for each partition and the Linux Kernel contains the logic to parse this value. With this change we can now boot the default disk images when used as any valid block device that the included kernel uses. This for example means that VirtualBox can be used to run vmdk without changes as it uses IDE for the virtual disk controller. Cc: Matt Porter Signed-off-by: Tom Rini --- Changes in v2: None --- scripts/lib/wic/canned-wks/common.wks.inc | 2 +- scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg | 8 ++++---- scripts/lib/wic/canned-wks/qemux86-directdisk.wks | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/lib/wic/canned-wks/common.wks.inc b/scripts/lib/wic/canned-wks/common.wks.inc index 5cf2fd1f3e06..89880b417b6e 100644 --- a/scripts/lib/wic/canned-wks/common.wks.inc +++ b/scripts/lib/wic/canned-wks/common.wks.inc @@ -1,3 +1,3 @@ # This file is included into 3 canned wks files from this directory part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 -part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 +part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024 diff --git a/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg b/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg index d5a07d20484d..c58e74a853cb 100644 --- a/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg +++ b/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg @@ -12,16 +12,16 @@ DEFAULT Graphics console boot LABEL Graphics console boot KERNEL /vmlinuz -APPEND label=boot root=/dev/sda2 rootwait +APPEND label=boot rootwait LABEL Serial console boot KERNEL /vmlinuz -APPEND label=boot root=/dev/sda2 rootwait console=ttyS0,115200 +APPEND label=boot rootwait console=ttyS0,115200 LABEL Graphics console install KERNEL /vmlinuz -APPEND label=install root=/dev/sda2 rootwait +APPEND label=install rootwait LABEL Serial console install KERNEL /vmlinuz -APPEND label=install root=/dev/sda2 rootwait console=ttyS0,115200 +APPEND label=install rootwait console=ttyS0,115200 diff --git a/scripts/lib/wic/canned-wks/qemux86-directdisk.wks b/scripts/lib/wic/canned-wks/qemux86-directdisk.wks index db30bbced034..1f8466af29bf 100644 --- a/scripts/lib/wic/canned-wks/qemux86-directdisk.wks +++ b/scripts/lib/wic/canned-wks/qemux86-directdisk.wks @@ -4,5 +4,5 @@ include common.wks.inc -bootloader --timeout=0 --append="vga=0 uvesafb.mode_option=640x480-32 root=/dev/sda2 rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 rootfstype=ext4 " +bootloader --timeout=0 --append="vga=0 uvesafb.mode_option=640x480-32 rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 rootfstype=ext4 " -- 1.9.1