Bug 109227
Summary: | patch - enhancement - setdefault N - new command | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <jcromie> | ||||||||
Component: | grub | Assignee: | Jeremy Katz <katzj> | ||||||||
Status: | CLOSED UPSTREAM | QA Contact: | Mike McLean <mikem> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 9 | Keywords: | FutureFeature | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Enhancement | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2003-11-05 19:40:59 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
Description
Need Real Name
2003-11-05 19:29:11 UTC
Created attachment 95737 [details]
patch to code
This patch adds a new command to grub - setdefault.
Its a close derivative of savedefault, the only difference is that it expects a
numeric argument, where original uses an implicit argument.
Its purpose is to support multi-kernel testing; a grub.conf can specify a
sequence
of different kernels to run, which *presumably* would execute some substantial
set of tests, then reboot to the next kernel, which would repeat until the last
setdefault (ie: 0 in example below) returned the box to normal operation.
Heres a sequence of 4 kernels on my machine:
# Here are the sequential boot tests
title Test RH 7.2 (2.4.20-20.7)
setdefault 5
root (hd0,1)
kernel /vmlinuz-2.4.20-20.7 ro root=LABEL=/
initrd /initrd-2.4.20-20.7.img
title Test RH 7.2 (2.4.20-18.7)
setdefault 6
root (hd0,1)
kernel /vmlinuz-2.4.20-18.7 ro root=LABEL=/
initrd /initrd-2.4.20-18.7.img
title Test RedHat 9 (2.4.20-20.9)
setdefault 7
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-20.9 ro root=LABEL=/1
initrd /boot/initrd-2.4.20-20.9.img
title Test RedHat 9 (2.4.20-8)
setdefault 0
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/1
initrd /boot/initrd-2.4.20-8.img
I expect to combine this with a runlevel=4 or similar to make it easy to
trigger
the *smoke-test* and reboot from rc.local.
The patch is against RH grub-0.93-7 srpm, which has 18 patches for
0.90-0.93
Its also somewhat unfinished;
1. I copy-pasted verbatim from savedefault_helper to setdefault_helper
The 'right' thing to do would be to rename savedefault_helper as
setdefault_helper,
and modify savedefault to call it. IOW, savedefault is higher-level than
setdefault,
and should be implemented on top. Doing this however felt a bit too brazen.
2. No (proper patch to the source of ) docs.
I couldnt quite make out from docs/Makefile.am which texi/info/etc file to
edit into.
I added stuff into grub.texi.config.new, with hope that it could be easily
cut-pasted
into wherever it belongs.
I also left some of the help-text in static struct builtin
builtin_setdefault:
I am unsure whether any of the options should be allowed; I think --once
would not make
any sense though. I did not strip the code for those options, so I thought
it best to leave
an inappropriate marker.
Created attachment 95738 [details]
doc-patch
I'm avoiding adding new features into grub that aren't accepted upstream at this point to avoid the long-term pain. I see you've sent it there and I'll watch the progress upstream. Created attachment 95739 [details]
code patch
apologies - I missed the patch-checkbox on 1st attach, redoing incase theres
automation that handles this differently
|