human choroinic gonadotropin

GGTSdotNET

The notes of a madman

Archive for March, 2007

CentOS 4.4 Hangs at GRUB on initial boot

Posted by grigsby on March 21, 2007

New CentOS 4.4 i386 hangs on boot with only “GRUB ” displayed on screen. Seems this the installer doesn’t correctly install grub if the root drive is a RAID1. Here is the fix I used:

Boot off the install CD in rescue mode. Chroot to the freshly installed image.

chroot /mnt/sysimage

Install root on both drives.

# grub
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd0)
Checking if “/boot/grub/stage1” exists… yes
Checking if “/boot/grub/stage2” exists… yes
Checking if “/boot/grub/e2fs_stage1_5” exists… yes
Running “embed /boot/grub/e2fs_stage1_5 (hd0)”… 16 sectors are embedded.
succeeded
Running “install /boot/grub/stage1 (hd0) (hd0)1+16 p
(hd0,0)/boot/grub/stage2 /boot/grub/grub.conf”… succeeded
Done.

grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd1)
Checking if “/boot/grub/stage1” exists… yes
Checking if “/boot/grub/stage2” exists… yes
Checking if “/boot/grub/e2fs_stage1_5” exists… yes
Running “embed /boot/grub/e2fs_stage1_5 (hd1)”… 16 sectors are embedded.
succeeded
Running “install /boot/grub/stage1 (hd1) (hd1)1+16 p
(hd1,0)/boot/grub/stage2 /boot/grub/grub.conf”… succeeded
Done.

grub> quit

Now Exit and reboot. This should resolve the issue.

Here is a related bug: http://bugs.centos.org/view.php?id=1031

Create local CentoOS repo

Posted by grigsby on March 12, 2007

mount /media/cdrom
rpm ––import /media/cdrom/RPM-GPG-KEY-centos4
yum localinstall /media/cdrom/CentOS/RPMS/createrepo-0.4.3-1.noarch.rpm
mkdir /var/local/dvd.repo
cd /var/local/dvd.repo
ln -s /media/cdrom/CentOS/RPMS RPMS
createrepo ./
vi /etc/yum.repos.d/dvd.repo

The dvd.repo file looks like:

[dvd]
name=Local DVD
baseurl=file:///var/local/dvd.repo
enabled=0

Then you can:

yum ––disablerepo=* ––enablerepo=dvd list
yum ––disablerepo=* ––enablerepo=dvd install kernel-devel
yum ––disablerepo=* ––enablerepo=dvd install gcc
umount /media/cdrom