Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #201031
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Grub-less installation of stretch |
| Date | 2018-10-08 20:30 +0200 |
| Message-ID | <wGIs1-27D-5@gated-at.bofh.it> (permalink) |
| References | <wGGJA-13Q-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Le 08/10/2018 à 18:37, David Wright a écrit :
>
> (The origin of my system will differ slightly in being debootstrap
> from another partition running jessie, rather than an upgrade of
> an older system.)
>
> At step 3 (where I'm installing all the packages I want on the new
> system) remove grub if it's there. (IOW I wouldn't deliberately be
> installing it. I see no dependencies.)
>
> Step 4 as above.
>
> Step 5: Now I'm back running jessie (whence I executed the
> debootstrap and so on).
>
> # grub-mkconfig > /boot/grub/grub.cfg
>
> which will os-prober the new grub-less system and add entries for it under
> ### BEGIN /etc/grub.d/30_os-prober ###
>
> Step 6:
>
> # grub-set-default 'Debian 9 (on /dev/sda7)>osprober-gnulinux-simple-swan07'
>
> using the strings I find there.
>
> # reboot
>
> Would this work, and reboot into the grub-less system? Any snags or gotchas?
Maybe, maybe not. The problem with a GRUB-less installation is the lack
of /boot/grub/grub.cfg. Without it (or /etc/lilo.conf or
/boot/grub/menu.lst), grub-mkconfig/os-prober cannot guess the correct
parameters for the kernel command line. This includes not only
parameters defined by the GRUB_CMDLINE_LINUX* variables in
/etc/default/grub but also the root= parameter. Unfortunately, without a
hint from an existing boot loader config file, it appears that
grub-mkconfig will use the raw and possibly non-persistent root device
name, e.g. /dev/sda7 instead of the UUID, or /dev/dm-2 instead of the
LVM logical volume or encrypted device name.
It may work if the root device is a plain partition whose name does not
change (e.g. because there is only one disk) and the system does not
require custom kernel parameters. Remember that logical partition
numbers may change when creating or deleting another logical partition.
But it won't work if the system requires custom kernel parameters or the
root device is an LVM logical volume or encrypted device, because the
initramfs needs root= to specify the proper form /dev/mapper/* in order
to activate and find the device.
So it may be advisable to install at least grub-common and use
grub-mkconfig to generate /boot/grub/grub.cfg. If you also want to
automatically update grub.cfg after a kernel package installation or
removal, you may either install grub-pc (or any other grub flavour
available in the arch) - without installing the boot loader - or create
your own scripts in /etc/kernel/post{inst,rm}.d/ to do basically the
same as zz-update-grub provided by grub-pc.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Grub-less installation of stretch David Wright <deblis@lionunicorn.co.uk> - 2018-10-08 18:40 +0200
Re: Grub-less installation of stretch Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-10-08 20:30 +0200
Re: Grub-less installation of stretch David Wright <deblis@lionunicorn.co.uk> - 2018-10-08 22:30 +0200
Re: Grub-less installation of stretch Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-10-08 23:50 +0200
Re: Grub-less installation of stretch David Wright <deblis@lionunicorn.co.uk> - 2018-10-09 22:10 +0200
csiph-web