Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: UUID and Grub

  1. #1
    Join Date
    Aug 2006
    Beans
    103

    UUID and Grub

    Q1. In /boot/grub/grub there are many references to a UUID.
    Where does grub get this reference? I would like to change the source and then run update-grub.
    I prefer not to edit the grub file manually because then when I do run update-grub the UUID will come back.

    Q2. There are some obvious drawbacks to using UUID's in grub and fstab, but what are the advantages for a home desktop user?
    I can't think of any but there must be some.

    pgmer6809

  2. #2
    Join Date
    Jan 2008
    Location
    France
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Arrow Re: UUID and Grub

    Do you want to remove UUIDs from /boot/grub/grub.cfg ? why ?

    AFAIK there are no drawbacks to using UUID wherever.

  3. #3
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: UUID and Grub

    Quote Originally Posted by YannBuntu View Post
    Do you want to remove UUIDs from /boot/grub/grub.cfg ? why ?

    AFAIK there are no drawbacks to using UUID wherever.
    Yes, I have to agree with this! The idea behind UUID is to stabilize the mounting process so that the system will always know where to look for a drive, regardless of any other system changes (changing volume labels and whatnot). It would be (IMHO) counter productive to circumnavigate this, unless there was an explicit reason to do so.

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: UUID and Grub

    Grub & fstab used to use device like /dev/sda5 but then users would add another drive and it became sdb5 or they changed partitions and and it became something else. So UUIDs are more stable.

    UUIDs do not normally change, but deleting & recreating a partition creates new UUID or full image copy to another drive may create duplicate UUIDs which can be a problem.

    A third choice is label. Most installs & fstab also support the use of labels.
    https://help.ubuntu.com/community/Fstab
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: UUID and Grub

    Quote Originally Posted by pgmer6809 View Post
    Q1. In /boot/grub/grub there are many references to a UUID.
    Where does grub get this reference?
    I agree with OldFred and YannBuntu that removing UUIDs would be a step backward, but it's your system. To remove them from the grub.cfg file and the grub menu, go to /etc/default/grub, in super-user mode, and find these lines:
    Code:
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID="true"
    Remove the "#" from the second line, save the file, and run update-grub. The UUID references should be replaced by device names.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

  6. #6
    Join Date
    Aug 2006
    Beans
    103

    Re: UUID and Grub

    Quote Originally Posted by YannBuntu View Post
    Do you want to remove UUIDs from /boot/grub/grub.cfg ? why ?

    AFAIK there are no drawbacks to using UUID wherever.

    Yes I want to remove them.
    1. The drawback is that if I backup my disk drive, and then it fails and I have to replace it and restore the backup to another drive, the other drive will have a different UUID.
    The grub will no longer work.
    I have had this problem before where I wanted to transfer the contents of one drive to another, but doing so broke a bunch of stuff because the UUID's of the drives were not the same.

    2. UUID's are very user unfriendly. I know which of my drives is 'a' and which is 'b'. I know which partition on each I have assigned to what. I have no clue which UUID applies to what and I don't want to have to remember a UUID.

    3. I can see NO advantages for a home desktop user to UUID's. Wikipedia mentions that there are advantages in distributed configurations where you do not always know which disk gets discovered first by the hw detecting program but that does not apply in my case.
    In any case we used to have that issue with dual ethernet setups where you could never tell which adaptor would be eth0 and which would be eth1, but the Network folks seemed to have solved that without resorting to UUID's.

    4. The Wikipedia article mentions that an alternative to UUID's is to use Label=xxxx.
    This would be acceptable to me as Labels are both user friendly and under my control, i..e I can assign the same label to the replacement drive.
    UUIDs are NOT under my control, and one of the main reasons I run LINUX is so that I do have control of my machine.

    I have absolutely no interest in debating this matter further; UUIDs may be fine for some people; they are not for me, unless there is some advantage I don't know about yet.

    SO back to the original question; What is the best way to get rid of the UUIDs in the /boot/grub/grub file ?
    pgmer6809

  7. #7
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: UUID and Grub

    Just change fstab to use devices and grub's file as posted above.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  8. #8
    Join Date
    Jun 2007
    Location
    Arizona, USA
    Beans
    223
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Talking Re: UUID and Grub

    Quote Originally Posted by oldfred View Post
    Just change fstab to use devices and grub's file as posted above.
    Yep....I went to answer and JKyleOKC had already taken care of it.
    And, I've held my tongue on the hard left turn into the brick wall regarding not going the UUID route.
    The future will soon be a thing of the past.

  9. #9
    Join Date
    Aug 2006
    Beans
    103

    Re: UUID and Grub

    Quote Originally Posted by JKyleOKC View Post
    I agree with OldFred and YannBuntu that removing UUIDs would be a step backward, but it's your system. To remove them from the grub.cfg file and the grub menu, go to /etc/default/grub, in super-user mode, and find these lines:
    Code:
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID="true"
    Remove the "#" from the second line, save the file, and run update-grub. The UUID references should be replaced by device names.

    Thank you, that is exactly what I needed to know.
    pgmer6809

  10. #10
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: UUID and Grub

    You're quite welcome.

    You said earlier that you want full control. If that's really true, then you should avoid using the /dev/sdXX notation also! That's not really under your control, since program updates have been known to change the order in which the drives are queried during the boot process. The forums have a number of examples in which a drive's "sdxx" number gets reported differently by different programs.

    This is likely to only get worse, as the boot process morphs from the totally sequential SysV tradition into the parallel-process Upstart system. Just having a flash drive plugged in at boot time can potentially change the /dev names that are assigned.

    For full control, use the LABEL= option, since you and you alone assign the label and it won't depend on sequence of access or anything else...

    EDIT: And if you do switch, be sure to edit fstab also -- and verify that the new one is working properly, via "sudo mount -a" before rebooting. Otherwise you might wind up with a system that would not boot!
    Last edited by JKyleOKC; September 8th, 2012 at 02:51 PM. Reason: afterthought.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •