0

i am trying the grub configuration file "/boot/grub/grub.cfg" in the kernel line, set "root=UUID=" instead "root=/dev/"

for example when i ran :

grub-mkconfig -o /boot/grub/grub.cfg

the file /boot/grub/grub.cfg contain :

menuentry 'Slackware-14.2 GNU/Linux' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-1c07b419-4a08-4326-b4c4-fd9ac9cce46e' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos 
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  59774ae4-7b95-4aee-a16f-40e9adc3c4db
    else
      search --no-floppy --fs-uuid --set=root 59774ae4-7b95-4aee-a16f-40e9adc3c4db
    fi
    echo    'Loading Linux 4.4.111 ...'
    linux   /vmlinuz-huge-4.4.111 root=/dev/sda3 ro splash quiet nomodeset video=uvesafb:mode_option=1024x768-24,mtrr=3,scroll=ywrap
}

i am trying to the grub-mkconfig, generate in /boot/grub/grub.cfg, the follow contain (just change the root=/dev/sda3 for root=UUID=)

menuentry 'Slackware-14.2 GNU/Linux' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-1c07b419-4a08-4326-b4c4-fd9ac9cce46e' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos 
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  59774ae4-7b95-4aee-a16f-40e9adc3c4db
    else
      search --no-floppy --fs-uuid --set=root 59774ae4-7b95-4aee-a16f-40e9adc3c4db
    fi
    echo    'Loading Linux 4.4.111 ...'
    linux   /vmlinuz-huge-4.4.111 root=UUID=1c07b419-4a08-4326-b4c4-fd9ac9cce46e ro splash quiet nomodeset video=uvesafb:mode_option=1024x768-24,mtrr=3,scroll=ywrap
}

i get the info from blkid

blkid | grep sda3
/dev/sda3: LABEL="2Slackware64" UUID="1c07b419-4a08-4326-b4c4-fd9ac9cce46e" UUID_SUB="3ec2cd19-212c-42e4-9630-8c5c2baa3250" TYPE="btrfs" PARTUUID="000cb1e8-03"

i try modifing the files :

/etc/grub.d/10_linux
/usr/share/grub/grub-mkconfig_lib
/etc/default/grub

but i dont find the way for set default the generation of instead when i use the grub-mkconfig tool for generate my /boot/grub/grub.cfg

1
  • what does your /etc/default/grub file look like?
    – stefan0xC
    Jan 28, 2018 at 5:37

1 Answer 1

-1

my file /etc/default/grub content :

# If you change this file, run grub-mkconfig -o /boot/grub/grub.cfg
# afterwards to update /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=15
GRUB_DISTRIBUTOR=$( sed 's/Slackware /Slackware-/' /etc/slackware-version )
GRUB_CMDLINE_LINUX_DEFAULT="video=uvesafb:mode_option=1024x768-24"
GRUB_CMDLINE_LINUX="quiet"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
  GRUB_GFXMODE=1024x768x32
  GRUB_GFXPAYLOAD_LINUX=keep
  GRUB_BACKGROUND="/boot/images/tux.png"

# Font used on the graphical terminal:
GRUB_FONT=/usr/share/grub/dejavusansmono.pf2

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
1
  • 1
    This should be an edit to your question, not an Answer.
    – Jeff Schaller
    Feb 4, 2018 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .