Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151664547
D15846.id43876.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D15846.id43876.diff
View Options
Index: tools/boot/install-boot.sh
===================================================================
--- tools/boot/install-boot.sh
+++ tools/boot/install-boot.sh
@@ -39,6 +39,10 @@
exit 0
}
+boot_geli_gpt_zfs_legacy() {
+ boot_nogeli_gpt_zfs_legacy $1 $2 $3
+}
+
boot_nogeli_gpt_ufs_legacy() {
dev=$1
dst=$2
Index: tools/boot/rootgen.sh
===================================================================
--- tools/boot/rootgen.sh
+++ tools/boot/rootgen.sh
@@ -237,6 +237,50 @@
}
mk_geli_gpt_zfs_legacy() {
+ src=$1
+ img=$2
+ mntpt=$3
+ geli=$4
+ scheme=$5
+ fs=$6
+ bios=$7
+ pool=geli-gpt-zfs-legacy
+
+ #Allan
+ dd if=/dev/zero of=${img} count=1 seek=$(( 200 * 1024 * 1024 / 512 ))
+ #truncate -s 200m ${img}
+ md=$(mdconfig -f ${img})
+ gpart create -s gpt ${md}
+ gpart add -t freebsd-boot -s 400k -a 4k ${md} # <= ~540k
+ gpart add -t freebsd-zfs -l root $md
+ # install-boot will make this bootable
+ echo passphrase | geli init -bg -e AES-XTS -i 50000 -J - -l 256 -s 4096 ${md}p2
+ echo passphrase | geli attach -j - ${md}p2
+ zpool create -O mountpoint=none -R ${mntpt} ${pool} ${md}p2.eli
+ zpool set bootfs=${pool} ${pool}
+ zfs create -po mountpoint=/ ${pool}/ROOT/default
+ # NB: The online guides go nuts customizing /var and other mountpoints here, no need
+ cpsys ${src} ${mntpt}
+ df
+ # need to make a couple of tweaks
+ cat > ${mntpt}/boot/loader.conf <<EOF
+zfs_load=YES
+opensolaris_load=YES
+geom_eli_load=YES
+EOF
+ cp /boot/kernel/zfs.ko ${mntpt}/boot/kernel/zfs.ko
+ cp /boot/kernel/opensolaris.ko ${mntpt}/boot/kernel/opensolaris.ko
+ cp /boot/kernel/geom_eli.ko ${mntpt}/boot/kernel/geom_eli.ko
+ ls -las ${mntpt}/boot
+ # end tweaks
+ zfs umount -f ${pool}/ROOT/default
+ zfs set mountpoint=none ${pool}/ROOT/default
+ zpool set bootfs=${pool}/ROOT/default ${pool}
+ zpool set autoexpand=on ${pool}
+ zpool export ${pool}
+ geli detach ${md}p2
+ ${SRCTOP}/tools/boot/install-boot.sh -g ${geli} -s ${scheme} -f ${fs} -b ${bios} -d ${src} ${md}
+ mdconfig -d -u ${md}
}
mk_geli_gpt_zfs_uefi() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 9:05 PM (6 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31245719
Default Alt Text
D15846.id43876.diff (2 KB)
Attached To
Mode
D15846: rootgen.sh: complete all profiles except GELI+MBR (not supported)
Attached
Detach File
Event Timeline
Log In to Comment