Re: Systemd-boot for MS Surface GO?

2020-06-04 Thread Tom Horsley
> The following steps made it usable but I still need to fix kernel
> updates or it will break again:  

I have no idea if the technique would work for UEFI, but on
most of my systems for a long time now, I've always installed
a stand alone small grub partition which is the main one the
system boots to, then it can boot other linux partitions using the
"configfile" command to point to a complete linux installation
in a totally separate partition that has its own /boot and grub.

The linux in that separate partition then updates its own kernel
in its own /boot and everything works normally.

The only gotcha is if a grub update comes along and adds
something to the config file the stand alone grub no longer understands,
but I can usually figure out how to get the stand alone grub
updated as well. (BLS did this to me as an example).
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: Systemd-boot for MS Surface GO?

2020-06-04 Thread stan via users
On Thu, 4 Jun 2020 07:39:09 -0500
Richard Shaw  wrote:

> I won't quite call this solved, but I did manage to get it to boot my
> Fedora 32 install finally.
> 
> The following steps made it usable but I still need to fix kernel
> updates or it will break again:

[snip]

> Things left to fix:
> 1. Get it working with secure boot
> 2. Figure out how to keep the kernel options after kernel update.

Thanks for posting the update.  Keeping for future reference in case I
decide to switch to systemd-boot.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: Systemd-boot for MS Surface GO?

2020-06-04 Thread Richard Shaw
I won't quite call this solved, but I did manage to get it to boot my
Fedora 32 install finally.

The following steps made it usable but I still need to fix kernel updates
or it will break again:

0. Disable secure boot, I haven't gotten it to work with systemd-boot yet.
1. Boot Fedora Live USB and install gparted
2. Create a new ESP partition of 1GB formatted FAT32 (I shrunk my "/" by
1GB to make room). Make sure you change the partition flags on the original
ESP to remove the ESP flag,
3. Copy the contents of the original ESP partition to it (the MS stuff).
4. Copy the contents of /boot to the ESP partition. It will complain about
symlinks related to GRUB but we don't care but we're moving to systemd-boot.
5. From Fedora Live mount your installed system to chroot into:
# su
# cd /mnt
# mkdir fedora
# mount /dev/ fedora
# mount /dev/ fedora/boot
# mount -t proc /proc fedora/proc
# mount --rbind /dev fedora/dev
# mount --rbind /sys fedora/sys
# chroot fedora
# bootctl install

If you did everything right systemd-boot will find everything it needs and
perform the install.

6. Update the EFI boot order
# efibootmgr -v
(remove old Fedora entry from original install)
# efibootmgr -B -b 
(note the boot order and copy it and paste it to a new command)
# efibootmgr -o 
(Rearrange the boot order to the Linux Boot Manger is first)

7. Fix /etc/fstab
Comment out the /boot and /boot/efi entries.
Determine the UUID of the new ESP partition:
# blkid /dev/
You want the short one with the hyphen in the middle, not the PARTUUID.
Copy the old EFI line and update the UUID *AND* the path to just /boot

8. The real PITA part I had to figure out. Since we're not using GRUB
anymore, none of the crap it puts in EFI/fedora matters to systemd-boot,
namely the kernel options.
Open up EFI/fedora/grubenv and locate the kernel options (kernelopts). Copy
the contents and then open up
/boot/loader/entries/-.conf.
Swap out the $kernelopts with the stuff you copied from grubenv.

Reboot!

Things left to fix:
1. Get it working with secure boot
2. Figure out how to keep the kernel options after kernel update.

Thanks,
Richard
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: Systemd-boot for MS Surface GO?

2020-06-01 Thread Richard Shaw
On Mon, Jun 1, 2020 at 3:47 PM Samuel Sieb  wrote:

> On 6/1/20 12:13 PM, Richard Shaw wrote:
> > So I want to dual boot Windows 10 and Fedora on my MS Surface GO but the
> > funky Microsoft UEFI REALLY doesn't like grub.
>
> In what way?  The UEFI boot shouldn't care what you're booting.  It just
> takes the signed boot binary and runs it.
>

Well standard UEFI doesn't care, but a little googling will show that it's
apparently non-standard. If I boot a Fedora Live USB I can see the entry
using efibootmgr but IF you can get the EFI menu to show, it does not list
Fedora, the only options are Windows Boot Manager or Setup. However, others
have reported success using reFIND or systemd-boot, both of which that the
caveat that the kernel and initrd are on the EFI partition.

Thanks,
Richard
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: Systemd-boot for MS Surface GO?

2020-06-01 Thread Samuel Sieb

On 6/1/20 12:13 PM, Richard Shaw wrote:
So I want to dual boot Windows 10 and Fedora on my MS Surface GO but the 
funky Microsoft UEFI REALLY doesn't like grub.


In what way?  The UEFI boot shouldn't care what you're booting.  It just 
takes the signed boot binary and runs it.

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: Systemd-boot for MS Surface GO?

2020-06-01 Thread stan via users
On Mon, 1 Jun 2020 14:13:35 -0500
Richard Shaw  wrote:

> So I want to dual boot Windows 10 and Fedora on my MS Surface GO but
> the funky Microsoft UEFI REALLY doesn't like grub.
> 
> I've read up a bit on systemd-boot and found references that it
> should work with the Surface GO but one of the requirements is that
> the kernel be compiled to be compatible with EFI executables and that
> the kernel and initrd are on the EFI partition.
> 
> I get the idea, but practically speaking how would I accomplish that?
> 
> 1. resize the EFI partition to be 1GB?
> 2. Somehow update /etc/fstab to make /boot and /boot/efi the same
> partition? Bind mount?
> 3. Install systemd-boot (How do I stop grub from messing things up?)
> 
> Anyone done this?

No, but I look forward to your journey as I would like to know also.
:-)  The part about being able to make the system unbootable because
of an error in installing bootctl has made me hesitant to experiment.

I think the way to go is to create another efi partition as /boot/test
and make all the changes there.  When you are ready to test, change
fstab to point to that partition in fstab, as /boot using the UUID.
That will mask the boot in the already installed fedora, and if you have
/boot/test set up correctly, should boot into the existing fedora.  You
will also have to have the windows setup in /boot/test in order to boot
it.  Some hand waving in there, but could work with tweaking, I think.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org