unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to reinstall the bootloader without guix system reconfigure?
@ 2022-07-01 11:32 Akib Azmain Turja
  2022-07-01 12:16 ` Tobias Geerinckx-Rice
  2022-07-01 13:47 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 2 replies; 7+ messages in thread
From: Akib Azmain Turja @ 2022-07-01 11:32 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]


Hello everyone,

I shrunk my Losedows (Windows) partition by 100 GB.  Then I tried to
boot Guix, but found that GRUB is broken and the GRUB rescue prompt
appeared.  I thought that it's because of the 100 GB empty space in my
hard disk.  Fortunately, I have Ubuntu (yet another nonfree
distribution) installed and it didn't broke, so used that to add that
100 GB to my Guix partition.  But I found that GRUB is still broken.
Then I appended "/boot/grub/grub.cfg" of Guix to the same file of Ubuntu
and managed to boot into Guix and to write this mail you're reading now.

Now, if I'm correct, to fix the problem, I think the bootloader needs to
be reinstalled.  To do that, I have to run "guix system reconfigure".
But that will download too many thing, much more than it actually needs.
I know that "guix system delete-generations" also reinstalls bootloader
while not downloading too many things, however I don't have any previous
system generation, so I can't use that trick to reinstall the GRUB.

Is there any way to reinstall bootloader without the costly "guix system
reconfigure"?

Another non-important question:  Why did Guix's GRUB broke while
Ubuntu's GRUB survived?

Thanks in advance.

[Note: This message copied from my another message in help-guix which
got no response, with some minor changes.]

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to reinstall the bootloader without guix system reconfigure?
  2022-07-01 11:32 How to reinstall the bootloader without guix system reconfigure? Akib Azmain Turja
@ 2022-07-01 12:16 ` Tobias Geerinckx-Rice
  2022-07-01 12:20   ` Tobias Geerinckx-Rice
  2022-07-01 17:30   ` Akib Azmain Turja
  2022-07-01 13:47 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  1 sibling, 2 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-07-01 12:16 UTC (permalink / raw)
  To: guix-devel, Akib Azmain Turja

Hi,

Guix System reinstalls GRUB every time for convenience, but there's no need to run 'guix' just to fix GRUB.  

You can reinstall it by hand if you know what you're doing, using GRUB's grub-install command.  It doesn't even matter which distribution's GRUB you use, as long as it's not ancient.  Guix's GRUB does not carry Guix-specific patches.

What does matter very much is whether you use the UEFI or non-UEFI version.  Can you share your operating-system's (bootloader ...) snippet?

Form this distance, I can't tell you why one GRUB broke & the other one didn't.


Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to reinstall the bootloader without guix system reconfigure?
  2022-07-01 12:16 ` Tobias Geerinckx-Rice
@ 2022-07-01 12:20   ` Tobias Geerinckx-Rice
  2022-07-01 17:30   ` Akib Azmain Turja
  1 sibling, 0 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-07-01 12:20 UTC (permalink / raw)
  To: guix-devel, Akib Azmain Turja

P.S.: I would have answered this on either list; the move from -help to -devel was not a factor.  I didn't even notice.

Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to reinstall the bootloader without guix system reconfigure?
  2022-07-01 11:32 How to reinstall the bootloader without guix system reconfigure? Akib Azmain Turja
  2022-07-01 12:16 ` Tobias Geerinckx-Rice
