help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installer: GUIX_IMAGE as /dev/sda on some hardware?


From: Giovanni Biscuolo
Subject: Re: Installer: GUIX_IMAGE as /dev/sda on some hardware?
Date: Sat, 25 May 2019 15:16:28 +0200

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 <address@hidden> writes:

> Giovanni Biscuolo wrote:
>> This is **very** important when installing grub, in fact grub
>> installation failed when instantiating my config.scm on the HP 
>> 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<something> is what the Installer writes in the bootloader
section of config.scm:

--8<---------------cut here---------------start------------->8---

  (bootloader
    (bootloader-configuration
      (bootloader grub-bootloader)
      (target "/dev/sda")
      (keyboard-layout keyboard-layout)))

--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 
>> by the installer?
>
> It's… 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 
> you've discovered, they aren't to be relied on, and you should use 
> 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:

--8<---------------cut here---------------start------------->8---

  (bootloader
    (bootloader-configuration
      (bootloader grub-bootloader)
      (target "/dev/disk/by-id/scsi-3600508b1001c75a3bebb04b23d19e249")
      (keyboard-layout keyboard-layout)))

--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'.

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]