cannot install bootloader to root partition

  • Open
  • quality assurance status badge
Details
5 participants
  • Danny Milosavljevic
  • Tobias Geerinckx-Rice
  • Mark H Weaver
  • pelzflorian (Florian Pelz)
  • znavko
Owner
unassigned
Submitted by
znavko
Severity
normal
Z
Z
znavko wrote on 17 Jun 2019 13:25
(name . bug-guix)(address . bug-guix@gnu.org)
5465f5ee143f556ff0c11c11cdd54cc1@disroot.org
Hello! I was not able to install Guix having 2 partitions:
/dev/sda1 ext4 Linux filesystem
/dev/sda2 Linux Swap

`guix system init` says in this case:
guix system: error: failed to install bootloader

Attachment: file
D
D
Danny Milosavljevic wrote on 17 Jun 2019 16:53
(address . znavko@disroot.org)(address . 36262@debbugs.gnu.org)
20190617165354.72350a19@scratchpost.org
Hi,

which grub is that? grub-efi?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl0HqYIACgkQ5xo1VCww
uqUg2gf+J682tvsPyYqPE7k0xWN+VwjOOgQujFFJqbbjCrs5Szml4z0jio3jbFML
P7+pt/52eNoiV2GDEJNUqWYXz2zqJBAWtpMwN3CMBZTOKeI7NLKf/Q06cInHo7oV
trJBk1eMPBGhJzIjNmYUtlBQkliKS0li/WWJdFVeYF/8mv3me1UdxBBbVHsXbRHQ
7JXz4QRnZavuLJpblH3nWOQTZnbmYkDxjr4igs+PX2apt0lwkQM0DyyFIagxWizz
Kq1AqHqlINASrVrHX5uUYl8XsUyjNvPofTFo8jk8+eoow4+/5+tsJEKByjFrYHcf
6DtG40qxog8oI00YGdWAucx26tZePg==
=FiUi
-----END PGP SIGNATURE-----


T
T
Tobias Geerinckx-Rice wrote on 17 Jun 2019 19:08
(name . znavko)(address . znavko@disroot.org)(address . 36262@debbugs.gnu.org)
87zhmgw35r.fsf@nckx
Znavko,

znavko@disroot.org wrote:
Toggle quote (2 lines)
> bug#36262: cannot install bootloader to root partition

Installing GRUB to your root partition isn't supported, and should
never be necessary anyway.

Toggle quote (4 lines)
> Hello! I was not able to install Guix having 2 partitions:
> /dev/sda1 ext4 Linux filesystem
> /dev/sda2 Linux Swap

This is a strange partition layout; it's missing a ‘BIOS boot
partition’ and can never work without forcing GRUB to do something
it doesn't like to do.

Did you create this layout manually? If so, why?

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXQfJAAAKCRANsP+IT1Vt
edj+AP46B9JtRLK3IBV8lafkzEfGWE5V70NFGcwL2BJz6kEs7AD/WSeoBNhSPjSM
Dg0U+yEMFXMkQ07MpU/E0ynNnl6QwQo=
=f1c5
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 17 Jun 2019 19:09
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 36262@debbugs.gnu.org)
87y320w33b.fsf@nckx
Danny,

Danny Milosavljevic wrote:
Toggle quote (2 lines)
> which grub is that? grub-efi?

i386-pc, so ‘BIOS’ (which means it's trying to use blocklists,
which is fragile & won't work without --force).

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXQfJWAAKCRANsP+IT1Vt
eaZTAQDNGAxHRb48FCMQ+D9M4xtBn5E7tEGI3mznVfRae9sNPAD8D8Ke43oBk88J
obq8Bvjkp3293LBPidC5B4oI8l8gEwk=
=1Eam
-----END PGP SIGNATURE-----

Z
Z
znavko wrote on 17 Jun 2019 19:11
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 36262@debbugs.gnu.org)
8ac8087c445d45599bb0c00d018242b5@disroot.org
I have another laptop (Lenovo G50-30) where Guix works on this partition layout I've made manually:

# fdisk -l /dev/sda
...
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 230000000 229997953 109.7G 83 Linux
/dev/sda2 230000640 234441647 4441008 2.1G 82 Linux swap / Solaris


But all the new installations on other two notebooks with the same layout do not work.


June 17, 2019 5:07 PM, "Tobias Geerinckx-Rice" <me@tobias.gr> wrote:

Toggle quote (22 lines)
> Znavko,
>
> znavko@disroot.org wrote:
>
>> bug#36262: cannot install bootloader to root partition
>
> Installing GRUB to your root partition isn't supported, and should
> never be necessary anyway.
>
>> Hello! I was not able to install Guix having 2 partitions:
>> /dev/sda1 ext4 Linux filesystem
>> /dev/sda2 Linux Swap
>
> This is a strange partition layout; it's missing a ‘BIOS boot
> partition’ and can never work without forcing GRUB to do something
> it doesn't like to do.
>
> Did you create this layout manually? If so, why?
>
> Kind regards,
>
> T G-R
Z
Z
znavko wrote on 17 Jun 2019 19:19
(address . 36262@debbugs.gnu.org)
cd50218a880fe2e324997df82b8c434c@disroot.org
Yes, I use Bios grub everywhere.

June 17, 2019 5:10 PM, "Tobias Geerinckx-Rice" <me@tobias.gr> wrote:

