Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2018 12:14:23 +0700
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        Trond Endrest?l <Trond.Endrestol@fagskolen.gjovik.no>
Cc:        FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   Re: Dualboot and ZFS
Message-ID:  <20180118051423.GA94227@admin.sibptus.transneft.ru>
In-Reply-To: <alpine.BSF.2.21.1801160934560.69908@mail.fig.ol.no>
References:  <20180115051308.GA45168@admin.sibptus.transneft.ru> <VI1PR02MB12007D071EA5398373D2189CF6EB0@VI1PR02MB1200.eurprd02.prod.outlook.com> <20180115125241.GB60956@admin.sibptus.transneft.ru> <VI1PR02MB1200C7F0066F361E60A6CBEDF6EB0@VI1PR02MB1200.eurprd02.prod.outlook.com> <20180115144747.GA65526@admin.sibptus.transneft.ru> <VI1PR02MB120018D174817F8FFB2981D5F6EB0@VI1PR02MB1200.eurprd02.prod.outlook.com> <20180115151526.GA66342@admin.sibptus.transneft.ru> <a7920f859b666cff48f4f73ee1b2f954@dweimer.net> <20180116034929.GB89443@admin.sibptus.transneft.ru> <alpine.BSF.2.21.1801160934560.69908@mail.fig.ol.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Trond Endrest?l wrote:
> [script]# sysctl vfs.zfs.min_auto_ashift=12
> vfs.zfs.min_auto_ashift: 9 -> 12

Why do you change this?

"Min ashift used when creating new top-level vdevs", hmm. You probably
know something I don't. 
[dd]

> 
> !!! Write the boot manager to the boot block in the MBR !!!
> 
> [script]# gpart bootcode -b /boot/boot0 /dev/ada0
> bootcode written to ada0

Fine, here you install the bootmanager into the MBR. However I have a
couple of questions below regarding the VBR.

> 
> !!! Write /boot/zfsboot as two separate pieces to /dev/ada0s3{,a} !!!
> 
> [script]# dd if=/boot/zfsboot of=/tmp/zfsboot1 count=1
> 1+0 records in
> 1+0 records out
> 512 bytes transferred in 0.000383 secs (1337758 bytes/sec)
> [script]# gpart bootcode -b /tmp/zfsboot1 /dev/ada0s3
> bootcode written to ada0s3

Why do you need this trick with /tmp/zfsboot1 ? Why not

sysctl kern.geom.debugflags=0x10
dd if=/boot/zfsboot of=/dev/ada0s3 count=1 

The example in zfsboot(8) is even weirder. They create a BSD label
within an MBR slice, but never any partitions within. Why do they do
it like that? Quoting the manual page:

         gpart create -s BSD ada0s1
         gpart bootcode -b /boot/boot0 ada0
         gpart set -a active -i 1 ada0
         dd if=/boot/zfsboot of=/dev/ada0s1 count=1
         dd if=/boot/zfsboot of=/dev/ada0s1 iseek=1 oseek=1024

> [script]# dd if=/boot/zfsboot of=/dev/ada0s3a skip=1 seek=1024
> 128+0 records in
> 128+0 records out
> 65536 bytes transferred in 0.043591 secs (1503439 bytes/sec)

Should the "of=" target here be ada0s3a or just ada0s3 ?

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
AS43859



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180118051423.GA94227>