[karmic] Grub Menu Lost, need to manually mount virtual disk

Bug #484799 reported by jwesleycooper
66
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Wubi
Confirmed
Undecided
Unassigned

Bug Description

Grub has completely lost it's menu, and I'm just getting a sh:grub> command prompt Worse still, I can find NO REFERENCE to how I can manually mount the virtual disk and load the kernel; cannot otherwise boot into Linux. Somebody please tell me how I can do this!

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

It happened the same to me, after an update (using Update Manager)! I remember to see a grub-update command issued by the installer...

I'am using Wubi, and the /ubuntu/disks/boot/ doesn't have any files (vmlinux... or initrd.img...), only a directory grub/ that is empty (no grub.cfg, .... empty!).

NOTE: I was able to access my ubuntu files from Windows using [https://wiki.ubuntu.com/WubiGuide#How can I access the Wubi files from Windows?].

Revision history for this message
AJenbo (ajenbo) wrote :

typing:

linux /boot/vmlinuz-2.6.22-15-generic
boot

made the system start booting but falied with a kernerl panic about "no file system found", same result when using the 2.6.22-14 kernerl. I think i'm just missing one line to get it to boot so please help!

Changed in wubi:
status: New → Confirmed
Revision history for this message
Phil M (cecinestpasphil) wrote :

@Ajenbo
In order to manually start booting try this:

linux /boot/vmlinuz-2.6.22-14-generic root=/dev/sda5
initrd /boot/initrd.img-2.6.31-14-generic
boot

(instead of sda5 use the partition where you've installed Ubuntu)

Now I can boot into Ubuntu, but I'm still searching how to ripristinate grub's menu...

Revision history for this message
Agostino Russo (ago) wrote :

It is normal that /ubuntu/disks/boot/ does not have any file, since the /boot content (and therefore grub.cfg) in 9.10 is within root.disk.
You should see the grub.cfg file if you mount the root.disk file manually.

PS there is a mixup of kernel and initrd version in the above comment, they must match.

Changed in wubi:
status: Confirmed → Invalid
Revision history for this message
jwesleycooper (jwesleycooper) wrote :

I'd already figured that root.disk contained everything, but how in God's name do I mount that blasted file! That's what I've been trying to figure out for the past MONTH!!!

Changed in wubi:
status: Invalid → Incomplete
status: Incomplete → Confirmed
Revision history for this message
jwesleycooper (jwesleycooper) wrote :

Ok, I used the command "loopback -p root (hd0,2)/ubuntu/disks/root.disk" to mount my root drive, but there is no sd** partition in the /dev directory, or anything else that even resembles a hard disk; and I'm getting the same "No file system found" kernel panic message, so there is clearly something SERIOUSLY WRONG

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

For whom is in the situation described in the bug description, a possible "solution" is:

1. At the grub prompt enter:
 >linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro quiet splash
 >initrd /boot/initrd.img-2.6.31-14-generic
 >boot
(if it doesn't work, change sda1 to sda2 or sda3 or ..., and please don't load kernel ...-15-...!)

2. Do this every time you boot :(

However, you CAN improve the situation (in some cases only). If you boot successfully, you could run "sudo update-grub" in terminal. Then next time you boot, you will see the grub menu and choose the first entry for kernel -14-generic (not 15!).

Obs.
(1) There are many recent entries in the forums related with this problem... but many of the solutions there presented, are old solutions for another cases that will simply make you loose all your data! Be careful if you apply solutions that came from non-Wubi situations.
(2) And, as far as I know, nobody has found "the solution" for this problem for installations with Wubi, Grub 2 and kernel...-15.

Revision history for this message
G. Ney (jggorney) wrote :

My recomendation is to uninstall completely the -15 kernel in Synaptic.

I have been hit by this bug, found this page, rebooted with the -14 kernel using this tricks, then uninstalled the -15 kernel, and rebooted. Everything went fine, issue solved. Installed the -15 kernel again. No boot again. Manual reboot with -14, unistall -15 kernel, everything is fine now.

So it is a mere -15 kernel issue; something is wrong with it.

Now I have to find a way to get Virtualbox working again...

Revision history for this message
G. Ney (jggorney) wrote :

Uninstall and install Virtualbox again -> problem solved.

Let's hope next kernel update doesn't break it all again!

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

Today came the -16 kernel update, and the problem continues... the grub menu disappeared again and I am only able to boot manually with the -14 kernel.

Revision history for this message
gissi (zerinol) wrote :

today I updated the kernel to ....-16. Obviously I had no boot and I reinstalled. As the ubuntu ISO only has ...-14 kernel I then tried to upgrade to -16. It worked perfectly and as I rebooted all ok. I think this could be related to the fact that the upgrade includes a grub update. Hope this can help.

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

gissi...

What is your grub version now? (sudo grub-install -v)

Revision history for this message
Valio Yolovski (vyolovski) wrote :

I have the same problem with updatring to the .... - 15 kernel:
OK, i reinstalled Ubuntu 9.10 (uninstalled Wubi and then installed it again).
Then i updates to the ...- 15 kernel and everything was ok.
Til today. I updated to the ... - 16 kernel and BOOM! The grub menu disappeared again!!!

Sorry for my english.

Revision history for this message
rockfx01 (tim-filmchicago) wrote :

This is getting really f'ing annoying. This is the second time an update to 9.10 has totally hosed my Wubi machine in a matter of two weeks. Does anyone bother testing these updates before they are released en masse?

I'm having the same problem with boot as vye. After installing the -16 kernel updated, Wubi will no longer boot - it just would boot to the grub command line.

After starting the -14 kernel manually from the command line, I used the "sudo grub-update" to get the 14/15/16 kernels all added to the grub boot list so I can select the kernels at boot time rather than it simply failing to the grub cmdline (I didn't see any error message at the time).

Anyways, when I try to select the -16 kernel from the grub boot menu, I get the error message "error: You need to load the kernel first." I can select the -15 kernel and boot to it with no problems.

"sudo grub-install -v" lists the version as "GNU GRUB 1.97~beta4"

Someone please set the importance on this bug already. I don't understand why a boot issue like this would not immediately receive a 'Critical' importance. This has been around since November 18th.

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

There are a lot of people affected by this bug (see https://bugs.launchpad.net/wubi/+bug/477169), but despite there are some "fixes", the problem has not been addressed properly... nobody (at least at this level) has a clue why this bug happens!

Revision history for this message
gissi (zerinol) wrote :

GNU GRUB 1.97~beta4

Revision history for this message
gissi (zerinol) wrote :

alelinux. Sorry for the stupid question: what about going back to the previous grub version (till jaunty) until grub 2 is stable?? it appears quite obvious that the problem is the interaction between wubi and the new grub version, isn't it?

Revision history for this message
osos (osama--salem) wrote :

Hi,
I have the same problem too..i can not get grub menu in my wubi installation
the problem occurred when i updated the kernel from .15 to .16
and i am now booting manually from grub shell using my old .14 kernel coz when i try to manually boot from my .16 vmlinuz image it says
error: invalid magic number
i reinstalled grub-pc and .16 kernel several times ... but nothing
i removed the .16 kernel but the problem is still exist
moreover i can not get any verbose or error logs in grub
how can i restore the lost boot menu

Revision history for this message
gissi (zerinol) wrote :

alelinux. I think that the ISO includes grub 1.97-beta3 (anyway previous than 197-beta4). So if I install from the ISO, upgrade kernel and then upgrade grub, it works! But if I upgrade kernel without upgrading grub it crashes. Next time I have no boot, I will try to completely remove and reinstall grub. Do you think it could work?

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

gissi... People who made an upgrade from a previous ubuntu installation (jaunty) were kept with an old grub, and (it seems) that aren't affected by this bug! So this is an issue of Wubi/Grub2. And when ubuntu upgrades the kernel this bug surfaces again, because grub starts to "scramble" the contents of files (that is why is not able to process the grub.cfg) [You can see this by enter cat /boot/grub/grub.cfg at the grub prompt] and noone (to my knowledge) understands why? So there are 3 "solutions": (1) Start the kernel manually (2) put a grub.cfg file in another disk (outside the root.disk) and boot by configfile (hd0,1)/path/to/grub.cfg or (3) create a new complete boot outside the root.disk (this is explained elsewhere but it is a complicated thing, you need to patch scripts... and I don't know if "survives" to kernel updates!) So, for me, the best is (2) and keep waiting for a true solution [clean installs don't work too, the problem will come in the next kernel upgrade].

IMPORTANTE: you need to boot with the last kernel that worked (-14 or -15).

Revision history for this message
gissi (zerinol) wrote :

alelinux. Ok. Next time I will install jaunty and upgrade to karmik heehheehh. In the meanwhile could you mind linking or posting a howto for the (2) solution??? Is there a way to "prevent" the boot damage? What about making the grub.cfg before the kernel update and, modifie it after cash? Thanks a lot. .

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

HOWTO: a "workaround" (before a really fix to this bug is found)

(1) Boot ubuntu manually and copy the file /boot/grub/grub.cfg to a pen
(2) Edit the file (in the pen) with a text editor and delete the menuentry for kernel -16 and -15, (this was tested with kernel -14 only)
(3) Boot windows and copy that file to the root of disk c
(4) Boot ubuntu until you get the grub prompt
(5) Enter the command ls -l (you must see the disks and partitions, usually something like (loop0), (hd0,1), (hd0,2), ...)
(6) Find where grub.cfg is, with the command cat (hdX,Y)/grub.cfg for X=0,1,... and Y=1,2,... (usually is in (hd0,1))
(7) Enter configfile (hd0,1)/grub.cfg (replace (hd0,1) with what you fund in (6)!)

You must see the grub menu and choose as usual...

Each time you boot, you must enter (6) (not too bad!)

NOTE: As you can see, the problem is not one of corruption or bad configuration of file grub.cfg, it is much worse, grub(?) completely scrambles the content of files in root.disk!!! You can use the command cat in grub to verify that.

Revision history for this message
gissi (zerinol) wrote :

alelinux. Thank you very much. In order to prevent, I could make a copy of grub.cfg now. When I receive the kernel update and impossible to boot, I could use the copy made previously, isn't it? This would allow boot without needing a livecd. Is that correct?

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

Yes, it is correct.

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

Only one more thing (just for sure), make a copy of initrd.img-2.6.31-14-generic and keep it together with the copy of grub.cfg, because if you, or the system, updates the initrd's (update-initramfs) then the system will not boot, not even with the -14 kernel!!!

Revision history for this message
Valio Yolovski (vyolovski) wrote :

And what are the Ubuntu developer team saying about this bug?
And if i inastall Ubuntu 9.04 and the upgrdae to 9.10 will i have the same problem?(I think no.)

Sorry for my english.

Revision history for this message
moronic (danni-otterbach) wrote :

@alexlinux
why isn't it possible to change the content of the grub.cfg and save it on the root.disk rather than saving it outside?

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

There is nothing wrong with the content of grub.cfg in root.disk... the problem is that grub2 is identifying loop0 as an ext2 file system (when it is an ext4) and so is unable to read properly from it (loop0=root.disk)!

Revision history for this message
alexlinux (alexandrelimaconde) wrote :

This bug is related with https://bugs.launchpad.net/wubi/+bug/477169, and you should follow the discussion there.

Revision history for this message
gissi (zerinol) wrote :

tonight new kernel upgrade. Just to try something different (than re-install) I tried this: installed the upgraded kernel from synaptic. After that but before rebooting, I installed grub 0.97 deleting completely grub2. Than (also before restarting) I reinstalled grub2 (deletin grub 0.97) configuring with the graphical interface (I left all as default). Afterwords I rebooted and......it works. Does it make sense or it's just luck????

Revision history for this message
gissi (zerinol) wrote :

I thought as follows (I am no informatic expert at all): when you upgrade the kernel the system fails to reboot. Notwithstanding, if you reinstall and the first you do is run aptitude-update, aptitude-upgrade (on clean install whit wubi) all works and system reboots without problems. I was wandering why? My answer was that on a clean install, system needs to upgrade no only the kernel but also grub (from beta3 which is included in the iso to the beta4) and the grub upgrade takes place only after kernel upgrade. So, my logical (not technical) conclusion is that grub upgrade after kernel upgrade permits upgrade kernel and reboot normally. Therefore I tried to do it manually after installing kernel update (.....16-53 generic) and I am writing this post from the rebooted system (I didi it 2 times)!!! Really I don't know if it's been a casuality. I will keep trying. Hope this can help.

Revision history for this message
AJenbo (ajenbo) wrote :

I just updated the linux kernel on two wubi systems, one works just fine with no issues, the other fails with this error :(

Revision history for this message
yohann (yohann-canu) wrote :

The solution to this problem is simply to update the wubildr file on the ntfs this is explained here http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Wubi_9.10 and in french on my blog here
http://playnext.fr/blog/shgrub-apres-un-update-de-wubi/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.