:: Re: [DNG] GRUB shell (was: vdev)
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Peter Olson
Ημερομηνία:  
Προς: dng, fsmithred
Αντικείμενο: Re: [DNG] GRUB shell (was: vdev)
> On August 14, 2016 at 7:12 AM fsmithred <fsmithred@???> wrote:
>
> On 08/14/2016 05:50 AM, Peter Olson wrote:
> >> On August 14, 2016 at 5:31 AM Arnt Karlsen <arnt@???> wrote:
> >
> > [...]
> >
> >> ..one neat thing about grub, is its shell, once you get the menu,
> >> hit "e" and then the tab key twice, and play around to familiarize
> >> yourselves with how it works, e.g how it finds disks, files, and
> >> how you can boot into root's shell with e.g. "init=/bin/bash".
> >
> > My own experience with Grub has been less than "neat".
> >
> > But maybe that is because the times I have experienced Grub, my machine has been broken and I have been desperate to fix it. As far as I can tell, Grub has no help built in. You have to be an expert to use it.
> >
> > What does "e" plus tab key twice do?
> >
> > Is there some way I could try this on a system which boots successfully to find out about this?
> >
> > Peter Olson
> > _______________________________________________
>
> I had the good fortune to attend a presentation at a LUG meeting on using
> the grub shell soon after I started using linux, and before I actually
> needed it. I love the grub shell (except when I hate it.) Booting a
> working system manually is good practice.
>
> e lets you edit the highlighted menu entry.
> c just drops you to a grub prompt.
> TAB complete works
> TAB TAB for help.
>
> This, or some slight variation of it, usually works to boot an
> installation on the first partition of the first hard disk:
>
> c
> set root=(hd0,1)
> linux /vmlinuz ro root=/dev/sda1
> initrd /initrd.img
> boot
>
> Here's a pretty good guide for booting from the grub shell.
> https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux


This was stupendous. I now know how to type something sane at the GRUB-RESCUE> prompt.
I have made a cheat sheet, which I will upload to my Wiki in the cloud.

Also, this was great:

http://www.supergrubdisk.org/

The machine which won't boot has had its partitions thoroughly recreated and permuted, so GRUB has no idea what is going on, but the CD image figures out enough that I can boot either of two systems on the disk (I have a production system and a maintenance/ohshitrecovery system :-).

Now I can figure out the fix for the on-board Grub at my leisure.

> -fsr


Peter Olson