* Can (grub-configuration (device $DEV)) accept UUIDs? @ 2017-02-26 9:54 dian_cecht 2017-03-06 16:19 ` Ludovic Courtès 0 siblings, 1 reply; 3+ messages in thread From: dian_cecht @ 2017-02-26 9:54 UTC (permalink / raw) To: guix-devel I am in the process of trying to get GuixSD installed on my desktop and I've run into a minor issue. The documentation doesn't mention any support for UUIDs for grub-configuration (I'm going by the webpage with the install instead of the info files on the LiveUSB). Anyways, since the boot drive is very likely to change between install and the first LiveUSBless install, I'd rather use UUIDs. Can grub-configuration support this? If it can, the docs need to be updated to support this and if not, I'd hope someone could figure out a way to enable support for this. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can (grub-configuration (device $DEV)) accept UUIDs? 2017-02-26 9:54 Can (grub-configuration (device $DEV)) accept UUIDs? dian_cecht @ 2017-03-06 16:19 ` Ludovic Courtès 2017-03-06 19:10 ` dian_cecht 0 siblings, 1 reply; 3+ messages in thread From: Ludovic Courtès @ 2017-03-06 16:19 UTC (permalink / raw) To: dian_cecht; +Cc: guix-devel Hi, <dian_cecht@zoho.com> skribis: > I am in the process of trying to get GuixSD installed on my desktop and > I've run into a minor issue. The documentation doesn't mention any > support for UUIDs for grub-configuration (I'm going by the webpage with > the install instead of the info files on the LiveUSB). Anyways, since > the boot drive is very likely to change between install and the first > LiveUSBless install, I'd rather use UUIDs. Can grub-configuration > support this? Unfortunately it can’t, because there are no UUIDs (that I know of) to identify drives. However, as the manual vaguely suggests (too vaguely I admit), you can use a GRUB device identifier such as “(hd0)”. This is stable across reboot, AIUI. I’ve never tried it but if you can confirm that it works this way, we could/should update the documentation to propose that. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can (grub-configuration (device $DEV)) accept UUIDs? 2017-03-06 16:19 ` Ludovic Courtès @ 2017-03-06 19:10 ` dian_cecht 0 siblings, 0 replies; 3+ messages in thread From: dian_cecht @ 2017-03-06 19:10 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Mon, 06 Mar 2017 17:19:21 +0100 ludo@gnu.org (Ludovic Courtès) wrote: > Unfortunately it can’t, because there are no UUIDs (that I know of) to > identify drives. > > However, as the manual vaguely suggests (too vaguely I admit), you can > use a GRUB device identifier such as “(hd0)”. This is stable across > reboot, AIUI. I’ve never tried it but if you can confirm that it > works this way, we could/should update the documentation to propose > that. How about a (maybe better) option; if (grub-configuration ...) is passed something like (uuid "$UUID"), instead of simply passing this directly to grub-install (or whatever is used), guix /could/ take the UUID, check what drive the UUID points to, then pass the related arguement to GRUB. It would be a reasonably fix for what I'd assume is a bug/missing feature in GRUB. In my quick searching, apparently blkid can accept '-t', which lets you search for a drive by label, uuid, or (the manpage doesn't state this) uuid_sub. I don't know Guile nor Guix so I can't submit a patch, but what I think /should/ work is, if grub-configuration is called with a UUID, the UUID is passed to blkid[0] (probably checking both UUID[1] and UUID_SUB[2]), and the output checked for a valid drive (in the form, I'd expect, of /dev/sda or similar), cleaned up, then that is passed to grub-configuration. Someone with better knowledge of Guile, Guix, and Linux can probably expand on this (or figure out how it might be broken), but it should be a start for adding this feature. [0]. According to blkid, it's simply an interface to libblkid, so maybe a FFI call (or several) would be better here than just calling the CLI program? [1]. RAID members will share a UUID, so simply relying on that isn't practical. [2]. UUID_SUB is the actual UUID of the underlying drive (apparently), and should probably be used when someone it trying to install GRUB, otherwise you could end up with multiple RAID members as output, and then I can only see things becoming hard[3]. [3]. Like trying to decide which drive the sysadmin meant, or if they meant all of them, or if they passed the wrong UUID(_SUB) in the system config... ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-06 19:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-02-26 9:54 Can (grub-configuration (device $DEV)) accept UUIDs? dian_cecht 2017-03-06 16:19 ` Ludovic Courtès 2017-03-06 19:10 ` dian_cecht
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.