Toggle quote (12 lines)
> Danny,
>
> Danny Milosavljevic wrote:
>
>> which grub is that? grub-efi?
>
> i386-pc, so ‘BIOS’ (which means it's trying to use blocklists,
> which is fragile & won't work without --force).
>
> Kind regards,
>
> T G-R
M
M
Mark H Weaver wrote on 18 Jun 2019 00:59
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
87muif24xv.fsf@netris.org
Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

Toggle quote (16 lines)
> znavko@disroot.org wrote:
>> bug#36262: cannot install bootloader to root partition
>
> Installing GRUB to your root partition isn't supported, and should
> never be necessary anyway.
>
>> Hello! I was not able to install Guix having 2 partitions:
>> /dev/sda1 ext4 Linux filesystem
>> /dev/sda2 Linux Swap
>
> This is a strange partition layout; it's missing a ‘BIOS boot
> partition’ and can never work without forcing GRUB to do something it
> doesn't like to do.
>
> Did you create this layout manually? If so, why?

FWIW, I used this partition layout for years, including on Guix systems,
and it worked fine. Long ago, bootloaders were only able to access the
first 8 GB or so of the disk, because of limitations in the old INT 13h
BIOS interface. Maybe this is still an issue on some ancient machines,
but I tend to use older hardware (my best laptop is ~11 years old, and
that's typical for me) and I've not had this issue in recent memory.

The only reason I started using a separate boot partition again is
because I now encrypt my root partition.

Mark
T
T
Tobias Geerinckx-Rice wrote on 18 Jun 2019 04:33
(address . znavko@disroot.org)(address . 36262@debbugs.gnu.org)
87wohjwrkd.fsf@nckx
Znavko,

znavko@disroot.org wrote:
Toggle quote (6 lines)
> I have another laptop (Lenovo G50-30) where Guix works on this
> partition layout I've made manually:
>
> # fdisk -l /dev/sda
> ...

^ You removed the most important part, please don't do this on
help lists.

Still, we can tell that this is an ‘mbr’ layout:

Toggle quote (4 lines)
> Device Boot Start End Sectors Size Id Type
> /dev/sda1 2048 230000000 229997953 109.7G 83 Linux
> /dev/sda2 230000640 234441647 4441008 2.1G 82 Linux
> swap / Solaris
^^^^^^^^^^^^^^^^^^^^^^^

Toggle quote (3 lines)
> But all the new installations on other two notebooks with the
> same layout do not work.

They aren't the same: the one in your screenshot is a completely
different ‘gpt’ layout.

Hence my unanswered question:

Toggle quote (2 lines)
> Did you create this layout manually? If so, why?

Although now I suspect there was no reason and that the installer
isn't to blame.

So you can either:

- throw away your existing layout and create new MBR disklabel.
Your partitioning software will ask you or provide an option
somewhere. Since modern partitioning software leaves a huge gap
before the first partition, GRUB will nestle cosily into that
first unused ~MiB.

- keep it as GPT (it has some minor features MBR doesn't), and
create an additional GPT ‘BIOS boot partition’ as recommended
before. It only needs to be a few 100 KiB, so I use the space
before the first partition (= before the first megabyte; turning
off ‘alignment’ in your partitioning software). This tiny
partition is for use by GRUB, and GRUB alone: do not format or
mount it.

Both options work equally well, but you need to choose.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXQhNcgAKCRANsP+IT1Vt
eY5GAQDihq5huPir/d8UXaFqLl+GDoLlNz22W+T34x/YX/6CfwD/dBcyQr2QcaN9
CYeRXR6QJce4Lpmj9GL73VlM7YWsggQ=
=agdD
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 18 Jun 2019 04:59
(name . Mark H Weaver)(address . mhw@netris.org)
87v9x3wqdd.fsf@nckx
Mark H Weaver wrote:
Toggle quote (4 lines)
> FWIW, I used this partition layout for years, including on Guix
> systems,
> and it worked fine.

Impossible, sorry.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXQhTfgAKCRANsP+IT1Vt
eTamAP9YGrCodfUTIlShQjRZjcFatnOlUHLhuFK8wVM8cO/ccAD/TDRz8rq1ww7g
foddPfyrF5/WAx9BiTfue4OVEs+4ewg=
=DDRR
-----END PGP SIGNATURE-----

P
P
pelzflorian (Florian Pelz) wrote on 18 Jun 2019 10:01
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
20190618080135.fllldtxjjqel3fxj@pelzflorian.localdomain
On Tue, Jun 18, 2019 at 04:33:22AM +0200, Tobias Geerinckx-Rice wrote:
Toggle quote (4 lines)
> Although now I suspect there was no reason and that the installer isn't to
> blame.
>

The graphical installer does not display a warning when not adding a
separate boot partition on GPT (an installer bug?), but installs
everything only to fail at the very end (this is another bug of guix
system?) at bootloader installation.

Regards,
Florian
M
M
Mark H Weaver wrote on 18 Jun 2019 12:22
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 36262@debbugs.gnu.org)
87v9x3yyyh.fsf@netris.org
Tobias Geerinckx-Rice <me@tobias.gr> writes:

Toggle quote (7 lines)
> Mark H Weaver wrote:
>> FWIW, I used this partition layout for years, including on Guix
>> systems,
>> and it worked fine.
>
> Impossible, sorry.

In fact, it _is_ possible, if you use an MBR partition table. I assumed
that znavko was using MBR, but having now finally looked at the provided
screen image, I see now that they're using GPT. I agree that in this
case, a BIOS boot partition is required. I should have looked more
closely before responding, sorry.

Best,
Mark
?