Difference between revisions of "Ubuntu Xen System Boot Hangs After Setting System Clock Message"

From Virtuatopia
Jump to: navigation, search
(New page: After installing the Ubuntu xen-server packages and rebooting the operating system using the Xen kernel the boot process appears to hang after displaying the "Setting system clock..." mess...)
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
After installing the Ubuntu xen-server packages and rebooting the operating system using the Xen kernel the boot process appears to hang after displaying the "Setting system clock..." message.
 
After installing the Ubuntu xen-server packages and rebooting the operating system using the Xen kernel the boot process appears to hang after displaying the "Setting system clock..." message.
  
This is a problem related to the hwclock binary which is common to a number of different Linux distributions in addition to Ubuntu.
+
This is a problem related to the ''hwclock'' binary which is common to a number of different Linux distributions in addition to Ubuntu. This problem can occur both when booting the host Xen system and when launching guest (domainU) systems.
  
The cleanest way to prevent this problem from occuring on an Ubuntu system is to edit the following system initialization files:
+
If the problem is encountered when booting the host system with a Xen enabled kernel, boot the system with the standard (i.e. non-Xen) and run the following commands:
  
 +
<pre>
 +
sudo su
 +
update-rc.d -f hwclock.sh remove
 +
update-rc.d -f hwclockfirst.sh remove
 +
</pre>
 +
 +
If the problem is occurring in a Xen domainU system, an option is to simply edit the same two system initialization files. The first step is to mount the root filesystem of the guest using the loopback interface. For example, if the root filesystem resides on a disk image it may be mounted at /tmp/mnt as follows:
 +
 +
<pre>
 +
mkdir /tmp/mnt
 +
sudo mount -o loop UbuntuXen.img /tmp/mnt
 +
</pre>
 +
 +
Alternatively, if the domainU root filesystem resides on a physical disk partition (in this example /dev/sdb1), the mount command might read as follows:
 +
 +
<pre>
 +
mkdir /tmp/mnt
 +
sudo mount -o loop /dev/sdb1 /tmp/mnt
 +
</pre>
 +
 +
Once the domainU root filesystem is mounted, edit the following files:
 +
 +
<pre>
 
init.d/hwclockfirst.sh   
 
init.d/hwclockfirst.sh   
 
init.d/hwclock.sh
 
init.d/hwclock.sh
 +
</pre>
  
 
and place a exit 0 line immediately after the #!/bin/sh. For example:
 
and place a exit 0 line immediately after the #!/bin/sh. For example:
  
 +
<pre>
 
#!/bin/sh
 
#!/bin/sh
 
exit 0
 
exit 0
 +
</pre>
 +
 +
Once one of these sets of changes has been made to both the hwclockfirst.sh and hwclock.sh, files simply unmount the domainU root filesystem  and the guest Ubuntu system should boot fully without hanging.
  
Once this change has been made to both the hwclockfirst.sh and hwclock.sh files simply reboot the system and Ubuntu should boot fully without hanging.
+
[[Category:Virtualization Problem Solutions]]

Latest revision as of 21:11, 28 March 2009

After installing the Ubuntu xen-server packages and rebooting the operating system using the Xen kernel the boot process appears to hang after displaying the "Setting system clock..." message.

This is a problem related to the hwclock binary which is common to a number of different Linux distributions in addition to Ubuntu. This problem can occur both when booting the host Xen system and when launching guest (domainU) systems.

If the problem is encountered when booting the host system with a Xen enabled kernel, boot the system with the standard (i.e. non-Xen) and run the following commands:

sudo su
update-rc.d -f hwclock.sh remove
update-rc.d -f hwclockfirst.sh remove

If the problem is occurring in a Xen domainU system, an option is to simply edit the same two system initialization files. The first step is to mount the root filesystem of the guest using the loopback interface. For example, if the root filesystem resides on a disk image it may be mounted at /tmp/mnt as follows:

mkdir /tmp/mnt
sudo mount -o loop UbuntuXen.img /tmp/mnt

Alternatively, if the domainU root filesystem resides on a physical disk partition (in this example /dev/sdb1), the mount command might read as follows:

mkdir /tmp/mnt
sudo mount -o loop /dev/sdb1 /tmp/mnt

Once the domainU root filesystem is mounted, edit the following files:

init.d/hwclockfirst.sh  
init.d/hwclock.sh

and place a exit 0 line immediately after the #!/bin/sh. For example:

#!/bin/sh
exit 0

Once one of these sets of changes has been made to both the hwclockfirst.sh and hwclock.sh, files simply unmount the domainU root filesystem and the guest Ubuntu system should boot fully without hanging.