:: Re: [DNG] Lost in grub
Inizio della pagina
Delete this message
Reply to this message
Autore: Arnt Karlsen
Data:  
To: dng
Oggetto: Re: [DNG] Lost in grub
On Tue, 29 Aug 2017 10:40:00 +0200, Edward wrote in message
<CAKENem6hdSVYBxLCkDepjtgD_L22wmhUh7Biiz3qVogp+vL=7g@???>:

> My setup of GRUP is more of a policy rather than something special.
>
> I keep with the conviction that the bootloader is the most important
> piece of software after UEFI/EFI/BIOS. The reason is because a
> bootloader is what loads an OS without which a user is at a loss.
>
> To achieve the above, I keep a small, 1GB, partition reserved for a
> very minimal installation of Debian/Devuan that is just the base
> system with many utilities missing. This small base system is achieved
> by installing using debootstrap. The latter, installs the base
> packages but no accounts or network connections are setup. To this
> small base system, I add a root account, configure
> /etc/network/interfaces to get network access, configure /etc/fstab,
> and finally, install the flavour of GRUB that is pertinent to my
> hardware and os-prober.


..neat, publish it as a grub+(u)efi/bios etc rescue distro.

> At the end, I boot this minimal installation
> and run update-grub to get a skeletal version of grub.cfg. To be safe,
> I make a copy of this grub.cfg. At the end, I manually edit grub.cfg
> to display its menu the way I want it.
>
> With grub.cfg caution must be taken to follow the syntax precisely as
> GRUB's developers do not absolutely expect anyone to manually edit
> that file. Make sure you understand the syntax structure and keep a
> working copy of grub.cfg open so that you can consult it to follow its
> syntax. Make sure a '{' has a corresponding '}'. Also be aware of the
> use of non-printing characters that may be needed. In other words, you
> have to be cautious like a real hacker.
>
> So that you can follow, I am attaching my version of grub.cfg. I am
> editing the UUIDs for security reasons.


..to that end, if I do "search --no-floppy --fs-uuid --set=root 00d",
and then hit [Tab] twice, will it find your 00d-what-ever-your-root-is?

> Note also that I am using this setup on a GPT formatted disk. For an
> MSDOS FAT formatted disk you have to use msdos instead of gpt. Consult
> the outputted grub.cfg when you first run it. Furthermore, I am using
> this setup to boot MS Windows 8.1 using chainloading.
>
> PS:
> If you dedicate more space, you can use a distribution that is known
> is capable of installing a base system and use that to install your
> version of GRUB. That way you will end up with a bootable installation
> that you would use to manage GRUB. By keeping that installation only
> for GRUB management you will guarantee yourself that your machine will
> always boot. Please, be aware you will need to not install GRUB in any
> other installation. Be also aware that this is an unorthodox method of
> managing a bootloader but in my experience it worked very reliably.


..and if you put it on an usb stick, it can be used on your other hw.
Also possible to put ssh etc keys on it, e.g. to allow "guests" access
to a credible decoy system. ;o)

--
..med vennlig hilsen = with Kind Regards from Arnt Karlsen
...with a number of polar bear hunters in his ancestry...
Scenarios always come in sets of three:
best case, worst case, and just in case.