[pocket-linux] GRUB in Pocket Linux

pocket-linux@ufo.chicago.il.us pocket-linux@ufo.chicago.il.us
Tue, 8 Jul 2003 19:11:29 EDT


--part1_1d2.d702e98.2c3ca9a1_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

PocketLinuxers:

Many distributions use GRUB as the bootloader program instead of LILO,
even though GNU hasn't officially released GRUB. Thus, an 
alternative/optional Chapter 2 of the Pocket Linux Guide using GRUB is appropriate. The required 
series of commands are listed below, assuming a floppy disk in /dev/fd0 and 
that GRUB is the bootloader on the host Linux OS.
 
bash# mke2fs -m0 /dev/fd0

bash# mount /dev/fd0 /mnt

bash# mkdir /mnt/boot

Comment: build the appropriate kernel

bash# cp /boot/vmlinuz /mnt/boot/vmlinuz

bash# mkdir /mnt/boot/grub

bash# cp /boot/grub/stage1 /mnt/boot/grub/stage1

bash# cp /boot/grub/stage2 /mnt/boot/grub/stage2

bash# cp /boot/grub/e2fs_stage1_5  /mnt/boot/grub/e2fs_stage1_5

bash# grub-install --root-directory=/mnt '(fd0)'

Comment: grub-install will ask if the device mapping is correct. If the line
(fd0) /dev/fd0 is present, all is well for our purposes.

bash# cd /mnt/boot/grub

Comment: Create the file menu.lst using your favorite editor. menu.lst is the
GRUB configuration file. Ours will be very simple.
-----------------------------------------------------------------------------
# /boot/grub/menu.lst - GRUB configuration file for Pocket Linux

color= light-gray/blue black/light-gray

title=bootdisk
    kernel (fd0)/boot/vmlinuz root=dev/fd0 mount=read-only vga=normal \ 
    init=/bin/sh load_ramdisk=1 prompt_ramdisk=1

# End of configuration file
------------------------------------------------------------------------------


bash# mkdir /mnt/dev

bash# cd /mnt/dev

bash# mknod fd0 b 2 0

bash# mknod console c 5 1

--part1_1d2.d702e98.2c3ca9a1_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<HTML><FONT FACE=3Darial,helvetica><FONT  SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=
=3D"Arial" LANG=3D"0">PocketLinuxers:<BR>
<BR>
Many distributions use GRUB as the bootloader program instead of LILO,<BR>
even though GNU hasn't officially released GRUB. Thus, an alternative/option=
al Chapter 2 of the Pocket Linux Guide using GRUB is appropriate. The requir=
ed series of commands are listed below, assuming a floppy disk in /dev/fd0 a=
nd that GRUB is the bootloader on the host Linux OS.<BR>
 <BR>
bash# mke2fs -m0 /dev/fd0<BR>
<BR>
bash# mount /dev/fd0 /mnt<BR>
<BR>
bash# mkdir /mnt/boot<BR>
<BR>
Comment: build the appropriate kernel<BR>
<BR>
bash# cp /boot/vmlinuz /mnt/boot/vmlinuz<BR>
<BR>
bash# mkdir /mnt/boot/grub<BR>
<BR>
bash# cp /boot/grub/stage1 /mnt/boot/grub/stage1<BR>
<BR>
bash# cp /boot/grub/stage2 /mnt/boot/grub/stage2<BR>
<BR>
bash# cp /boot/grub/e2fs_stage1_5&nbsp; /mnt/boot/grub/e2fs_stage1_5<BR>
<BR>
bash# grub-install --root-directory=3D/mnt '(fd0)'<BR>
<BR>
Comment: grub-install will ask if the device mapping is correct. If the line=
<BR>
(fd0) /dev/fd0 is present, all is well for our purposes.<BR>
<BR>
bash# cd /mnt/boot/grub<BR>
<BR>
Comment: Create the file menu.lst using your favorite editor. menu.lst is th=
e<BR>
GRUB configuration file. Ours will be very simple.<BR>
----------------------------------------------------------------------------=
-<BR>
# /boot/grub/menu.lst - GRUB configuration file for Pocket Linux<BR>
<BR>
color=3D light-gray/blue black/light-gray<BR>
<BR>
title=3Dbootdisk<BR>
    kernel (fd0)/boot/vmlinuz root=3Ddev/fd0 mount=3Dread-only vga=3Dnormal=20=
\ <BR>
    init=3D/bin/sh load_ramdisk=3D1 prompt_ramdisk=3D1<BR>
<BR>
# End of configuration file<BR>
----------------------------------------------------------------------------=
--<BR>
<BR>
bash# mkdir /mnt/dev<BR>
<BR>
bash# cd /mnt/dev<BR>
<BR>
bash# mknod fd0 b 2 0<BR>
<BR>
bash# mknod console c 5 1<BR>
</FONT></HTML>
--part1_1d2.d702e98.2c3ca9a1_boundary--