grub-legacy-ec2 does not provide grub-reboot

Bug #605910 reported by Scott Moser
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

Binary package hint: cloud-init

the grub-legacy-ec2 package does not provide grub-set-default or grub-reboot.

It would be nice to provide these, as its somewhat scary to reboot a system into a new kernel that you have no access to if the kernel fails.

The grub-reboot command would normally boot you into the new kernel once. If this were functioning, you could do:

$ grub-set-default 0
$ grub-reboot 1
# system reboots, and doesn't come back up
% ec2-reboot-instances <instance-id>
# system should come back up in your previously booted "good" kernel

That said, I've not been able to get this to work, I suspect that the pv-grub kernels we have access to on ec2 either
a.) have no support for reading/updating the "once" syntax in /boot/grub/default.
b.) have support for some other format of /boot/grub/default that is written by our legacy grub.

I tested by:
- boot maverick instance of 20100714.1 with grub loader (aki-407d9529 - pv-grub-hd0-V1.01-i386.gz)
- copy default entry to a second entry 'FOOF' with a different kernel parameter (FOOF added)
- apt-get install grub
- modify /boot/grub/menu.lst to have 'default saved'
- grub-set-default 0
- grub-reboot 1
The reboot came up in the "FOOF" kernel, but subsequent reboots did as well, and /boot/grub/default still had '0:1' in it.

This seems to indicate to me that the file is being read, but not updated by grub loader.

So those utilities are "nice to have", but not useful at all if the available grub loaders do not update /boot/grub/default.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: cloud-init 0.5.12-0ubuntu7
ProcVersionSignature: User Name 2.6.32-305.9-ec2 2.6.32.11+drm33.2
Uname: Linux 2.6.32-305-ec2 i686
Architecture: i386
Date: Thu Jul 15 14:05:11 2010
Ec2AMI: ami-dc957eb5
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: us-east-1c
Ec2InstanceType: m1.small
Ec2Kernel: aki-407d9529
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cloud-init

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

I've just read some about 'fallback', and info in the grub manual about managing this without '--once'. Ie:

| default saved # This is important!!!
| timeout 10
|
| title the old kernel
| root (hd0,0)
| kernel /old_kernel
| savedefault
|
| title the new kernel
| root (hd0,0)
| kernel /new_kernel
| savedefault 0 # This is important!!!

Then, using grub-set-default to set '1' and rebooting.
As such, we absolutely need 'grub-set-default' in the images

That name will unfortunately conflict with one provided by grub2, so probably will have to go with grub-set-default-legacy.

Scott Moser (smoser)
summary: - grub-legacy-ec2 does not provide grub-reboot or grub-set-default
+ grub-legacy-ec2 does not provide grub-reboot
Revision history for this message
Scott Moser (smoser) wrote :

grub-set-default is being addressed by bug 605961.

Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
James Falcon (falcojr)
Changed in cloud-init (Ubuntu):
status: Triaged → Won't Fix
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.