LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 10-02-2016, 06:39 AM   #1
ROHK
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Rep: Reputation: Disabled
Unhappy Fail to use UUID in grub2


hi all,
I encounter a problem in booting into the system using grub2.

I have two partitions
/dev/sdc14 is /mnt/lfs/boot
/dev/sdc15 is /mnt/lfs

I have two version of grub menu entries
Code:
menuentry "GNU/Linux, Linux 4.7.2-lfs-7.10-systemd" {
        insmod part_gpt
        insmod ext2
        # set root=(hd0,gpt14)
        search --fs-uuid --no-floppy --set-root f215d53a-89e3-4b7b-99fc-77ab8feceb9c
        # system root=/dev/sdc15
        linux   /vmlinuz-4.7.2-lfs-7.10-systemd root=UUID=1b68e291-5e15-484a-a0ab-36acff02f95b ro
}
version 2
Code:
menuentry "GNU/Linux, Linux 4.7.2-lfs-7.10-systemd" {
        insmod part_gpt
        insmod ext2
        set root=(hd0,gpt14)
        linux   /vmlinuz-4.7.2-lfs-7.10-systemd root=/dev/sdc15 ro
}
version 2 will boot without error. However, the version 1 fails to boot
https://drive.google.com/file/d/0B8v...ew?usp=sharing

Can someone tell me what's wrong with the version 1.
 
Old 10-02-2016, 10:05 PM   #2
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Try creating an initial ram filesystem. It's a BLFS topic but easy, harmless, and reversible...
http://www.linuxfromscratch.org/blfs...initramfs.html
When you've done that, also add insmod search_fs_uuid and an initrd line to the grub.cfg commands.

P.S.: It may not apply in your case, but when using UUID or LABEL because the system is located on a hot-pluggable drive (a good idea), the rootdelay=5 kernel parameter is usually required to mitigate the slower response of an external drive. Anyway, I use 5 (seconds). Some people say 10. Experiment with that to find the shortest delay that works.

P.P.S.: That ext2 module is a default module. You can omit its insmod command if you like.

Last edited by stoat; 10-03-2016 at 05:38 PM.
 
1 members found this post helpful.
Old 10-03-2016, 09:17 AM   #3
ROHK
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thumbs up

Many~~Many thanks for your detailed explanation! I just finished the LFS and entering into the BLFS.
 
Old 10-03-2016, 06:20 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Note that an initrd is not required - as you are using gpt, you can pass PARTUUID. Not much different to /dev nodes in the grand scheme of things.
Personally I feel UUID has as many drawbacks as advantages in this case.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /dev/disk/by-uuid/<uuid here> does not exist and initramfs shell Mitt Green Linux - Kernel 4 08-03-2015 11:56 AM
Help regarding dual boot slack 14 with other Linux (uses grub/grub2 and UUID) Lilgamesh Slackware 5 04-03-2013 02:14 PM
Knoppix, GRUB to GRUB2, boot by UUID, stuck at kernel panic cj_tomekk Linux - Newbie 3 11-04-2012 10:21 AM
Change UUID - Edit UUID using the dd command GMHilltop Linux - Newbie 10 10-28-2010 07:39 PM
Volume has problems including no uuid in /dev/disk/by-uuid abejarano Linux - Hardware 3 12-31-2008 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration