Using UUIDs in the Boot Loader and /etc/fstab File (x86)

After the install, you can optionally use the following procedure to configure the UUID for the system device in the boot loader and /etc/fstab files for your x86 system.

  1. Install the SUSEŽ Linux Enterprise Server for x86 with no SAN devices connected.

  2. After the install, boot the system.

  3. Open a terminal console as the root user or equivalent.

  4. Navigate to the /dev/disk/by-uuid directory to find the UUID for the device where you installed /boot, /root, and swap.

    1. At the terminal console prompt, enter

      cd /dev/disk/by-uuid
      
    2. List all partitions by entering

      ll
      
    3. Find the UUID, such as

      e014e482-1c2d-4d09-84ec-61b3aefde77a —> /dev/sda1
      
  5. Edit /boot/grub/menu.1st file, using the Boot Loader option in YaST2 or using a text editor.

    For example, change

    kernel /boot/vmlinuz root=/dev/sda1
    

    to

    kernel /boot/vmlinuz root=/dev/disk/by-uuid/e014e482-1c2d-4d09-84ec-61b3aefde77a
    
    [Important]Important

    Make a copy of the original boot entry, then modify the copy. If you make a mistake, you can boot the server without the SAN connected, and fix the error.

    If you use the Boot Loader option in YaST, there is a defect where it adds some duplicate lines to the boot loader file when you change a value. Use an editor to remove the following duplicate lines:

    color white/blue black/light-gray
    
    default 0
    
    timeout 8
    
    gfxmenu (sd0,1)/boot/message
    

    When you use YaST to change the way that the root (/) device is mounted (such as by UUID or by label), the boot loader configuration needs to be saved again to make the change effective for the boot loader.

  6. As the root user or equivalent, do one of the following to place the UUID in the /etc/fstab file:

    • Open YaST to System+Partitioner, select the device of interest, then modify Fstab Options.

    • Edit the /etc/fstab file to modify the system device from the location to the UUID.

      For example, if the root (/) volume has a device path of /dev/sda1 and its UUID is e014e482-1c2d-4d09-84ec-61b3aefde77a, change line entry from

      /dev/sda1   /            reiserfs   acl,user_xattr        1 1
      

      to

      UUID=e014e482-1c2d-4d09-84ec-61b3aefde77a   /  reiserfs   acl,user_xattr        1 1
      
      [Important]Important

      Make sure to make a backup copy of the fstab file before you begin, and do not leave stray characters or spaces in the file.


SUSEŽ Linux Enterprise Server Storage Administration Guide 10