Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Mar 2015 22:08:45 +0530
From:      Prasad Joshi <prasadjoshi.linux@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: GSoC 15 - ZFS Boot Environment menu for GPT/EFI boot
Message-ID:  <CALJbWepJfr3y5Riv_tv%2Bc69gGDgHV1D6-x=C0PYyA%2Btza9QfBw@mail.gmail.com>
In-Reply-To: <CALJbWepUcQEDqXjH2vLYqmDSig7iOTYVQR7n%2Bz1NUa_RihKFgg@mail.gmail.com>
References:  <CALJbWepUcQEDqXjH2vLYqmDSig7iOTYVQR7n%2Bz1NUa_RihKFgg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello All,

To get my self familiarize with the project idea. I tried certain things
1. Experimented with beadm - to create multiple environments,
intentionally corrupted boot environment and then used earlier BE to
boot from.
2. Compiled FreeBSD source and boot from it
3. Skimmed through https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot to
get some understanding of gptzfsboot

As far as I can understand, gptzfsboot is installed on GTP partition
explicitly taged as freebsd-boot partition. During machine bootup,
gptzfsboot goes through all visible disks looking for ZFS file system.
In my opinion, it identifies whether a disk belongs to ZFS by reading
VDEV Label (not 100% sure though). Once a disk is identified, it has
to discover other VDEVs in the ZPOOL. Once the pool has been figured
out, it would be used for booting. I think a POOL or Dataset must also
have bootfs property set.

Once a bootable pool or dataset has been identified, it is given to
zfsbootloader for final stage of kernel bootstrapping.

Assuming my understanding is correct,  at the moment, gptzfsboot finds
a single bootable dataset and starts bootstrapping. The aim of this
project is to find list of all bootable datasets and display the list.
User can select either one of dataset, which then will be passed to
zfsloader.

Besides this, as far as I understand, beadm must be taking snapshot of
ZFS filesystem. Along with detecting bootable datasets, shouldn't
gptzfsboot also look for snapshots created from beadm?

I tried to browse through FreeBSD source, however I could not find
gptzfsboot source. I think, it must be inside freebsd/sys/boot/i386
directory. I will try to dig further.

I will really appreciate, if experts from FreeBSD community help me in
right direction. I will look forward for reply. BTW, I am still
looking for mentor, please help.

Thanks and Regards,
Prasad

On Wed, Mar 18, 2015 at 8:57 PM, Prasad Joshi
<prasadjoshi.linux@gmail.com> wrote:
> Hello,
>
> I am Prasad Joshi from India. I am planing to apply for GSoC 15, I
> found idea 'ZFS Boot Environment menu for GPT/EFI boot'.
> (https://wiki.freebsd.org/IdeasPage#ZFS_Boot_Environment_menu_for_GPT.2FEFI_boot)
>
> Last year I participated in GSoC, wherein I worked on OSv to add
> Symlink support. Here is the link to my project
> https://www.google-melange.com/gsoc/project/details/google/gsoc2014/prasadjoshi/5741031244955648.
> During the project I worked on enabling ZFS symlink support. I added
> various related system calls like stat, lstat etc. I too had to modify
> name lookup (namei) to take care of symbolic links. It involved
> changing other system calls like open, rename, unlink (basically
> anything that touches file). However, my commits in OSv did not limit
> to symlink support - I also worked on adding eventfd, fixing zfs
> import/export/unmount functionality, and adding support for few
> smaller system or glibc calls. Here is the link for my commits which
> are accepted in OSv
> https://github.com/cloudius-systems/osv/commits?author=prasad-joshi
>
> I have also worked on KVM Tools project few years back, wherein I added
> QCOW1/2 support in KVM Tools. Here is link of KVM Tools announcement
> http://lwn.net/Articles/447556/
>
> I have also contributed few patches in QEMU, Illumos, and Linux
> Kernel. In 2008-2010, I worked with company called KQInfotech, as a
> developer for porting ZFS to Linux
> (http://en.wikipedia.org/wiki/ZFS#KQ_InfoTech).
>
> Though I haven't worked on FreeBSD or PCBSD before, I am confident
> that, I would be able to get up to speed in very short period of time.
>
> At the moment, I am in process of understanding FreeBSD BE and
> preparing a formal proposal for GSoC 15. I wish to find a mentor for
> this project.
>
> I will look forward to reply.
>
> Thanks and Regards,
> Prasad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALJbWepJfr3y5Riv_tv%2Bc69gGDgHV1D6-x=C0PYyA%2Btza9QfBw>