From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 73A89138334 for ; Fri, 19 Jul 2019 10:27:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E47ABE081A; Fri, 19 Jul 2019 10:27:31 +0000 (UTC) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 71195E0101 for ; Fri, 19 Jul 2019 10:27:31 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id p13so31699367wru.10 for ; Fri, 19 Jul 2019 03:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version; bh=dIdf07WiDQ9CoRRtVosLu04Uquc+IaP3fqJaY6NIIX4=; b=GzdaP8T6fi0qhhPOHRuVATIwKe4cT7uCO4RRqrbLMPbsUVPdz1ST9CGgVGJrD/bDaT rzBjaVrFp/cruZcErY112ltlCeJlYDLWQlH2MZSR7sBizFmktQ96G5YvmWa/uELUBLXs V/ITxWgNuBHdLMQpcyiGHgwsE2dvOEOY27CzZnhhZIPyyFcEIA1VmcH3vDzbvXAzKrwn mpRlMuOohcL5a0n7MGFTeL4a9LotI9ATbzQVkjNeGpQ0Asw/6hmEGypxxuYPFsBrRwz+ o7p6LdNBYO79b4DqbR+HY3m7VQmMXemY8xNxm4YUXdzzl9vV95DHuumZbsO+Lebs7/bE S7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version; bh=dIdf07WiDQ9CoRRtVosLu04Uquc+IaP3fqJaY6NIIX4=; b=NPU0qky8Bl/2lJhiC8PY2pWov+RHK8pOYCSwvZ5lolOFeyqm+t84UCDnAuVuTjTYqg iglTPoQ862hcunsA+xysyLodd1Fc+4FKnZxOgNhBRpOcSxK/8u+gV4JJk5PKye+6FZr0 JRLGsvmgEfqDG6fSPY96IQ4L8owmt7i6fomktAofx2MtRd8q39cwJmql6VeqCyZ6S3VZ 1bVtSjkVXWxqr7TnRmrys/AJiIOQeOO7DOmXJ+vMQbabvImAkbLC1jrPyXQt1BIPwXhq pvJivoiZlTbNF5DlqKSKg+MP2+9/9DNr/rJpyJnJh/hbcbOQSiUgA59IAzKNYcEIufK4 UTPw== X-Gm-Message-State: APjAAAX0eBARFptRV6mWLfQt0rWnMwPtJrDL3e+iXxyFgb7QUugVyzKe uCL+UxJXLX/lwhmOCiwuiX0+YLQl X-Google-Smtp-Source: APXvYqwnIuSuqubP8rhkDDVl6Q/bbxBT4PqWv+cAv8l55deNkh6865xgbjxYp65g1PRbFG6+KZzayA== X-Received: by 2002:a5d:4ec1:: with SMTP id s1mr52232732wrv.19.1563532049810; Fri, 19 Jul 2019 03:27:29 -0700 (PDT) Received: from localhost.localnet (230.3.169.217.in-addr.arpa. [217.169.3.230]) by smtp.gmail.com with ESMTPSA id b2sm38792157wrp.72.2019.07.19.03.27.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jul 2019 03:27:28 -0700 (PDT) From: Mick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Using UUID for root disk in grub requires initramfs? Date: Fri, 19 Jul 2019 11:27:19 +0100 Message-ID: <6685853.amHapi50jO@localhost> In-Reply-To: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5198551.GXicmgXPBu"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Archives-Salt: 5f29f4b7-6983-49e4-a1cd-5af0e00dc37f X-Archives-Hash: 7322e7c83ab79f69c9432a3a6bc45e00 --nextPart5198551.GXicmgXPBu Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" On Friday, 19 July 2019 10:29:09 BST Adam Carter wrote: > This > https://wiki.gentoo.org/wiki/GRUB2/Configuration_variables > > has > > GRUB_DISABLE_LINUX_UUID false If true, ${GRUB_DEVICE} is passed in the root > parameter on the kernel command line. > > If false, ${GRUB_DEVICE_UUID} is passed in the root parameter on the kernel > command line when an initramfs is available. > > So it looks like i can't set root= to a UUID unless i use an initramfs - > can anyone confirm? This would be correct if GRUB (with/out initramfs) happened to be the only way to configure Linux. Thankfully we have more choices, in Gentoo at least. ;-) > In /usr/src/linux/admin-guide/kernel-parameters.txt it has; > root= [KNL] Root filesystem > See name_to_dev_t comment in init/do_mounts.c. > > And in do_mounts.c it mentions PARTUUID= and PARTLABEL= but i dont know C > so don't know what to make of it. > > Background is that after adding a new disk the system doesn't boot, so i'm > assuming that the /dev/sdX device names are now pointing to different > hardware, so i want to fix that by using persistent names. You could use UUID, or partition label (if GPT is used on the disk), but by- pass GRUB's facility to configure the UUID and use the kernel .config itself. For this you will have to configure and compile your own kernel. Use this kernel option to specify kernel command line options: Processor type and features --> ... [*] Built-in kernel command line (root=PARTUUID=XXXXXXXXXXXXXXXXXXXXXXXXX other_options_here) As long as you use 'make oldconfig' for subsequent kernels the UUID will be retained. -- Regards, Mick --nextPart5198551.GXicmgXPBu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEt7MNaGaS6HvTUrEz6WnU8jC95dcFAl0xmwcACgkQ6WnU8jC9 5dcpJw/+KtxkU3oh+o7PGIqW+csCn2eL/59C/+OjaJDujBDyY/wPS9teRz0dPsMq uUxA6LM65dBUNWyQMhRKrTsA6pRDXjmEj/jmC/6hJ8wroYPspvvA6usWSwQ4aYXj x6LO0QJSZkwl2rO7XD5pGzRuCP2jmfnXhqRJWUaSIZ4HF8zlCGupFL7XgO/mSzIo IEfTwTl2tNUgvEd4/NTWmW8gP5f9OYxKxJo3mZzbLypN9/5hDwyAo7wqLdngvo+y /rMO3UUpNVXL9BtaduF9DaJKttWaXkgQ9iDEE+3qVDOe4rak1MwDnILi8GpaWp4Q 77hBH+oXUQmx/VUURGTCBUe/JvAushd+UfeLPRiZhUhgGSnU5Pa8Szuq4XHk1kdF yMPMOXfmkxxgWBicVNIBvCQNHcB0CkMqZaYycIWfGdTkNH5Pa1bL6CCuCv9ruGum VOU+5B/+5+otY9l0NHpi00kzUHt0s7SzERJKhM+IL9ktgUdc0tO/L4Fn9GU9O3nN Y/SGcB4biFnLOLLMGVD236hUJflZCrMUSDOwTNIYwD29wOQocrgByUCmP1mXDLNR 3IK5UAw27RNZEoNkca4HfmiKt3Qb/InwEjpeF0Mkcj3RKyP3jFJxLf/aBQMQdHwU vAZBFbmKWTiURcEzbvMlS8gCz0V1+rVtn1XkFvZ4Tv6kqG66k6M= =3oZ/ -----END PGP SIGNATURE----- --nextPart5198551.GXicmgXPBu--