LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   grub related problem for lfs 6.6 (https://www.linuxquestions.org/questions/linux-from-scratch-13/grub-related-problem-for-lfs-6-6-a-863193/)

bhismnarayan 02-16-2011 08:48 PM

grub related problem for lfs 6.6
 
hello
whenever i run
root:/# grub-install --grub-setup=/bin/true /dev/sda
grub-probe: error: cannot find a device for /boot/grub.

No path or device is specified.
Try ``grub-probe --help'' for more information.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

i get the above error.suggest me what to do

druuna 02-17-2011 01:51 AM

Hi,

Are you still working on the following problem posted earlier: problem related to grub on lfs6.6?? (which you seem to have abandoned).

bhismnarayan 02-17-2011 10:35 AM

no I am not working on that.I started it all again and now I don't have multiple os installed just have ubuntu 10.04.

druuna 02-17-2011 11:16 AM

Hi,

Are you replacing the boot-loader that came with Ubuntu with a specific reason? Why not let that boot-loader do all the work (a suggestion I also made in the other thread).

Hope this helps.

bhismnarayan 02-17-2011 11:39 AM

So from which command should I start that I am not clear about it

druuna 02-17-2011 11:56 AM

Hi,

If you've decided to let Ubuntu take care of the boot process you need to add LFS to grub.cfg (on Ubuntu).

Something like this (explained here: LFS Grub (8.4.2. Setting Up the Configuration):

Code:

menuentry "GNU/Linux, LFS 6.6" {
        insmod ext2
        set root=(hd0,2)
        linux  /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda2 ro
}
menuentry "GNU/Linux, LFS 6.6 (recovery mode)" {
        insmod ext2
        set root=(hd0,2)
        linux  /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda2 ro single
}

Make sure the blue parts reflect your setup, the above are just examples!!

If all went well you should now be able to boot into Ubuntu or LFS.

Hope this helps.

PTrenholme 02-17-2011 12:12 PM

Note that Ubuntu keeps the "fixed" stuff in /etc/grub.d/, and you need to run grub-mkconfig to create the grub.cfg file. Failure to do this will cause you to lose your LFS settings every time Ubuntu updates its configuration files. (Note that the mkconfig script searches all drives for valid boot images, so your LFS installation might be automatically in the cgf file.)

Oh, the mkconfig output defaults to stdout, and needs to be redirected to /boot/grub/grub.cfg.

bhismnarayan 02-17-2011 01:47 PM

Hello
what does (hd0,2) signify .i have lfs in sda8 so what should I write there.

bhismnarayan 02-17-2011 01:50 PM

Quote:

Originally Posted by PTrenholme (Post 4261792)
Note that Ubuntu keeps the "fixed" stuff in /etc/grub.d/, and you need to run grub-mkconfig to create the grub.cfg file. Failure to do this will cause you to lose your LFS settings every time Ubuntu updates its configuration files. (Note that the mkconfig script searches all drives for valid boot images, so your LFS installation might be automatically in the cgf file.)

Oh, the mkconfig output defaults to stdout, and needs to be redirected to /boot/grub/grub.cfg.

hello sir,
How will I redirect it then,,,,

druuna 02-17-2011 02:41 PM

Hi,

Quote:

Originally Posted by bhismnarayan (Post 4261892)
Hello
what does (hd0,2) signify .i have lfs in sda8 so what should I write there.

That is explained in chapter 8.4.1.

sda8 -> hd0,8

But do try PTrenholme's method(s) first! I'm not that familiar with Ubuntu and the info given is important.

Redirection is accomplished by putting a > between the command and the file you want to write the output to.

grub-mkconfig > /boot/grub/grub.cfg

You can also use the -o option which comes with grub-mkconfig: grub-mkconfig -o /boot/grub/grub.cfg (covered in chapter 8.4.2)

Hope this helps.

bhismnarayan 02-17-2011 03:41 PM

its solved ,,,,,,,,,,,,,,,,,,,,thank u

druuna 02-18-2011 01:05 AM

You're welcome :)

Hope you have fun with LFS.


All times are GMT -5. The time now is 03:25 AM.