tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Autoconfiguring root device and fstab(5) (wedges?)

On 26.03.2011 23:03, Eric Schnoebelen wrote:
> Jean-Yves Migeon writes:
> - If you believe that GPT support inside sysinst is easy to add, I would
> - prefer to do it that way. Sadly, I spent this late afternoon trying to
> - make it work (using mishka's tutorial [1]), but I never managed to get
> - past the "Error No /boot" from fatboot.S with QEMU. Looks like the
> - primary stage bootloader fails looking for /boot in the EFI partition :/
> I was mucking about with buildign a GPT bootable system, and
> found that I wasn't able to make an EFI partition work..
> However, telling the gptmbr code to boot to a UFS partition
> worked.

Yes, indeed. That does the trick, thanks!

I am leaving some space for future EFI partition, should there be a need to.

For future records (and web search compliance), I did it that way:

[boot with an install ISO -- exit sysinst]
gpt create wd0
gpt add -s 65536 wd0 # index 1 - future EFI partition
gpt add wd0 # index 2 - consumes the rest of the disk size
# 65570 = 65536 (size of future EFI partition) + 34 (size of primary GPT)
dkctl wd0 addwedge root 65570 <end_of_disk> ffs
gpt biosboot -c /usr/mdec/mbr_gpt -i 2 wd0
installboot /dev/dk0 /usr/mdec/bootxx_ffsv2
newfs -O2 /dev/rdk0
mount /dev/rdk0 /mnt2
# Now, play as usual

Well, this needs some work to be userfriendly... BTW, an equivalent to
dkscan_bsdlabel but oriented towards GPT would be a plus in my
opinion... dkscan_gpt?

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index