[DragonFlyBSD - Bug #1948] Hammer PFS weirdness when encrypting root
bugtracker-admin at leaf.dragonflybsd.org
bugtracker-admin at leaf.dragonflybsd.org
Fri Dec 21 01:28:19 PST 2018
Issue #1948 has been updated by martin1234.
Description updated
Install the sync app,then easily to change your settings windows 10,How do I sync my settings in windows 10 http://windowstuts.net/synchronize-settings/ sometime users try to change internet setting,but can't,so let's see here and using the simple tips.
----------------------------------------
Bug #1948: Hammer PFS weirdness when encrypting root
http://bugs.dragonflybsd.org/issues/1948#change-13565
* Author: t_dfbsd
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version:
----------------------------------------
I ran into a weird issue while building an encrypted root filesystem. I
used the script below to build the encrypted root. Right after this runs,
"ls /mnt/usr" and "ls /mnt/var" show the expected files and directories.
However, if I unmount root and remount it, I find that the contents of /usr
and /var have swapped. I can easily fix it by renaming /pfs/usr to /pfs/var
and vice versa. The script works fine on a non-encrypted root, so I'm
wondering if it is somehow related to the mapper. I'm running 2.9.1.176.
kldload dm
cryptsetup -y luksFormat /dev/da1s1d
cryptsetup luksOpen /dev/da1s1d root || exit 1
newfs_hammer -L ROOT /dev/mapper/root
mount_hammer /dev/mapper/root /mnt
mkdir /mnt/boot
mount /dev/da0s1a /mnt/boot
mkdir /mnt/pfs
hammer pfs-master /mnt/pfs/usr
hammer pfs-master /mnt/pfs/usr.obj
hammer pfs-master /mnt/pfs/var
hammer pfs-master /mnt/pfs/var.crash
hammer pfs-master /mnt/pfs/var.tmp
hammer pfs-master /mnt/pfs/tmp
hammer pfs-master /mnt/pfs/home
mkdir /mnt/usr
mkdir /mnt/var
mkdir /mnt/tmp
mkdir /mnt/home
mount_null /mnt/pfs/usr /mnt/usr
mount_null /mnt/pfs/var /mnt/var
mount_null /mnt/pfs/tmp /mnt/tmp
mount_null /mnt/pfs/home /mnt/home
mkdir /mnt/usr/obj
mkdir /mnt/var/tmp
mkdir /mnt/var/crash
mount_null /mnt/pfs/var.tmp /mnt/var/tmp
mount_null /mnt/pfs/var.crash /mnt/var/crash
mount_null /mnt/pfs/usr.obj /mnt/usr/obj
chmod 1777 /mnt/tmp
chmod 1777 /mnt/var/tmp
cpdup -o / /mnt
cpdup -o /boot /mnt/boot
cpdup -o /usr /mnt/usr
cpdup -o /var /mnt/var
cpdup -i0 /etc /mnt/etc
chflags -R nohistory /mnt/tmp
chflags -R nohistory /mnt/var/tmp
chflags -R nohistory /mnt/var/crash
chflags -R nohistory /mnt/usr/obj
---Files--------------------------------
unnamed (2.3 KB)
unnamed (1.96 KB)
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
More information about the Bugs
mailing list