bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixing the "grub loading stage1.5" hanging error


From: Tracy Kirk
Subject: Re: fixing the "grub loading stage1.5" hanging error
Date: Tue, 30 Oct 2007 07:04:39 -0600

To answer your question, no, we are not umounting before installing grub, and yes, we are syncing after installing grub.

 

Here is the process that we are following to install grub.

It used to be a lot simpler, but we keep adding changes in an attempt to resolve the problem we are seeing with the corrupt stage2 file.

For example, the extra “setup (hd0,0)” was added.

However unlikely, we even added the extra sleep at the end, in case journaling was the issue.

After installing grub, the system is rebooted and it goes through the natural shutdown process, including unmounting the disk.

 

#!/bin/sh

if [ -d /boot/grub -a -d /usr/local/lib/grub/i386-pc ] ; then

            mv /boot/grub /boot/grub.old

            mkdir -p /boot/grub

            cp -f /usr/local/lib/grub/i386-pc/* /boot/grub/

            cp -f /boot/grub.old/menu.lst /boot/grub/

            /usr/local/sbin/grub-set-default 0

            sync

else

            echo "Can not find grub stage files and such that we need for installing..."

fi

/usr/local/sbin/grub --batch --device-map=/boot/grub/device.map --config-file=/boot/grub/menu.lst <<EOT

root (hd0,0)

setup (hd0,0)

setup (hd0)

quit

EOT

if [ -d /boot/grub.old ] ; then

            rm -rf /boot/grub.old

fi

touch /tmp/.REBOOT

/bin/sync

# Wait for journaling on ext3.

sleep 6

exit 0

 

tracy kirk | senior firmware engineer
____________________________

Control4
11734 South Election Road
Salt Lake City, Utah 84020-6432
United States
p. 801.523.3150  
f. 801.523.3199

e. address@hidden
w. www.control4.com



This message (including any attachments) contains confidential information intended for a specific individual and purpose and is protected by law. If you are not the intended recipient, please delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it is strictly prohibited.

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]