How to install grub on an Empty HDD?

I wanna install grub/grub2 on my empty hard disk drive.
For that I boot my machine from ubuntu 10.04 Live OS
and tried to install it but failed.

So what to do now ?

Also I think some toolset , if I want to boot the vanilla Linux kernel (please suggest me the link for that) ,

So after I've installed the grub and required tool-set , (the one suggested by you, if any) then, all that I've to do is to just extract the kernel and boot it from that device or more procedure ?

Hi
Try make disc bootable(by bios, setup) and install next.
Bye

specifically speaking my purpose to ask this question ,
I want to install grub [and also some tool sets] and then I want to boot from just the extracted vanilla Linux kernel, residing on my pen drive

Now what to do ?

Hi,
Might be the following situations:
1st your BIOS is not looking for USB devices
2nd your bios for a device on USB, is your memory stick, you can not set the bios to boot from this device
3rd your bios is looking for USB devices, and is your memory stick, you can set boot from pendrive.

Solutions:
If Ist You need to create or use existing boot device. On bootable disk, you must create a bootable sector. You ought to put stage1 and stage2 on exist or new ext filesystem or on FAT16 or on fat32.

If 2nd You need to create a bootable sector on the disk and you can specify sets stage1 and stage2 on pendrive.(Or you can do as 1st).

if 3rd You can create a bootable sector on the flash drive and rely on the collections stage1 and stage2 on a pendrive

All the doc about installation you can find.

Bye.

thanks.
all that i've tried is as followings ...

I don't know how to get the name like /dev/sda or /dev/sda1 for my pendrive labeled "LOCALDISK".

so i tried as a root user

mount -t /media/LOCALDISK                     # just to be safe
grub-setup /dev/sda
grub-install /dev/sda

should i try ?

# grub-install --root-directory=/boot /dev/sda
root@aarsh-desktop:/# grub-install --root-directory=/boot /dev/sda
[and the ouput of the above command was...]
Installation finished. No error reported.
This is the contents of the device map /boot/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)	/dev/fd0
(hd0)	/dev/sda
(hd1)	/dev/sdg

Additionally,
I put the Linux kernel (.tar.gz) into my pen drive. And choose extract here from right click menu.
and then deleted the compressed .tar.gz Linux.

So that's it I've done so far..

And it resulted into an instable system,
just showing me grub menu each time I boot, no matter the pen-drive is plugged or not.

so i wanna send you a snap shot of that, so how can i do that ?

Am I reading this right? You want to configure a drive that has GRUB on it but no kernel. Then you want use GRUB to boot from a Linux kernel that is on a pen drive into that drive.

to install grub to USB

grub-install --root-directory=/media/LOCALDISK /dev/sdg

---------- Post updated at 06:05 PM ---------- Previous update was at 05:45 PM ----------
If your BIOS can't boot from USB

You must create filesystem ext type /boot on your HDD. This filesystem you see as /dev/sda1.

grub-install (hd0,0)

you can hiddden partition (hd0,0)

 parttool (hd0,0) hidden- 

Now you can install Windows or other system

I'm afraid UBUNTU grub hasn't command partool.

1 Like

My procedure might be wrong, but I want to install GRUB on the pen-drive that's clear , but I want the Kernel to be booted from my pendrive, too. For that I think I've to just put the extracted the kernel on my pen drive.

-------------

Last Line:
Is this simple looking idea is so complicated, or it lacks my experience with such things ??

---------- Post updated at 10:29 PM ---------- Previous update was at 10:18 PM ----------

how to make the disk [pendrive] boot-able ?:confused:

Go to "Advanced BIOS features"
Go to the "1st Boot device" and set to "USB disk" or "USB HDD" or sometimes may "USB-Stick" or "USB memory stick" or "USB-ZIP"

1 Like