http://www.Linux-Boot.net


Linux-Boot.net

BIOS
CPU Arch

MBR
Boot Stages
Boot Squence
Boot Errors

BootSplash
KDE Splash
FrameBuffer

Booting
Boot-Loaders
SysLinux
Grub
Lilo


RootFS-HOWTO
RootFS-Config
RootFS-HOWTO


InitRD-HOWTO
InitRD
InitRD-Config
InitRD-HOWTO

Creating initrd.gz
RamDisk
Loop

Viewing initrd.gz


Obsolete
initrd/rootfs Scripts

Old Scripts


initrd HOWTO Scripts
rootfs HOWTO Scripts
( Bootable CF, USB, FD, CD )
Standalone Boot
/boot
InitRD
RootFS
Patches


Boot Media
CD-Boot
Floppy-Boot
USB-Boot
Compact-Flash-Boot
Network-Boot
DOS


Chroot


Forgot Root PassWord


CDRW HOWTO



1U Rackmount Chassis

Custom-Chassis.com

Linux-1U.net

1U-ITX.net


ITX-Blades.net


Small PC cases

Mini-Box.net

Wrap-Box.net

Wrap-OS.net


Wan-Sim.net



Linux-Consulting.com

Linux-CAE.net

Linux-Sec.net

Linux-Boot.net

Linux-Backup.net

Linux-Wireless.org

Linux-Office.net

Linux-Video.net

Linux-VOIP.net

Linux-Jobs.net

Linux-Diff.net

1U-Raid5.net

Linux-Howto.net


Spam Reporting



Free Linux CDs

ISO9660.org

Distro-CD.org

Patch-CD.org




Contact



Linux is a registered trademark of
Linus Torvalds

More Linux Legalese


Grub-Howto

Grub Stages
    PixelBest.org Grub vs Grub2 ( local copy )

  • stage-1 -- only used to get info to boot stage-2
  • stage-2 -- boot menu, etc
  • stage-xx

  • some distro incorrectly uses /usr/lib instead of the correct /boot/grub

Re-Installing Grub
  • your /dev/hda disk doesn't boot and you have /boot/grub/menu.lst configured

  • Boot off any other boot media
      root# mount /dev/hda1 /mnt/test
      root# chroot /mnt/test grub-install /dev/hda
      reboot and it should now boot off /dev/hda

Making a Grub Boot CD

Making a Grub Boot Floppy
  • Save the Current MBR to /boot/grub first
      dd if=/dev/hda of=/boot/grub/boot.mbr bs=512 count=1

  • Create a Simple Grub Boot Floppy
      dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
      dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1

  • Create the Grub Boot Floppy

      #
      # Create a Grub Boot Floppy
      #
      # Low level format ( fdformat or superformat )
      #
      fdformat /dev/fd0u1440
      #
      # format the boot floppy ( mformat or mkfs -t msdos )
      mkfs -t msdos /dev/fd
      #
      # Mount the boot floppy
      mount /dev/fd0 /media/floppy
      #
      #
      # Where grub likes to live
      mkdir -p /media/floppy/boot/grub
      #
      # copy the boot files to floppy
      cp -p /boot/grub/stage1 /media/floppy/boot/grub
      cp -p /boot/grub/stage2 /media/floppy/boot/grub
      cp -p /boot/grub/menu.lst /media/floppy/boot/grub
      cp -p /boot/grub/device.map /media/floppy/boot/grub
      cp -p /boot/message /media/floppy/boot/grub
      #
      sync
      umount /media/floppy
      #
      # End

  • Start Grub in interactive mode

      Linux-Boot.net Grub-Install-Boot.sh

      grub
      grub> device (fd0) /dev/fd0
      grub> root (fd0)
      grub> setup (fd0)
      grub> quit

  • Use Grub in batch mode

      grub --batch --device-map=/dev/null << EOF
      device (fd0) /dev/fd0
      root (fd0)
      setup (fd0)
      quit
      EOF

  • Reboot and watch the "boot status dots"

Grub Config Options


Copyright © 2000
Linux-Consulting
All Rights Reserved.
Updated: Tue Sep 12 23:12:44 2006 PDT