Page 1 of 2

Ubuntu won't restart

Posted: Tue May 26, 2009 1:35 pm
by xMatx
Hi,

I've installed Ubuntu 9.04 and am having problems restarting it. It goes to a black screen with the text "Restarting system" and then nothing. If i enter "sudo shutdown -r now" from the terminal then the same happens.

I installed 9.04 because 8.04 doesn't recognise my 500 gb internal drive but 8.04 also won't reboot (tested from the live cd).

In both cases, shutting down works fine, it is just restarting that hangs (during the shutdown process).

Any ideas or does it sound like a hardware or BIOS problem?

Thanks,
Mat

Re: Ubuntu won't restart

Posted: Tue May 26, 2009 2:10 pm
by Denis
You need to build custom kernel instead generic. Download kernel sources, open arch/x86/kernel/reboot.c file, find quirks section and add this:

Code: Select all

		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
			DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
		},
	},
+	{	/* Handle problems with rebooting on CompuLab SBC-FITPC2 board */
+		.callback = set_bios_reboot,
+		.ident = "CompuLab SBC-FITPC2",
+		.matches = {
+			/* Currently the DMI info is not customized and indicates 
+                        * OEM need change that */
+			DMI_MATCH(DMI_SYS_VENDOR, "CompuLab"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "SBC-FITPC2"),
+		},
+	},
Compile kernel with CONFIG_X86_REBOOTFIXUPS=y
(Processor type and features->Enable X86 board specific fixups for reboot)

Good article about custom kernels here: https://help.ubuntu.com/community/Kernel/Compile

Re: Ubuntu won't restart

Posted: Wed May 27, 2009 12:55 am
by tkmedia
I was able to install 0804 by using boot parameter.
all_generic_ide iirc.


Tim

Re: Ubuntu won't restart

Posted: Wed May 27, 2009 9:55 am
by xMatx
Thanks for the tips. I will have a go at it this weekend :)

Re: Ubuntu won't restart

Posted: Fri Jun 26, 2009 8:57 am
by dejot
hi!

any experiences yet? i am facing the same problem and still look for the best way to solve it.

dejot

Re: Ubuntu won't restart

Posted: Sat Jun 27, 2009 4:29 pm
by dejot
thanks denis, the patch works like a charm (on debian 5.0).

dejot

Re: Ubuntu won't restart

Posted: Sat Jul 11, 2009 1:11 pm
by Kleborp
There's an easier fix for this, after looking at the patch and related code I found the following comment:

Code: Select all

/*
 * Some machines require the "reboot=b"  commandline option,
 * this quirk makes that automatic.
 */
static int __init set_bios_reboot(const struct dmi_system_id *d)
{
        if (reboot_type != BOOT_BIOS) {
                reboot_type = BOOT_BIOS;
                printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
        }
        return 0;
}
This is the callback function that is called when the fit-pc board is detected by the patch and, as the comment states, it does the same as adding 'reboot=b' to the kernel command line.

So simply adding 'reboot='b at the end of the kernel line in the grub configuration (/boot/grub/menu.lst or grub.conf) does the trick, like I did for Arch's 2.6.30 kernel:

Code: Select all

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/mapper/vg00-root ro reboot=b
initrd /kernel26.img
Rebooting works just fine with this option :)

Re: Ubuntu won't restart

Posted: Sat Jul 11, 2009 4:13 pm
by Mylife
THANK YOU SOOOOO MUCH ! :D
(And thank you Mr. Open-Source to ... open the source)

For Ubuntu users (Ubuntu 9.04 - kernel 2.6.28-13), if you want this option to be kept even if installing another kernel, you might possibly do this :

1) Open menu.lst :
$ sudo gedit /boot/grub/menu.lst
Find the ligne "# defoptions=quiet splash" in order to add the smart option (keep the line commented) :
# defoptions=quiet splash reboot=b

2) Save and close gedit and type :
$ sudo update-grub
And eventually :
$ sudo halt
==> Last shutdown before entering a reboot time era (except if you forget to switch you fit-PC on :lol: )

Re: Ubuntu won't restart

Posted: Sat Jul 11, 2009 8:34 pm
by DWORD
Thanks a lot, the reboot=b option works perfectly! :) I had the same problem with Ubuntu Server 9.04.

Re: Ubuntu won't restart

Posted: Sun Jul 12, 2009 12:13 pm
by madgrt
Kleborp wrote:There's an easier fix for this, after looking at the patch and related code I found the following comment:
Thank-you and well done Kleborp!
A very nice fix until the Ubuntu kernel is patched. Have you submitted the bug fix to them yet?