GRUB Legacy: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Add GRUB category
m Bot: Replace deprecated source tag with syntaxhighlight
Line 44:
GRUB will boot into its command shell. (If your system does boot from hard drive instead, check your BIOS boot drive settings.) When the <code>grub ></code> prompt appears, remove the auxiliary disk from the drive and replace the boot disk. From the GRUB shell, you can now complete the installation on the boot disk:
 
<sourcesyntaxhighlight lang="bash">
install (fd0)/boot/stage1 (fd0) (fd0)/boot/stage2 (fd0)/boot/menu.cfg
</syntaxhighlight>
</source>
 
The parameters tell GRUB:
Line 79:
If you need to mount your USB device: (Exchange <code>sdb1</code> with your device name.)
 
<sourcesyntaxhighlight lang="bash">
mkdir /mnt/sdb1
mount /dev/sdb1 /mnt/sdb1
</syntaxhighlight>
</source>
 
Create required directories:
 
<sourcesyntaxhighlight lang="bash">
mkdir /mnt/sdb1/boot
mkdir /mnt/sdb1/boot/grub
</syntaxhighlight>
</source>
 
Locate the <code>stage1</code>, <code>stage2</code>, and <code>*_stage1_5</code> files:
 
<sourcesyntaxhighlight lang="bash">
find / -name stage1
</syntaxhighlight>
</source>
 
Copy stage1 and stage2 files, <code>/usr/lib/grub/</code> is an example location, use the location returned by the find command:
 
<sourcesyntaxhighlight lang="bash">
cp /usr/lib/grub/stage1 /mnt/sdb1/boot/grub/stage1
cp /usr/lib/grub/stage2 /mnt/sdb1/boot/grub/stage2
</syntaxhighlight>
</source>
 
For FAT formatted USB device use:
 
<sourcesyntaxhighlight lang="bash">
cp /usr/lib/grub/fat_stage1_5 /mnt/sdb1/boot/grub/fat_stage1_5
</syntaxhighlight>
</source>
 
For ext2 formatted USB device use:
 
<sourcesyntaxhighlight lang="bash">
cp /usr/lib/grub/e2fs_stage_1_5 /mnt/sdb1/boot/grub/e2fs_stage_1_5
</syntaxhighlight>
</source>
 
Then execute the GRUB install application:
 
<sourcesyntaxhighlight lang="bash">
sudo grub
</syntaxhighlight>
</source>
 
Enter the following commands:
 
<sourcesyntaxhighlight lang="bash">
root (hd1,1)
setup (hd1)
quit
</syntaxhighlight>
</source>
if you don't know where your kernel is, you can use the command "find /boot/grub/e2fs_stage_1_5" to get the parameters which would be used in the command root (sdb1,1) and setup (sdb1).
 
Line 146:
Run
 
<sourcesyntaxhighlight lang="bash">
./configure --help
</syntaxhighlight>
</source>
 
to see a list of options. In my case, I use Netgear tulip cards, so I execute:
 
<sourcesyntaxhighlight lang="bash">
./configure --enable-tulip
make
make install
</syntaxhighlight>
</source>
 
You may want to consider using the <code>--prefix</code> option if you don't want to overwrite your existing GRUB install or do not have root access.