Install Debian without grub

Help with issues regarding installation of Debian

Install Debian without grub

Postby KoO » 2019-12-24 06:00

Is it possible to install Debian 10 without installing grub. Say on a dual booting system after installing Debian just boot to the primary and sudo update-grub to add Debian to the already running grub install. Or will the fact that Debian wants control of the swap file the problem.
Systems : Debian-10 bullseye (i3wm)
KoO
 
Posts: 20
Joined: 2019-04-20 02:42

Re: Install Debian without grub

Postby Dai_trying » 2019-12-24 06:57

That will work just fine, Debian should still pick up the swap file too.
Dai_trying
 
Posts: 943
Joined: 2016-01-07 12:25

Re: Install Debian without grub

Postby KoO » 2019-12-24 07:31

Thanks for your reply but how do you stop Debian from installing grub ?
Systems : Debian-10 bullseye (i3wm)
KoO
 
Posts: 20
Joined: 2019-04-20 02:42

Re: Install Debian without grub

Postby p.H » 2019-12-24 08:31

KoO wrote:Is it possible to install Debian 10 without installing grub.

Yes, by selecting "expert install" in the Debian installer boot menu.

KoO wrote:Say on a dual booting system after installing Debian just boot to the primary and sudo update-grub to add Debian to the already running grub install.

Warning : in such a scenario, not installing GRUB for the secondary system and using os-prober to add it to the primary GRUB menu has issues. When building the menu entry for another Linux systems detected by os-prober, update-grub/grub-mkconfig relies on that system's boot config (grub.cfg) to set the entry properly, particularly the kernel command line parameters, including the root designation. IME, without this information update-grub just uses the raw device node such as root=/dev/sda5 (which is known to be unreliable) instead of root=UUID=xxx or, in the case of a LVM logical volume, root=/dev/dm-2 (which is even more unreliable and does not work with Debian) instead of root=/dev/mapper/VGname-LVname.

So I recommend to either
- in the primary system, create a manual boot entry in /etc/grub.d/40_custom (requires update-grub) or /boot/grub/custom.cfg (if BIOS boot) | /boot/efi/EFI/debian/custom.cfg (if EFI boot), but you will have to manually update it after a kernel change ;
- in the secondary system, create a manual /boot/grub/grub.cfg (must also be updated after a kernel change)
- for BIOS/legacy boot, in the secondary system, install GRUB in a dummy location such as a partition boot sector, so that /boot/grub/grub.cfg is automatically generated
- for EFI boot, if the distributions are different let the installer install GRUB and change the EFI boot entry priorities with efibootmgr or the UEFI firmware setup
- in the secondary system, install grub2-common so that scripts which create grub.cfg are present and automatically executed after a kernel change, and run update-grub. You can install it in the Debian installer shell with the following command :
Code: Select all
apt-install grub2-common

(I don't remember how to run a command such as update-grub from the installer in the target chroot)

KoO wrote:Or will the fact that Debian wants control of the swap file the problem

No, it is unrelated.
p.H
 
Posts: 1521
Joined: 2017-09-17 07:12

Re: Install Debian without grub

Postby KoO » 2019-12-24 13:35

@ p.H
Thank You for the info very detailed and helpful will be testing.

(Continue without boot loader)

p.H wrote:Yes, by selecting "expert install" in the Debian installer boot menu.

Warning : in such a scenario, not installing GRUB for the secondary system and using os-prober to add it to the primary GRUB menu has issues. When building the menu entry for another Linux systems detected by os-prober, update-grub/grub-mkconfig relies on that system's boot config (grub.cfg) to set the entry properly, particularly the kernel command line parameters, including the root designation. IME, without this information update-grub just uses the raw device node such as root=/dev/sda5 (which is known to be unreliable) instead of root=UUID=xxx or, in the case of a LVM logical volume, root=/dev/dm-2 (which is even more unreliable and does not work with Debian) instead of root=/dev/mapper/VGname-LVname.

So I recommend to either
- in the primary system, create a manual boot entry in /etc/grub.d/40_custom (requires update-grub) or /boot/grub/custom.cfg (if BIOS boot) | /boot/efi/EFI/debian/custom.cfg (if EFI boot), but you will have to manually update it after a kernel change ;
- in the secondary system, create a manual /boot/grub/grub.cfg (must also be updated after a kernel change)
- for BIOS/legacy boot, in the secondary system, install GRUB in a dummy location such as a partition boot sector, so that /boot/grub/grub.cfg is automatically generated
- for EFI boot, if the distributions are different let the installer install GRUB and change the EFI boot entry priorities with efibootmgr or the UEFI firmware setup
- in the secondary system, install grub2-common so that scripts which create grub.cfg are present and automatically executed after a kernel change, and run update-grub. You can install it in the Debian installer shell with the following command :
Code: Select all
apt-install grub2-common

(I don't remember how to run a command such as update-grub from the installer in the target chroot)

No, it is unrelated.
Systems : Debian-10 bullseye (i3wm)
KoO
 
Posts: 20
Joined: 2019-04-20 02:42


Return to Installation

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable