Grub does not boot with VGA option

I have run into a weird problem and I am hoping for some help in figuring out what the problem is, and maybe fix it, if possible.

Sorry for the long post, I tried to include details that seem relevant.

Specs:

openSUSE 11.4, 2.6.37.6-0.20-desktop i686 KDE 4.8.4

Background:

I was playing around with openSUSE 12.2 RC 1 in a virtual maching (Virtual Box). The disk image is on an external, encrypted, hard disk. I have found occasionally that the encrypted container (encrypted with cryptsetup) ‘half’-unmounts, that is while it is doing something I am prompted for the password again, but entering it returns an error message that the disk already exists, and so fails to mount. I have found the solution is to close the container manually using the command

  cryptseup luksClose <device id from /dev/mapper>  

This happened while virtual box was running. The command above, however, did not close the container as usual. I decided to reboot my machine, and issued a reboot command from a runlevel 3 console. However, it did not shutdown properly. It got the message that the machine was shutting down but it just hung there. Eventually I switched the machine off manually by keep the start button pressed down.

The problem:

Rebooting failed. I got the Grub menu as usual, hit enter for the 11.4 option (I only have that and the failsafe option). This is the option set at install, I haven’t modified it in any way. After hitting enter a few lines of text came up and then nothing, a blank screen. The backlight was on and the hardisk was spinning, but it seemed not to be being read. There was no activity of any kind; it was not that something was happening but the screen was just blank, the computer was just idle (but generating more heat than usual). Eventually I had to do another forced shutdown. It was not a fluke, the same thing happened several more times. I could boot off live CDs, and after trying various boot options I found that the problem was the VGA boot option that is default, on my machine, in the bootloader. The option is VGA=0x345. Indeed, having any VGA option in the option line led to the problem (so the ‘failsafe’ grub entry did not work either), but found that if I deleted that option the computer booted. So in Yast > Boot Loader I set the VGA mode to ‘text’ and now the computer boots, without a splash screen of course.

Finally, my question is: can any one help me figure out what went wrong? Would this have anything to do with my virtualbox session being interrupted, or the forced shutdown afterward? What I am particularly interested in figuring out is if this is a sign of a more serious problem.

Hi Brouwer2,

This sounds a bit like a hardware problem.
Is the contact of all cables (external and possibly internal) reliable ?
Does the external hard disk work well when connected to another PC ?

A question besides: why placing a disk image of openSUSE 12.2 RC 1 on an encrypted HD ?
You may have disk space problems, but in general that wouldn’t be the first place to think of.

This as well sounds like a hardware problem.

Your solution didn’t work - the system did hang at shutdown, and it didn’t reboot properly afterwards,
while booting fine beforehand, right?

So your 11.4 may have got corrupted, and one likely cause of this is your forced shutdown by cutting power supply.

Other possible causes like some process running wild, wouldn’t give any better prognosis.

In your case, personally I would re-install openSUSE, and seriously check whether your external HD really runs reliably.

Good luck
Mike

Yes, the vga option sometimes prevent X from starting - especially on old graphics cards. Here’s the kind of errors I see on a machine with nVidia GeForece4 MX 4000 (it’s old):


(EE) NVIDIA(0): Failed to allocate/map the primary surface!

Fatal server error:
AssScreen/ScreenInit failed for driver 0

The solution is to remove the option vga or set vga=normal (which comes to the same). Adding the “nopat” option might also help if you want to use framebuffer resolutions in console mode (it works for me). In this case you can keep vga. As weird as it might sound, using decimal rather than hex values already helped (I usually take 794 or 791).

However if you don’t boot in runlevel 3, the vga option is quite useless, and if KMS is enabled, it is ignored (more precisely it is turned off one second after boot).

Many thanks for your replies, ratzi and please_try_again,

A question besides: why placing a disk image of openSUSE 12.2 RC 1 on an encrypted HD ?

No mystery there. Basically, not enough space on my hard drive, the encryption is a coincidence as far as putting a virtual machine on it is concerned. I have a 2TB external disk for storage and backup which I put a password on when I first got it and now it has too much stuff on it to reformat without encryption. I had thought that if I ever need to use it away from home I might lose it or have it stolen in which case it will reduce the probability of personal data being available to just any one (I realise anyone intent on gaining access could probably do it quite easily, but this might deter anyone who just found it from digging around in it).

This sounds a bit like a hardware problem.
Is the contact of all cables (external and possibly internal) reliable ?
Does the external hard disk work well when connected to another PC ?

Actually this seems like a KDE problem. I have only had this happen when using KDE. When I used to use Gnome 2 this never happened - the disk stayed mounted until I unmounted it. With KDE however it happens that I will have mounted the disk, and at some point I’ll be prompted to re-enter my password. When I re-enter the password I get a message that the disk could not be mounted because the disk already exists, and indeed it is still listed in /dev/mapper. This disk still shows up in dolphin, and on some occasions it is even still mounted (that is despite being prompted for the password it is mounted and usable, I can dismiss the prompt and it works as expected), on other occasions it shows in the list but trying to access just throws up the password prompt. In this case I have to close the container using the luksClose command and remount it.

