(address . bug-guix@gnu.org)
Hello,
Following a recent discussion on Guix-devel [1] I'm "forwarding here" a
proposal to switch from /dev/sd? to (target (uuid ...)) in
bootloader-configuration operating-system declaration
This is a recap of current situation: the installer usually uses
/dev/sda as target for grub-install (and bootloader-cofiguration) but it
happened to me that on a machine /dev/sda was the USB media, not the
target HD
The fact is that it's not guaranteed that /dev/sd? always corresponds to
the same device
This is where we are with the discussion:
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (37 lines)
> Hello!
>
> Giovanni Biscuolo <g@xelera.eu> skribis:
>
>> But wait! There's the /dev/disk/by-id/ tree, I did not notice it until
>> now! :-)
>>
>> That's the solution:
>>
>>
>> (bootloader
>> (bootloader-configuration
>> (bootloader grub-bootloader)
>> (target "/dev/disk/by-id/scsi-3600508b1001c75a3bebb04b23d19e249")
>> (keyboard-layout keyboard-layout)))
>>
>> 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
>
> Ideally, we’d use an actual UUID object (or a string?) here rather than
> this Linux/udev-specific idiom. So it would look like:
>
> (bootloader-configuration
> ;; …
> (target (uuid …)))
>
> Would that work?
>
> I believe using Guile-Parted we could map it back to a /dev name.
>
> WDYT?
>
> Ludo’.
[1] Message-ID: <87o93mwr4b.fsf@gnu.org>
--
Giovanni Biscuolo
Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAlzu2nsACgkQ030Op87M
ORLxIRAAofCSPxkPjw/1rmFuJmp03DzujXbWQF6idUvGPZnhBPyDYjXyMJCU2oEk
ctvOlOKfe4NpI/2P7wUxSxgXJ6iLOezdZZV5BOrc707TaeB3sRYILKhnsL8FLBJK
zo+5fALgXw47TVh6KHFIN6NCb70F31tDtrFtGkKE043J4u59CtvwSxdQxEAaLIoc
wkIW6f9xiMzf/I/EHt31Rw+ZqaLZjKxXDzkn6ETwK8tsNRQd+eZDpsuvHH8KpelU
aiLrSPs2xyG2HScqgsFQNINQMomq/TNFwwqcSUr7//5/Ea/cQl8vZQ67L7aV3HzV
+B9Zx1KwYYaYGlL234cBMOMl3NhAtkoOiWW1O9cv30JWQBKO3JzwFv3l7dq0eslW
Fdu6R7rt4puh+OTpMwmxuBxBq4+h3/kf6Hm2kdbTulTLL3m7qX3LWoH/vMtCeGCB
9P9LJCe4UZ7sRkrZvO2QleeaexKHEWndvEeSbODFAGka1zmiAuiC1rAscErf7sj+
XZTTW4+zIY2Gb8xHnMa/Xj1ja0CZj4afamgAZ9eaE6KyLsi+qjNARd1K5wWJ+uff
UrZR86QmlZ+w6FybWSaSVNfziyDRrr2GsRD2J6pBteFwvTPZkVjZCGvWciXBuYIU
tmAaNJE8aC0EVsLIMDlSMTJn/gkp7gFJLXkm1LNZ0nJCw2TWESA=
=A/Yd
-----END PGP SIGNATURE-----