@ 2022-07-01 13:47 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  2022-07-01 17:40   ` Akib Azmain Turja
  1 sibling, 1 reply; 7+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2022-07-01 13:47 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: Guix Devel

Hi Akib,

On Fri, Jul 1, 2022 at 4:35 AM Akib Azmain Turja <akib@disroot.org> wrote:
>
> Fortunately, I have Ubuntu (yet another nonfree
> distribution) installed and it didn't broke, so used that to add that
> 100 GB to my Guix partition.  But I found that GRUB is still broken.
> Then I appended "/boot/grub/grub.cfg" of Guix to the same file of Ubuntu
> and managed to boot into Guix

Like Tobias, I cannot tell how Grub broke for you (although I do not
dispute that it did).

Grub needs to find a series of secondary files that, for EFI, are
stored on the ESP. [1] For a traditional MBR/BIOS install, people use
a small (1 MB or so) "BIOS Boot Partition" [2] although you probably
aren't using that because your Windoze would not be able to use GPT
without EFI. (Without GPT, Grub finds some place outside the partition
table.)

I think you are using EFI and an ESP.

You may be encountering the issue that both Ubuntu and Guix are trying
to manage the boot process. There is theoretically a way both Grub
installations could coexist on the ESP but I am not sure they do. I
personally would run Grub only in Ubuntu or Guix.

In your case. it may be hard to pick one over the other.

Ubuntu scans your hard drive for other operating systems, including
Winblows, but probably misses Guix. Guix on the other hand may
miss the other two but knows the exact paths needed to boot into your
most recent "Guix System" configuration.

> Is there any way to reinstall bootloader without the costly "guix system
> reconfigure"?

To reinstall in Guix, you may be able to run 'grub-install /dev/sdX'
but that does not stop the competition between Ubuntu and Guix. I may
also make it harder for you to boot into Ubuntu or Winnows.

> Another non-important question:  Why did Guix's GRUB broke while
> Ubuntu's GRUB survived?

I think they use the same folder on the ESP.

Maybe there is an expert who can chime in.

Thanks for using Guix!

Kind regards,
Felix Lechner

P.S. You can boot many systems manually from the Grub shell, but it
would be an extraordinary burden to type the full Guix paths for your
kernel and your initrd.

[1] https://en.wikipedia.org/wiki/EFI_system_partition
[2] https://en.wikipedia.org/wiki/BIOS_boot_partition


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to reinstall the bootloader without guix system reconfigure?
  2022-07-01 12:16 ` Tobias Geerinckx-Rice
  2022-07-01 12:20   ` Tobias Geerinckx-Rice
@ 2022-07-01 17:30   ` Akib Azmain Turja
  2022-07-01 17:32     ` Akib Azmain Turja
  1 sibling, 1 reply; 7+ messages in thread
From: Akib Azmain Turja @ 2022-07-01 17:30 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

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

> Hi,
>
> Guix System reinstalls GRUB every time for convenience, but there's no need to run 'guix' just to fix GRUB.  
>
> You can reinstall it by hand if you know what you're doing, using GRUB's grub-install command.  It doesn't even matter which distribution's GRUB you use, as long as it's not ancient.  Guix's GRUB does not carry Guix-specific patches.
>
> What does matter very much is whether you use the UEFI or non-UEFI version.  Can you share your operating-system's (bootloader ...) snippet?
>
> Form this distance, I can't tell you why one GRUB broke & the other one didn't.
>
>
> Kind regards,
>
> T G-R
>
> Sent on the go.  Excuse or enjoy my brevity.

Thanks, it just worked.

I'm using EFI, here's the bootloader declaration:

(bootloader-configuration
 (bootloader grub-efi-bootloader)
 (targets '("/boot/efi"))
 (keyboard-layout keyboard-layout))

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to reinstall the bootloader without guix system reconfigure?
  2022-07-01 17:30   ` Akib Azmain Turja
@ 2022-07-01 17:32     ` Akib Azmain Turja
  0 siblings, 0 replies; 7+ messages in thread
From: Akib Azmain Turja @ 2022-07-01 17:32 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

Akib Azmain Turja <akib@disroot.org> writes:

> Tobias Geerinckx-Rice <me@tobias.gr> writes:
>
>> Hi,
>>
>> Guix System reinstalls GRUB every time for convenience, but there's no need to run 'guix' just to fix GRUB.  
>>
>> You can reinstall it by hand if you know what you're doing, using GRUB's grub-install command.  It doesn't even matter which distribution's GRUB you use, as long as it's not ancient.  Guix's GRUB does not carry Guix-specific patches.
>>
>> What does matter very much is whether you use the UEFI or non-UEFI version.  Can you share your operating-system's (bootloader ...) snippet?
>>
>> Form this distance, I can't tell you why one GRUB broke & the other one didn't.
>>
>>
>> Kind regards,
>>
>> T G-R
>>
>> Sent on the go.  Excuse or enjoy my brevity.
>
> Thanks, it just worked.
>
> I'm using EFI, here's the bootloader declaration:
>
> (bootloader-configuration
>  (bootloader grub-efi-bootloader)
>  (targets '("/boot/efi"))
>  (keyboard-layout keyboard-layout))
>
> -- 
> Akib Azmain Turja
>
> This message is signed by me with my GnuPG key.  It's fingerprint is:
>
>     7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

Oh yes, it installed under the name "grub", but I just renamed the
directory to Guix.

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to reinstall the bootloader without guix system reconfigure?
  2022-07-01 13:47 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
@ 2022-07-01 17:40   ` Akib Azmain Turja
  0 siblings, 0 replies; 7+ messages in thread