I have not had this happen in Gnome, and indeed not in at least one other distribution - Puppy Lighthouse using Joe’s Window Manager, but I have only really used it on the same machine for any length of time, so I can’t say for sure that it is not specific to my machine.

The external cables are all secure, and the disk never disappears, as though it had been unpluged, it is just that sometimes the luks container wants the password again, even though on some occasions it is not actually needed.

I wonder whether it has something to do with my KDE mount options?

Your solution didn’t work - the system did hang at shutdown, and it didn’t reboot properly afterwards,
while booting fine beforehand, right?

So your 11.4 may have got corrupted, and one likely cause of this is your forced shutdown by cutting power supply.

Are there any tests you can recommend to determine if such corruption did happen. I’m still new enough to linux that I haven’t yet learned about what diagnostic tools are available. I did a fsck, off a System Recovery live disk, and all the partitions were fine. With the vga=normal option it boots fine, and everything (seems to) work as expected. I guess something did get corrupted concerning the graphics, but I would like to avoid a fresh install (I just did one a few weeks ago) if possible.

Yes, the vga option sometimes prevent X from starting - especially on old graphics cards.

I’m using an IBM Thinkpad T60 (going on six years now - still has the IBM logo on it!) with ATI Radeon (I can’t remember exactly the details - not at home at the moment), but the graphics weren’t top flight even when I bought it. Still the default vga option had worked fine until this incident.

As weird as it might sound, using decimal rather than hex values already helped (I usually take 794 or 791).

However if you don’t boot in runlevel 3, the vga option is quite useless, and if KMS is enabled, it is ignored (more precisely it is turned off one second after boot).

I’ll try the decimal values and seen if that makes any difference, out of curiosity. I don’t mind seeing text instead of the splash screen, or having somewhat larger text for a few seconds, so if there aren’t any other serious problems I’m happy to have no vga option.

On 2012-07-17 17:36, Brouwer2 wrote:
> Actually this seems like a KDE problem. I have only had this happen
> when using KDE. When I used to use Gnome 2 this never happened - the
> disk stayed mounted until I unmounted it. With KDE however it happens
> that I will have mounted the disk, and at some point I’ll be prompted to
> re-enter my password. When I re-enter the password I get a message that
> the disk could not be mounted because the disk already exists, and
> indeed it is still listed in /dev/mapper. This disk still shows up in
> dolphin, and on some occasions it is even still mounted (that is despite
> being prompted for the password it is mounted and usable, I can dismiss
> the prompt and it works as expected), on other occasions it shows in the
> list but trying to access just throws up the password prompt.

I do not allow the desktop to mount encrypted filesystems: I do it manually, via fstab,
/etc/crypttab, and and script /etc/init.d/boot.crypto.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Hi Brouwer2,

the good message is that your system still seems to boot
(one could get a different impression from your previous post).

OK, let’s say you should just abstain from using the current version of KDE 4.

What exactly do you mean with ‘my KDE mount options’ here?

I’m just guessing now:
Does the problem occur, whenever the screen saver is started?
(just an idea, although I wouldn’t have an idea for a solution then).

Good luck
Mike

My apologies for the late reply.

Thanks for the tip robin_listas, I’ll look at trying to do it your way and see if things work better. Having the encrypted disk suddenly need the password, but re-entering it not doing anything is one of the minor annoyances I have had since switching to KDE. Fixing this would be really nice!

What exactly do you mean with ‘my KDE mount options’ here?

In KDE Configure Desktop > Removable Devices there are options for automounting removable devices. Presently I have it set to enable automatic mounting of removable media at login and when attached. I wonder whether that has anything to do with how the encrypted disk behaves on KDE. I’ll see if robin-listas’ suggestion helps (though since this problem occurs only every few weeks weeks it will take some time to test it).

I have to be honest, I am not sure what triggers this problem. It does not happen all that frequently, and I can’t isolate anything I was doing in common on all the occasions. It just seems that sometimes the volume wants the password again, but it is still mounted. The problem is that on pretty much every occasion it happens I am doing something else (i.e. not using the disk), and the password prompt does not interruppt whatever I am doing, it just sits there until I notice it.

OK, let’s say you should just abstain from using the current version of KDE 4.

Unfortunately this problem happened with 4.6 also (I skipped 4.7, so I can’t say anything about that), and giving up KDE is not an option (as in, I refuse to do it :slight_smile: - funny, I hated KDE when I first tried it, but thought I would give it another chance when I realised gnome 2 was not long for this world, and haven’t looked back since). Everything seems to be working normally now; chances are that both the (now resolved) booting problem and the problem with the encrypted disk have to do with a missing line in config file, or something just as simple, which is why I am interested in isolating the cause(s) of the two problems.