Hey guys, lets get this right.
A Linux can be booted without its boot loader installed. It is easier if it got one because there would be instruction left on how it is booted.
A Grub prompt, which can be obtained from a floppy, USB pen drive and CD preloaded with Grub, is all that is needed to fire up a Linux. You can even get
a Grub prompt from some Live CDs.
I define a Grub prompt before Grub load a system. If you get a Grub shell after loading a Linux the Grub inside can not be used for booting.
Assuming the Linux has no boot loader it must have a kernel in /boot. Some times an initrd file too. These two files are always in pairs with the same tail in the file names so pretty easy to identify by booting up a Live CD and mount its /boot.
These lines below are pretty standard for firing up any Linux distro. It may not always work but pretty reliable in my experience. Say you have find out its /boot is in the 3rd partition of first disk (hd0) so /boot is known to Grub as (hd0,3) and in Linux convention as sda4. You also need the root partition too which I assume to be sda6. I prefer /boot and / partition to be the same device but they can be different.
Code:
root (hd0,3)
kernel /boot/<kernel name> ro root=/dev/sda6
initrd /boot/<initrd name>
boot
Slackware family has great ready-make large kernels, with a standardized name "vmlinuz" and does not use initrd in the distribution. So you can source its kernel, say in partition (hd1,9), to boot you Linux in sda6 by
Code:
root (hd0,3)
kernel (hd1,9)/boot/vmlinuz ro root=/dev/sda6
boot
----------------------------------------------------------
Steps to make a USB pen drive boot up to a Grub prompt
(1) Boot up a Linux Live CD that has Grub
(2) Find out where it hide Grub's stage1 and stage2 by command "find / -name stage1"
(3) Plug in the USB drive, mount it and create a /boot/grub directory
(4) Copy stage1 and stage2 into this newly created directory.
(5) Assuming the pen drive is detected as disk (hd1) and has only one partition inside then invoking a Grub shell inside the boot-up Live CD Linux to set up Grub by commands
Code:
grub
root (hd1,0)
setup (hd1)
Leave the pen drive there, reboot, take the CD out, instruct the Bios to boot USB pen drive first and you will be greeted by a Grub prompt.
---------------------------------------------------
To make a bootable Grub CD
Follow Chapter 3.4 of Grub Manual. It is just copying one file and using mkisofs command.
Alternatively use the selected Live CD I mentioned above.
-----------------------------------------------------
Enjoy Grub prompt.
Do me a favour in return. Let me know if you find an installed PC system that cannot be booted up by it, as I have been searching for years but still could find one.