[CentOS] Loss of Ethernet adaptor
James B. Byrne
byrnejb at harte-lyne.ca
Tue Jun 10 18:27:33 UTC 2014
On Mon, June 9, 2014 12:57, Steve Clark wrote:
>
> This show how to do a one time boot and then the next time boot the original
> system
>
> https://www.gnu.org/software/grub/manual/legacy/Booting-once_002donly.html
>
>
Thank you. Based on my readings of this reference there are two mechanisms
available: 1. boot once, 2. fallback.
The critical step seems to be issuing the command 'grub-set-default n' where n
is a value between 0 and the number of entries in boot.conf less one.
Reading the boot-once fallback documentation it recommends fallback as the
superior alternative.
<---
Then you may want GRUB to boot the first system which is bootable among `A',
`B' and `C'. A configuration file can be written in this way:
default saved # This is important!!!
timeout 10
fallback 1 2 # This is important!!!
title A
root (hd0,0)
kernel /kernel
savedefault fallback # This is important!!!
title B
root (hd1,0)
kernel /kernel
savedefault fallback # This is important!!!
title C
root (hd2,0)
kernel /kernel
savedefault
Note that `default saved' (see default), `fallback 1 2' and `savedefault
fallback' are used. GRUB will boot the saved entry at index 0 by default and
save a fallback entry as next boot entry with this configuration.
When GRUB tries to boot `A', GRUB saves `1' as next boot entry, because the
command fallback specifies that `1' is the first fallback entry. The entry `1'
is `B', so GRUB will try to boot `B' at next boot time.
Likewise, when GRUB tries to boot `B', GRUB saves `2' as next boot entry,
because fallback specifies `2' as next fallback entry. This makes sure that
GRUB will boot `C' after booting `B'.
--->
SO a combination of the two boot forms might look like this?:
default saved # This is important!!!
timeout 10
fallback 1 2 # This is important!!!
title A
root (hd0,0)
kernel /kernel
savedefault fallback # index is zero
title B
root (hd1,0) # assumes a different boot device
kernel /kernel
savedefault fallback # index is one
title C
root (hd2,0) # assumes a third boot device
kernel /kernel
savedefault # index is two
title the new kernel boot options
root (hd0,0)
kernel /kernel new_options
savedefault 0 # index is three but we save 0 for next boot
I am not sure that I am following the logic of this closely enough to place
any reliance in my conclusions but is seems to me that in the last case the
command to issue before rebooting is: grub-set-default 3
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
More information about the CentOS
mailing list