Breaks update-grub

Bug #230331 reported by Loïc Minier
2
Affects Status Importance Assigned to Milestone
Moblin Image Creator
Fix Committed
High
Praj
Ubuntu Mobile Edition
Fix Released
Critical
Unassigned
moblin-image-creator (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi,

MIC touches /boot/grub/menu.lst in ways incompatible with the upgrade-grub mechanism.

Any kernel update or the installation of a new kernel which runs update-grub will break this menu.lst as it relies on modification to generated data.

The menu.lst I'm looking at has entries like:
kernel /vmlinuz-2.6.24-16-lpiacompat ro boot=disk resume=/dev/sda3

but has:
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

defoptions should be updated to carry the args.

Bye

Tags: ume
Revision history for this message
Loïc Minier (lool) wrote :

After this change to menu.lst, update-grub produces useful kernel lines again:
-# kopt=root=/dev/hda1 ro
+# kopt=ro boot=disk resume=/dev/sda3

Revision history for this message
Praj (prajwal-linux) wrote :

MIC uses update-grub to generate menu.list. The lines you mentioned are auto generated by update-grub.
Can you elaborate on what MIC should be/shouldn't be doing?

Changed in moblin-image-creator:
assignee: nobody → prajwal-linux
status: New → Incomplete
Revision history for this message
Loïc Minier (lool) wrote :

Where do the "boot=disk" and "resume=/dev/sda3" come from in the initial menu.lst found in MIC generated images? This is the place that needs fixing.

From a quick grep, this is in libs/InstallImage.py, in apply_hd_kernel_cmdline(self). What this function does is that it changes the "kernel" commands in menu.lst, but doesn't change the place where the parameters are really defined ("# kopt=").

Instead, MIC should change "#kopt=" as shown above and should then call update-grub which will regenerate the "kernel" commands.

Revision history for this message
Loïc Minier (lool) wrote :
Revision history for this message
Loïc Minier (lool) wrote :

Then I realized that the defoptions were already appending "quiet splash", so no need to list them in hd_kernel_cmdline.

Revision history for this message
Loïc Minier (lool) wrote :

Finally, run update-grub instead of all kernel lines; this takes all changes into account and the resulting menu.lst makes update-grub idempotent.

Revision history for this message
Loïc Minier (lool) wrote :

You're supposed to set the status to Confirmed or New when I add information, otherwise the bug wont show in your bug list -- unless you still consider I didn't provide enough information.

Changed in moblin-image-creator:
status: Incomplete → New
Changed in ubuntu-mobile:
importance: Undecided → Critical
status: New → Fix Released
Changed in moblin-image-creator:
status: New → Fix Released
Praj (prajwal-linux)
Changed in moblin-image-creator:
importance: Undecided → High
status: New → In Progress
Revision history for this message
Mitz Amano (mitsutaka) wrote :

Currently what is it status? I saw a debian/changelog. but I look like that doesn't fix.

Revision history for this message
Loïc Minier (lool) wrote :

I think the patches attached here are relevant and useful; however there's a smaller issue in that /boot isn't mounted when generating menu.lst the first time, so the next kernel upgrades seems to think we're transitionning the config from /boot below / partition to /boot standalone partition.

But the original issue described here is still fixed by the above patches; the second issue is something related to new kernels / kernel upgrades and is already present in the current form.

Praj (prajwal-linux)
Changed in moblin-image-creator:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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