Re: How can I force a full fsck on a remote system at next reboot?
* Jape Person <japers@comcast.net> [2015-03-13 14:12 -0400]:
>
>
> On 03/12/2015 05:48 PM, Michael Biebl wrote:
[...]
> >For remote systems, where you don't have a sideband channel like iLO,
> >you could use "grub-set-default", to choose the boot entry for the next
> >boot. See man 8 grub-set-default.
> >
>
> Hi, Michael.
>
> Well, I almost got it.
>
> Adding a new menu entry to run fsck was easy enough. I modified the
> /etc/grub.d/40_custom script and ran update-grub, and the new entry thus
> created works when chosen from the grub menu.
>
> However, I can't get grub-set-default to redesignate that new menu entry as
> the default.
Here is how I use it:
The first menu entry is 0 which points to my latest kernel.
The second menu entry points to a submenu where all kernels are
listed. So if I want to boot the third entry in the second menu I
just type as root:
# grub-reboot "1>2"
As we all know, grub starts counting at 0 ;-) so this means:
Reboot the _third_ (2) entry in the _second_ (1) menu.
grub-reboot(8):
...
MENU_ENTRY is a number, a menu item title or a menu item identifier. Please
note that menu items in submenus or sub-submenus require specifying the submenu
components and then the menu item component. The titles should be separated
using the greater-than character (>) with no extra spaces. Depending on your
shell some characters including > may need escaping. More information about
this is available in the GRUB Manual in the section about the 'default'
command.
...
HTH
Elimar
--
The path to source is always uphill!
-unknown-
Reply to: