On Fri, 2012-06-22 at 15:10 -0300, Lucas Meneghel Rodrigues wrote: > This fixes a problem where autotest will always > fail to boot-once any kernels on Ubuntu (12.04, > I assume other Ubuntu versions with grub2 are > also affected). > > Ubuntu requires that we run 'update-grub' after > 'grub-reboot', otherwise the changes won't be > in effect on next boot. So, update boottool to > execute that in case it's found.
Well, I've just saw a side effect of running update-grub - it recreates the entries, removing the ident and renaming the entries: index=0 kernel=/boot/vmlinuz-autotest args="ro quiet splash $vt_handoff" root=UUID=fe876c4c-99e0-48c5-bf6a-25cbb25937f1 initrd=/boot/initrd-autotest title=Ubuntu, with Linux autotest Oh well... I guess this patch is no good then, we'll have to resort to cleber's approach... > Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> > --- > client/tools/boottool | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > > diff --git a/client/tools/boottool b/client/tools/boottool > index 7a1cce1..8631081 100755 > --- a/client/tools/boottool > +++ b/client/tools/boottool > @@ -1442,8 +1442,20 @@ class Grubby(object): > '%s',' ,'.join(grub_reboot_names)) > return -1 > > - return self._run_get_return([executable, > - '%s' % entry_index]) > + rc_gr = self._run_get_return([executable, '%s' % entry_index]) > + # If grub-reboot itself failed, return the rc right away > + if rc_gr: > + return rc_gr > + > + # If all went well, on ubuntu we still have to run update-grub > + # for the changes to be set. If we didn't find it, then let's > + # just return grub_reboot's rc. > + update_grub = 'update-grub' > + executable = find_executable(update_grub) > + if executable is not None: > + return self._run_get_return([executable]) > + else: > + return rc_gr > > > def boot_once_yaboot(self, entry_title): _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
