rEFInd - a UEFI boot selector

From: <masa_at_amogha.jp ($B4];3D>>;(B)>
Date: Sat, 24 Sep 2022 09:23:11 UTC
$BG/6b@83h<T(B $B4];3$G$9!#(B

Subject $B$rJQ$($F!";d$,Jz$($F$$$kLdBj$r@bL@$7!"$*CN7C$r$*<Z$j$7$?$$$H;W$$(B
$B$^$9!#@dLG4mW|<o$N(B legacy BIOS$B$N$_$N%^%7%s$N$3$H$OL5;k$7$F!"OC$r(B UEFI $B%^(B
$B%7%s$K8BDj$7$?$$$H;W$$$^$9!#(B

$B:$$C$F$$$k$3$H$r<jC;$K=q$/$H(B

        https://efi.akeo.ie/downloads/efifs-1.9/x64/zfs_x64.efi

$B$r(B rEFInd $B$N%I%i%$%P$H$7$F;H$C$F$bF0$+$J$$(B

$B$H$$$&;v$G$9!#(Bufs2_x64.efi $B$NJ}$O4|BTDL$j$KF0$/$N$G$9$,!"!"!"!#(B

$B0J2<$A$g$C$HD9$/$J$j$^$9$,!"C/$K$G$b$o$+$k$h$&$K>\$7$/@bL@$7$?$$$H;W$$$^(B
$B$9!#(B

$BM_$7$$$N$O(B gpt $B%9%-!<%`>e$K$"$kJ#?t$N(B FreeBSD $B$rA*BrE*$K5/F0$9$k;EAH$_$G(B
$B$9!#$$$o$f$k(B multi-boot$B$NOC$N0l4D$G$9!#@$$NCf$K$O0l$D$N%G%#%9%/>e$K(B
Windows, Linux, Ubunstu, Debian $B$J$I!"2?<oN`$b$N(BOS$B$r:\$;$F!"!V$I$l$G$b5/(B
$BF0$G$-$k!W$H0RD%$C$F$$$k?M$,$$$^$9$,!"$3$3$GOCBj$K$9$k$N$O$=$l$H$O$A$g$C(B
$B$H0c$C$F$$$^$9!#!VJ#?t$N(B FreeBSD $B$rA*BrE*$K5/F0$9$k!W$H$$$&$N$O!"J#?t$N(B
OS$B$r!"3F(BOS$B0l8D$:$D$N%Q!<%F%#%7%g%s$,$"$kCf$+$iA*BrE*$K5/F0$9$k$3$H$KHf$Y(B
$B$F0U30$J$[$ILLE]$J$N$G$9!#(B

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207940
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229770

$B$J$I$r8+$k$H!"LnCf$5$s!"@DLZ$5$s!"(BMasachika ISHIZUKA$B$5$sEy$,D9$$G/7n$KEO$C(B
$B$F$3$NLdBj$K4X?4$r$*;}$A$N$3$H$,$o$+$j$^$9!#$G$9$,!"$3$l$i=t@hGZJ}$N$h$&(B
$B$K(Bboot1.efi $B$d(B loader.efi $B$K%Q%C%A$rEv$F$k$d$jJ}$O!";d$N<j$KM>$j$^$9!#$H(B
$B$F$b??;w$O$G$-$^$;$s!#(B

$B;d$OD9$$4V$3$NLdBj$X$NBP=h$H$7$F;EJ}$J$/(B gnu grub2 $B$r;H$C$F$$$^$7$?$,!"(B
$BK\Ev$N$H$3$m$3$NJ}K!$O5$$KF~$j$^$;$s!#$=$NM}M3$OJLES@bL@$7$?$$$H;W$$$^$9(B
$B$,!":G6a;n$7$F$$$k(BrEFInd$B$r;H$&J}K!$K$D$$$F!"$o$+$C$?$3$H$r0J2<$K>/$7@bL@(B
$B$7$?$$$H;W$$$^$9!#(BrEFInd$B$O(B FreeBSD$B30$N%=%U%H%&%'%"$J$N$G62=L$G$9$,!"!"!"!#(B

ESP $B$N(B/EFI/BOOT/REFIND.CONF $B$K(B

menuentry "loader.efi of FreeBSD13.1" {
    loader /EFI/Boot/loader.efi
    icon /EFI/Boot/ICONS/os_freebsd.png
$B!!!!(Boptions "rootdev=zfs:fbsd131/ROOT/default:"
}

$B$N$h$&$K(B options $B$r;XDj$9$k$d$jJ}$O!"@hF|$N%a!<%k$K=q$$$?DL$j!"2?8N$+@.(B
$B8y$7$^$;$s$G$7$?!#(B

https://www.ish.org/blog/?p=2271 $B$K$O(B

    P.P.S. refind 0.12.0$B$,ITD4$J860x$,H=$j$^$7$?!#(Boptions$B$G(Bloader.efi$B$K(B
    parameter$B$rEO$9:]$K!":G=i$N%Q%i%a!<%?$,@5>o$KEO$i$J$$$h$&$G$9!#(Boptions$B$N(B
    2$BHVL\0J9_$N%Q%i%a!<%?$O@5>o$KEO$j$^$9$N$G!"(Boptions$B$N:G=i$K(Bdummy$B$N%Q%i%a!<(B
    $B%?$rDI2C$9$l$P0l1~(B0.12.0$B$bF0$-$^$9!#(B

$B$H$$$&OC$,=q$$$F$"$j$^$9$,!"(B

$B!!!!(Boptions "rootdev=zfs:fbsd131/ROOT/default: rootdev=zfs:fbsd131/ROOT/default:"

$B$H=q$$$F$b%@%a$G$7$?!#(B

$B<!$K;n$7$?$N$O(B

https://www.starlink.jp/freebsd/boot-from-another-fbsd-partition/

$B$K$"$k(B volume $B$r;XDj$9$kJ}K!$G$9!#;d$,$d$C$?<B83$N>u67$O0J2<$NDL$j$G$9!#(B

% gpart show ada0
=>        34  1953525101  ada0  GPT  (932G)
          34        1600     1  bios-boot  (800K)
        1634         414     2  freebsd-boot  (207K)
        2048      204800     3  efi  (100M)
      206848     6291456     4  freebsd-ufs  (3.0G)
     6498304     6291456     5  freebsd-zfs  (3.0G)
    12789760     6291456     6  freebsd-ufs  (3.0G)
    ($B0J2<N,(B)

$B$H$J$C$F$$$k>u67$G!"(B REFIND.CONF $B$K$O(B

menuentry "ufs2 driver test ada0p6" {
    volume 521461b8-3b05-11ed-9405-3417eb9e0b90
    loader /boot/loader.efi
    icon /boot/images/freebsd-logo-rev.png
}

$B$H$$$&%(%s%H%j$r:n$C$F$*$-$^$9!#$3$3$K(B volume $B$N9T$K$"$kD9$$?t;z$NMeNs$O(B
ada0p6 $B$N(B rawuuid $B$G!"(Bgpart list $B$GD4$Y$k$3$H$,$G$-$^$9!#(B

14. Name: ada0p6
   Mediasize: 3221225472 (3.0G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r1w1e1
   efimedia: HD(6,GPT,521461b8-3b05-11ed-9405-3417eb9e0b90,0xc32800,0x600000)
   rawuuid: 521461b8-3b05-11ed-9405-3417eb9e0b90
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 3221225472
   offset: 6548357120
   type: freebsd-ufs
   index: 6
   end: 19081215
   start: 12789760

$B99$K!"(B ESP $B$K(B /EFI/BOOT/drivers $B$H$$$&%G%#%l%/%H%j$r:n$C$F!"(B

https://efi.akeo.ie/downloads/efifs-1.9/x64/

$B$+$i<h$C$F$-$?(B ufs2_x64.efi $B$rF~$l$F$*$-$^$9!#$3$l$G(B rEFInd $B$r5/F0$7$FA*(B
$BBr%a%K%e!<$+$i(B "ufs2 driver test ada0p6" $B$rA*$S$^$9$H!"$A$c$s$H!V(BWelcome
to FreeBSD$B!W$,I=<($5$l$^$9!#$=$3$G(B $B%a%K%e!<%(%s%H%j(B3$B$rA*$s$G(B

OK show

$B$H$d$k$H!"(B currdev, loaddev $B$H$b$KCM$,(B disk2p6: $B$K$J$C$F$$$^$9(B($B30IU$1(B
USB disk $B$r(B2$BBf@\B3$7$F$$$k$?$a$K(B disk2$B$,(Bada0)$B!#(Brootdev $B$O$"$j$^$;$s!#$3(B
$B$N7k2L$K;d$O>.Lv$j$7$^$7$?!#(BrEFInd $B$O(B ada0p6 $B$N(B /boot/loader.efi $B$r5/F0(B
$B$7$F$$$k$o$1$G!"(BOK boot$B$H$d$k$+!"0?$$$O!V(BWelcome to FreeBSD$B!W2hLL$r$=$N(B
$B$^$^%?%$%`%"%&%H$5$;$k$H(B ada0p6 $B$+$i%+!<%M%k$r%m!<%I$7$F%9%?!<%H$5$;$^$9!#(B
ada0p4$B$K$"$k(B /boot/loadef.efi $B$,(B ada0p6$B$K$"$k%+!<%M%k$r%m!<%I$9$k$o$1$G(B
$B$J$$$N$G$9!#$3$l$K$h$j!"%P!<%8%g%s$,0[$J$k(B FreeBSD $B$r$$$/$D$+;}$C$F$$$k(B
gpt$B%9%-!<%`$N%G%#%9%/$G!"(Bloader.efi $B$N5sF0$b4^$a$F3F%P!<%8%g%s$NF0$-$r:F(B
$B8=$G$-$k$3$H$K$J$j$^$9!#(B

$B$7$+$74n$s$@$N$b$D$+$N4V!#(B zfs $B$N%Q!<%F%#%7%g%s$GF1$8$3$H$r$7$h$&$HF1$8(B
$B%5%$%H$+$i(B zfs_x64.efi $B$r;}$C$F$-$F(B /EFI/BOOT/drivers $B$KF~$l$F$_$^$7$?$,!"(B
$B@.8y$7$^$;$s$G$7$?!#(B

$B:$$C$?!#(B

--------
$B4];3(B $BD>>;(B $B$^$k$d$^(B $B$J$*$^$5(B
$B%a!<%k%"%I%l%9!'(B masa@amogha.jp