How to install grub on an Empty HDD?


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu How to install grub on an Empty HDD?
# 1  
Old 07-03-2010
Error 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 ?
# 2  
Old 07-04-2010
Hi
Try make disc bootable(by bios, setup) and install next.
Bye
# 3  
Old 07-05-2010
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 ?
# 4  
Old 07-05-2010
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.
# 5  
Old 07-05-2010
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
Code:
mount -t /media/LOCALDISK                     # just to be safe
grub-setup /dev/sda
grub-install /dev/sda

should i try ?
Code:
# grub-install --root-directory=/boot /dev/sda

Code:
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 ?

Last edited by Scott; 07-05-2010 at 08:50 AM.. Reason: Code tags, please...
# 6  
Old 07-05-2010
Quote:
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
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.
# 7  
Old 07-05-2010
if your bios can boot from USB

to install grub to USB
Code:
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.
Code:
grub-install (hd0,0)

you can hiddden partition (hd0,0)
Code:
 parttool (hd0,0) hidden-

Now you can install Windows or other system

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

Last edited by john1212; 07-05-2010 at 02:00 PM..
This User Gave Thanks to john1212 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Debian

Cannot install GRUB

Hello, I cannot install grub to my ESP it seems. I have a PC with both Windows 8.1 and Debian installed and I can only boot into Windows since GRUB is not installed on my PC. I am using a Ubuntu Live USB to install GRUB on /dev/sda1 (my ESP). I am using the following commands from Ubuntu... (12 Replies)
Discussion started by: sreyan32
12 Replies

2. AIX

IBM AIX Internal HDD vs SAN HDD and Oracle

Hi Folks, I am facing an issue with the performance. P4 with 1 processor and 16 GB RAM and SAN HDD = Oracle report takes 25 minutes P5 with 2 processors and 16 GB RAM internall HDD with LPAR = Oracle Report takes 1 hour 15 minutes ( please note I have assigned all the max processors and... (7 Replies)
Discussion started by: filosophizer
7 Replies

3. Solaris

Install ssd hdd on Solaris 5.8

Hi, I want to install an SSD on my hdd ULTRA SPARK 10 with solaris 5.8. I can not format it because to complete the operation is necessary to enter the number of sectors and cylinders ... I also tried to make a copy disk2disk but goes wrong ... someone has an idea? Has anyone ever done such a... (0 Replies)
Discussion started by: stirux
0 Replies

4. Red Hat

Can we specify which grub.conf to use in grub-install.

Hi, Can we specify which grub.conf to use while installing grub on RHEL. We are working on application which requires different grub configurations needed, depending on certain criteria we need to update grub with correct grub.conf. Can we use grub-install for this purpose? (4 Replies)
Discussion started by: successlin
4 Replies

5. Boot Loaders

How to install grub on USB flash drive?

I wanna install grub on my flash drive for rescue usage. My computer installs winxp, and I have fedora12 installed in vmware. I did like this: step1: format the flash drive as FAT in winXP. step2: in fedora12, mount the flash drive on /media/flash step3: excute the command: grub-install... (10 Replies)
Discussion started by: vistastar
10 Replies

6. Ubuntu

Lucid AMD 64 install on USB HDD reboots frequently

Hi all, I am using Ubuntu lucid. It is installed on external USB HDD and I boot into it. Besides other issues, the most significant one is as follows.. I boot in and start working. Everything goes on fine. As soon as I move the HDD, change its position, etc, all icons tuns into a red... (1 Reply)
Discussion started by: morningSunshine
1 Replies

7. SCO

Install GRUB on SCO Unixware 7.1.1

Hi, I am trying to install the linux boot loader (GRUB) on a non-linux machine (Unixware 7.1.1). The thing is I want to boot the linux kernel (vmlinuz) and the linux ram disk (initrd.img) from unixware and boot the machine with it. Does anyone have a good way to do this? (10 Replies)
Discussion started by: teen_racer19
10 Replies

8. UNIX for Dummies Questions & Answers

Old HDD copy to new HDD ? im lost...

Over the last few months the HDD spins louder and louder, so I fiqured its time to replace the HDD. Its been running 24/7/365 since 98 :eek:. yes i said since 98 :D I have an IBM system 43P Model 240. 233 MHz. running AIX Version 4. The current HDD is an IBM DGHS COMP IEC -950 FRU PN#... (5 Replies)
Discussion started by: Chevy89rocks
5 Replies

9. Linux

HDD not recognised while trying to install Linux enterprise on HP laptop

Hi, Can anyone give me the clue to my problem which is hdd not recognised when l tried to install linux enterprise edition on my laptop HP compaq nc6320 centrino. thanxs (6 Replies)
Discussion started by: kayode
6 Replies

10. UNIX for Dummies Questions & Answers

grub problem- keeps rebooting as soon as it tries to do grub

Hi, I installed solaris 10 a few weeks ago. It was working fine during the past two weeks. However, now when I start to load to the drive, I get this problem: The BIOS screen comes up like normal, then screen goes blank and a message "Grub loading stage 2" flashes real quick then the computer... (1 Reply)
Discussion started by: moesays
1 Replies
Login or Register to Ask a Question