From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Biscuolo Subject: Re: Installer: GUIX_IMAGE as /dev/sda on some hardware? Date: Sat, 25 May 2019 15:16:28 +0200 Message-ID: <87y32u3c9f.fsf@roquette.mug.biscuolo.net> References: <874l5i52i1.fsf@roquette.mug.biscuolo.net> <87r28mzqxv.fsf@nckx> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: In-Reply-To: <87r28mzqxv.fsf@nckx> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tobias Geerinckx-Rice , help-guix@gnu.org Cc: guix-devel@gnu.org List-Id: help-guix.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Tobias, thanks for sharing your experience, I'm cross posting to guix-devel since it's worth discussing a patch to the installer Tobias Geerinckx-Rice writes: > Giovanni Biscuolo wrote: >> This is **very** important when installing grub, in fact grub >> installation failed when instantiating my config.scm on the HP=20 >> ProLiant >> simply because it was on /dev/sda pointing to the USB media; > > /dev/xdyN names have never been safe to use in this way I'm not talking about partitions ;-) According my faulty memory (I cannot reproduce it now) /dev/sd is what the Installer writes in the bootloader section of config.scm: =2D-8<---------------cut here---------------start------------->8--- (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda") (keyboard-layout keyboard-layout))) =2D-8<---------------cut here---------------end--------------->8--- and that caused the Installer to fail on grub-install since /dev/sda was my USB media, (fortunately it failed because there was no space for grub :-) ) On the other hand, by setting "/dev/sdb" whould made grub-install succeed when running from USB but fail when running from the system itself [...] >> 3. how is the USB media "relocated" to the last /dev/sd? device=20 >> by the installer? > > It's=E2=80=A6 not? So it's pure coincidence that grub-install on /dev/sda succeedes on the whole set of machines users are installing via USB media? :-O > Dev nodes & names are doled out by the kernel. As=20 > you've discovered, they aren't to be relied on, and you should use=20 > labels or UUIDs instead. Labels and UUIDs are for volumes, not for the whole disk ;-) I'm not talking about filesystem config, where using labels or UUIDS is strongly recommended (and used by the Installer), I'm talking about grub-install config But wait! There's the /dev/disk/by-id/ tree, I did not notice it until now! :-) That's the solution: =2D-8<---------------cut here---------------start------------->8--- (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/disk/by-id/scsi-3600508b1001c75a3bebb04b23d19e249") (keyboard-layout keyboard-layout))) =2D-8<---------------cut here---------------end--------------->8--- I did not test this but it smells like running, if Guix devels agree I think Installer should adopt /dev/disk/by-id by default, sorry I'm not able to propose a patch for this [...] > Hoping to have scared you into using UUIDs, Yes! You did it (albeit it is disk/by-id and not UUIDs) :-D Thanks for your suggestions! Gio'. =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAlzpQCwACgkQ030Op87M ORLqwA//dr4eS2SVXyHAqBCjC8b8SujLObqAlOtD0A088nujuwwFMMI66daFBN9b RJT0pzkBqZLE0+7l3q6KorpNinA+7lmTL6gmYHv9ISy9lsfzoaMKuwx1eJ4mU/wE y5rAAj4L2eBamRN//QL+0WlhJxBIFWl+Za7v8arRDAVClg+c0JDSlqZxIK8TOi5F 3N4qMsf80mmHJSEoWu/QJ7tj3w46QMuR2bqEjVIsFFlLPDR6gf95H2RJ/BlwmucL VmNd1+oBPOoyY2HhcTBduAt7J25gQTmCQOLppMOaWuI1evS1IVm+gYHLkkw9YGe7 ekcs9VBJYJGhf3R2PZc9tsLeT9xPCP9AfSxdkucm5BqPxw3nsdImdLdTUWjEVC78 clwsvntgGAHKd5c/DpL/Hmj9FMiEB9JXIQSIV7nFTe81+1x/S5qrO4bkBpi4q5sJ LC27mLaYfI8FbQZr2bZSiJEH6Ug/C1BZ7rHAUeCK8eTqd4SKz8XtpjyU/U3d//Wy 3SN3ZcNLH4xTVUMvDJws67IzihtElmlM8mKBlOfLbDT2V5eBeH85ByExaYXacA72 QfoMW3DUd3aXcsOUtF6Pz3/Srk7dpoY5yz1wkTL6F6RzrY/uo2OGGrrqU7+gAneA N4RK2A+QgtbpAuj8jm1ozXXHLGMnUlJCqS9Uh4JDuYF7xG8Iet0= =bcuN -----END PGP SIGNATURE----- --=-=-=--