Running GRUB at its prompter
Hi to all!
PROBLEM: To load various installed OSs by a GRUB loader which is installed in MBR but does not know where to load from. So, just after booting attempt, the user will get the "grub> " prompt and should provide GRUB with needed information, at command line. REFERENCE: Chapter 4 of GRUB manual at <http://www.gnu.org/software/grub/manual/grub.html>. WHAT DOES WORK FINE: Loading unsupported OSs (such as Windows) according to manual's recipe at Section 4.1.2 Code:
grub> rootnoverify (hd0,0) Code:
grub> root (hd0,1) WHAT THE ERROR MESSAGE IS: The "grub> boot" command does launch the boot process but that process stops after a while with the following message Code:
VFS: Cannot open root device "hda5" or 03:05 Any idea (on how to load Linux OSs at "grub> " prompt) would be gratefully appreciated. |
If your /dev/hda5 is an extended partition, with root /, swap, and /home partitions inside the extended partition, then root / is probably /dev/hda6, swap is probably /dev/hda7, and /home is probably /dev/hda8, if they are in the order you listed then in your post.
You should edit the kernel line, specifically root=/dev/hda5 to read root=/dev/hda6 (the root partition). The example in the manual is just that, an example. It is not meant to be an absolute parameter for all Linux installations. Examples from manuals must be edited to show the actual setup of your own installation. |
Quote:
and thanks for your answer. However I did work absolutely correct (though posted differently, please do excuse me for that!) in that my real setting is the following: extended partition /dev/hda3 (not /dev/hda5) with root partition / named indeed as /dev/hda5 (once again, I bag apologise for reporting the extended partition as /hda5 instead of /hda3). Therefore my root partition is /dev/hda5 indeed and the command I used Code:
grub> kernel /vmlinuz-2.4.27-2-386 root=/dev/hda5 ro Code:
kernel file Therefore the problem I posted remains unanswered. Thanks again! |
For those booting Grub manually in Grub prompt I want to share a secret with you. You can boot any system with these 3 lines
root (hdi,j) chainloader +1 boot Any system=DOS, Win3x, Win9x, 2k, XP, any Linux, any BSD and Solaris. The "ONLY" thing you need is to do is to have the boot loader at the root partition of every operation system. i=disk No. and j=partition No. remember Grub counts from 0 For DOS, Win3x, Win9x, 2k, XP, any BSD and Solaris this is automatically arranged when you intsall the software. For Linux it normally gives you 3 choices for the boot loader (1) MBR (2) root partition (3) a Floppy (not always offered ) The (2) can always be replicated later when you are in that Linux by typing gub-install /dev/hdax for Grub and x=partition No. (use sdax for Sata) lilo -b /dev/hdax for Lilo The manual booting process can be automated by amending the /boot/grub/menu.lst but the above 3 lines have to changed slightly to title this is my system in hda9 # using hda9 as example root (hd0,8) chainloader +1 ----------------------- Typing the kernel is another method to boot is one method but can't be applied to a system foriegn to Grub (without a kernel like M$ Windows). The other method described by the above is "chain loading". It is generic and usable on all systems. |
Quote:
Thanks again for the trick and thanks in advance for other tests or remarks! |
Hda5 is the 1st logical partition in the hdd. Your hda3 extended partition is a box containing all the logical partition. An extended partition has no usable space. It is just a border boundary! If you have only one logical partition then hda3 should be indentical in size and cylinder numbers to hda5.
If you are working in Grub prompt, type help to see the commands available. "unhide" is one of the commands available You can use unhide (hd0,4) to unhide your hda5. It will be bootable if it has a boot loader inside hda5. Grub can only pull any system up if that system is bootable originally. Grub can't repair it. I am not telling tricks here. All the bits I described on Grub can be read in the Grub Manual. |
I will insist to understand your trick, grateful thanks!
|
All times are GMT -5. The time now is 03:39 PM. |