From: Akib Azmain Turja @ 2022-07-01 17:40 UTC (permalink / raw)
  To: Felix Lechner; +Cc: Guix Devel

[-- Attachment #1: Type: text/plain, Size: 3122 bytes --]

Felix Lechner <felix.lechner@lease-up.com> writes:

> Hi Akib,
>
> On Fri, Jul 1, 2022 at 4:35 AM Akib Azmain Turja <akib@disroot.org> wrote:
>>
>> Fortunately, I have Ubuntu (yet another nonfree
>> distribution) installed and it didn't broke, so used that to add that
>> 100 GB to my Guix partition.  But I found that GRUB is still broken.
>> Then I appended "/boot/grub/grub.cfg" of Guix to the same file of Ubuntu
>> and managed to boot into Guix
>
> Like Tobias, I cannot tell how Grub broke for you (although I do not
> dispute that it did).
>
> Grub needs to find a series of secondary files that, for EFI, are
> stored on the ESP. [1] For a traditional MBR/BIOS install, people use
> a small (1 MB or so) "BIOS Boot Partition" [2] although you probably
> aren't using that because your Windoze would not be able to use GPT
> without EFI. (Without GPT, Grub finds some place outside the partition
> table.)
>
> I think you are using EFI and an ESP.

How did you know?  I used to use Windows 10 even using a non-GPT (MBR
maybe?) disk.  And I still have that installed (though I don't use, not
even once in a month), just configured to boot with EFI.

>
> You may be encountering the issue that both Ubuntu and Guix are trying
> to manage the boot process. There is theoretically a way both Grub
> installations could coexist on the ESP but I am not sure they do. I
> personally would run Grub only in Ubuntu or Guix.

Both distrubtions have their own dedicate directory in ESP, so IMHO that
shouldn't be a problem.  And I have several OS installed simultaneously
for several years, without any problem.

>
> In your case. it may be hard to pick one over the other.
>
> Ubuntu scans your hard drive for other operating systems, including
> Winblows, but probably misses Guix. Guix on the other hand may
> miss the other two but knows the exact paths needed to boot into your
> most recent "Guix System" configuration.
>
>> Is there any way to reinstall bootloader without the costly "guix system
>> reconfigure"?
>
> To reinstall in Guix, you may be able to run 'grub-install /dev/sdX'
> but that does not stop the competition between Ubuntu and Guix. I may
> also make it harder for you to boot into Ubuntu or Winnows.
>
>> Another non-important question:  Why did Guix's GRUB broke while
>> Ubuntu's GRUB survived?
>
> I think they use the same folder on the ESP.

No.  Not at all.

>
> Maybe there is an expert who can chime in.
>
> Thanks for using Guix!

I would thank the Guix developer, who have developed such a wonderful
OS, which (almost) never breaks.

>
> Kind regards,
> Felix Lechner
>
> P.S. You can boot many systems manually from the Grub shell, but it
> would be an extraordinary burden to type the full Guix paths for your
> kernel and your initrd.
>
> [1] https://en.wikipedia.org/wiki/EFI_system_partition
> [2] https://en.wikipedia.org/wiki/BIOS_boot_partition

-- 
Akib Azmain Turja

This message is signed by me with my GnuPG key.  It's fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-01 17:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 11:32 How to reinstall the bootloader without guix system reconfigure? Akib Azmain Turja
2022-07-01 12:16 ` Tobias Geerinckx-Rice
2022-07-01 12:20   ` Tobias Geerinckx-Rice
2022-07-01 17:30   ` Akib Azmain Turja
2022-07-01 17:32     ` Akib Azmain Turja
2022-07-01 13:47 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2022-07-01 17:40   ` Akib Azmain Turja

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).