...making Linux just a little more fun!
Martin J Hooper [martinjh at blueyonder.co.uk]
If you have done something such as adding a new partition that changes all your partition numbers so that grub can't find the right kernel do this at a grub prompt:
find <kernel>
Grub will then spit out the fully qualified path to the kernel in question and allow you to edit your menu.lst to suit.
Ben Okopnik [ben at linuxgazette.net]
On Mon, Oct 08, 2007 at 03:16:39PM +0100, Martin J Hooper wrote:
> If you have done something such as adding a new partition that > changes all your partition numbers so that grub can't find the > right kernel do this at a grub prompt: > > find <kernel> > > Grub will then spit out the fully qualified path to the kernel in > question and allow you to edit your menu.lst to suit.
You've piqued my curiosity. I've just tried the following at the 'grub' prompt:
find vmlinuz-2.6.15-28-amd64-generic find 2.6.15 find 2.6.15 find kernel find <kernel> # I was getting desperate by this point
and none of them resulted in anything except "Error 15: File not found". I think this tip requires just a little more detail to be useful.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
Kapil Hari Paranjape [kapil at imsc.res.in]
Hello,
On Mon, 08 Oct 2007, Ben Okopnik wrote:
> You've piqued my curiosity. I've just tried the following at the 'grub' > prompt: > > `` > find vmlinuz-2.6.15-28-amd64-generic > find 2.6.15 > find 2.6.15 > find kernel > find <kernel> # I was getting desperate by this point > '' > > and none of them resulted in anything except "Error 15: File not found". > I think this tip requires just a little more detail to be useful.
You missed the "obvious" () one find /vmlinuz
The grub "find" command is only useful to find out which partition/device contains a file for which the precise absolute path is known. The partition must contain a filesystem that grub knows about of course.
Regards,
Kapil. --
Ben Okopnik [ben at linuxgazette.net]
On Tue, Oct 09, 2007 at 08:35:09AM +0530, Kapil Hari Paranjape wrote:
> Hello, > > On Mon, 08 Oct 2007, Ben Okopnik wrote: > > You've piqued my curiosity. I've just tried the following at the 'grub' > > prompt: > > > > `` > > find vmlinuz-2.6.15-28-amd64-generic > > find 2.6.15 > > find 2.6.15 > > find kernel > > find <kernel> # I was getting desperate by this point > > '' > > > > and none of them resulted in anything except "Error 15: File not found". > > I think this tip requires just a little more detail to be useful. > > You missed the "obvious" () one > find /vmlinuz
Too obvious, I guess.
> The grub "find" command is only useful to find out which > partition/device contains a file for which the precise absolute path > is known. The partition must contain a filesystem that grub knows > about of course.
So... is it actually useful for the stated purpose, then? As I recall from Martin's tip, it was supposed to "discover" the available kernel.
-- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
Kapil Hari Paranjape [kapil at imsc.res.in]
Hello,
On Tue, 09 Oct 2007, Ben Okopnik wrote:
> So... is it actually useful for the stated purpose, then? As I recall > from Martin's tip, it was supposed to "discover" the available kernel.
I imagine your question is rhetorical. In any case, the answer is "No".
The "find" command is a useful way to figure out which partition you want to boot from assuming that you "forgot" the correct name of the partition. For example, this can happen because grub's device names are different from the device names under linux.
Regards,
Kapil. --