LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-18-2018, 04:15 PM   #1
KNSI
LQ Newbie
 
Registered: Jun 2018
Posts: 3

Rep: Reputation: Disabled
GRUB menu not getting updated even after changing /boot/grub/grub.cfg


Hi,

I have finished compilation of LFS-8.1 on ubuntu minimal(16.04) LTS.
during the creation of the GRUB file i had setup root to the wrong partition to.

Code:
set default=0
set timeout=5
insmod ext2
set root=(hd1)
menuentry "GNU/Linux, Linux 4.12.7-lfs-8.1" {
        linux   /boot/vmlinuz-4.12.7-lfs-8.1 root=/dev/sdb1 ro
}
hence the GRUB menu showed wrong showed:

Code:
error: no such partition
after figuring out the correct partition, i updated the grub.cfg file directly to:

Code:
set default=0
set timeout=5
insmod ext2
set root=(hd1,1)
menuentry "GNU/Linux, Linux 4.12.7-lfs-8.1" {
        linux   /boot/vmlinuz-4.12.7-lfs-8.1 root=/dev/sdb1 ro
}
but on rebooting the GRUB menu still shows the same error. i have also tried:

Code:
set default=0
set timeout=5

menuentry "GNU/Linux, Linux 4.12.7-lfs-8.1" {
        set root=(hd1,1)
        insmod ext2
        linux   /boot/vmlinuz-4.12.7-lfs-8.1 root=/dev/sda2 ro
}
as the LFS environment does not have a update-grub, im not sure how to fix this issue in the LFS environment itself for i have also erased the host system.
 
Old 06-19-2018, 01:34 PM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Try
Code:
set root=(hd1,msdos1)
^ This presumes that you have a traditional msdos ("MBR" style) partition table, for a GUID partition table try
Code:
set root=(hd1,gpt1)
Or perhaps:
Code:
        linux   /boot/vmlinuz-4.12.7-lfs-8.1 root=UUID=$uuid ro
where $uuid is replaced with the actual UUID of the drive (use `/sbin/blkid` from Ubuntu to find the correct UUID).

This all presumes that your kernel configuration includes the drivers needed by your storage device
 
1 members found this post helpful.
Old 06-19-2018, 02:37 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
at the grub menu hit c for grub command prompt then
Code:
 set
to see where grub is looking for the grub.cfg file.
 
1 members found this post helpful.
Old 06-19-2018, 03:41 PM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi
It might help if you explain where all the partitions are and which grub you are using, Where is grub installed. sda or sdb.

If it is a USB drive then you might need to set a "rootdelay=10" to kernel line
 
Old 06-20-2018, 09:13 PM   #5
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
I suggest INSURING that your editing the right grub.cfg

#1 insure the one your editing is where your installed boot loader installed it (usually /boot/grub/grub.cfg for grub2)

#2 insure grub is on the disk you think it is: it could be on sda, sda1, sdb, sdb3, or all of those why is because where it's installed depends on which grub.cfg it will use. i make that mistake all the time!
 
  


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
GRUB menu not getting updated even after changing /boot/grub/grub.cfg KNSI Linux - Newbie 6 06-20-2018 01:54 PM
Files in /etc/grub.d not included in /boot/grub/grub.cfg. stf92 Slackware 21 05-27-2018 04:38 PM
[SOLVED] Boot menu not matching grub.cfg spoovy Linux - Newbie 10 02-01-2011 03:45 PM
[SOLVED] How come I can't edit /boot/grub/grub.conf or /boot/grub/menu.lst in Fedora 14? trien27 Fedora 4 01-22-2011 04:02 PM
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM

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

All times are GMT -5. The time now is 07:48 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