[PC-BSD Testing] encrypting / during 8.1 install

Dru Lavigne drulavigne at sympatico.ca
Mon Oct 25 10:31:33 PDT 2010












> How did you setup the file-system layout for this USB stick? I.E. did
> you actually specify a /boot partition on /dev/da0 when you manually
> setup the layout?

Lots of bugs to report on that one :-)

Tried using the Disk screen to setup /boot. I setup the disk first (with / encrypted), then inserted the thumb drive and made a UFS /boot partition of 100MB. The installation perked along until it failed at the very end. The log is appended to the bottom of the email.

The first time I tried this on a thumb drive that had previously been UFS formatted using fdisk. This was a mistake as gpart corrupted the "secondary GPT table" making the flash device inaccessible after the installation failed. Tried again with an unformatted thumb drive; since the installation failed, /boot was not properly dismounted and fsck was unable to fix the partition (meaning /boot was lost).

Recommendation for 8.2 (if it's not already in there): have the installer give the option to not use gpart (like 9.0 will have). I can then warn users in the Handbook to not use gpart on the thumb drive.

Another bug is that you don't want to remove the USB drive during the install as it'll freeze the system.

Found a few more bugs trying to get the log off of the failed system and which should be fixed for 8.2:

- there is no scp in /usr/bin or sshd in /usr/sbin. I had to resort to using /usr/bin/sftp which is a roundabout way of transferring one file
- one can't use mail to mail themselves the log as it fails with this command:

mailwrapper: cannot exec /usr/libexec/sendmail/sendmail: No such file or directory

mail worked in 8.0 so something was removed/changed in 8.1

Cheers,

Dru

---

Running: find-update-parts
mount: no : No such file or directory
kern.geom.debugflags: 0 -> 16
Deleting all gparts
Running: gpart delete -i 1 ad0
ad0p1 deleted
Running: gpart delete -i 2 ad0
ad0p2 deleted
Running: gpart delete -i 3 ad0
ad0p3 deleted
Running: gpart delete -i 4 ad0
ad0p4 deleted
Running: gpart delete -i 5 ad0
gpart: Device busy
Running: dd if=/dev/zero of=/dev/ad0 count=3000
3000+0 records in
3000+0 records out
1536000 bytes transferred in 1.000514 secs (1535211 bytes/sec)
Cleaning up ad0
Running: dd if=/dev/zero of=/dev/ad0 count=2048
2048+0 records in
2048+0 records out
1048576 bytes transferred in 0.581908 secs (1801962 bytes/sec)
Running gpart on ad0
Running: gpart create -s GPT ad0
ad0 created
Running: gpart add -b 34 -s 128 -t freebsd-boot ad0
ad0p1 added
Stamping boot sector on ad0
Running: gpart bootcode -b /boot/pmbr ad0
ad0 has bootcode
kern.geom.debugflags: 16 -> 16
Deleting all gparts
Running: dd if=/dev/zero of=/dev/da0 count=3000
3000+0 records in
3000+0 records out
1536000 bytes transferred in 6.019565 secs (255168 bytes/sec)
Cleaning up da0
Running: dd if=/dev/zero of=/dev/da0 count=2048
2048+0 records in
2048+0 records out
1048576 bytes transferred in 4.093320 secs (256168 bytes/sec)
Running gpart on da0
Running: gpart create -s GPT da0
da0 created
Running: gpart add -b 34 -s 128 -t freebsd-boot da0
da0p1 added
Stamping boot sector on da0
Running: gpart bootcode -b /boot/pmbr da0
da0 has bootcode
Running: gpart add -s 2048M -t freebsd-ufs ad0
ad0p2 added
Running: gpart add -s 3070M -t freebsd-swap ad0
ad0p3 added
Running: gpart add -s 1024M -t freebsd-ufs ad0
ad0p4 added
Running: gpart add -s 32007M -t freebsd-ufs ad0
ad0p5 added
Running: gpart bootcode -p /boot/gptboot -i 1 ad0
Running: gpart add -s 100M -t freebsd-ufs da0
da0p2 added
Running: gpart bootcode -p /boot/gptboot -i 1 da0
Creating geli provider for ad0p2
Running: dd if=/dev/random of=/tmp/.pc-sysinstall/.geli-keys/ad0p2.key bs=64 count=1
1+0 records in
1+0 records out
64 bytes transferred in 0.000056 secs (1142279 bytes/sec)
Running: geli init -b -s 4096 -P -K /tmp/.pc-sysinstall/.geli-keys/ad0p2.key /dev/ad0p2

Metadata backup can be found in /var/backups/ad0p2.eli and
can be restored with the following command:

    # geli restore /var/backups/ad0p2.eli /dev/ad0p2

Running: geli attach -p -k /tmp/.pc-sysinstall/.geli-keys/ad0p2.key /dev/ad0p2
NEWFS: /dev/ad0p2 - UFS+S
Running: newfs -U /dev/ad0p2.eli
/dev/ad0p2.eli: 2048.0MB (4194296 sectors) block size 16384, fragment size 4096
    using 7 cylinder groups of 336.98MB, 21567 blks, 21568 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 690304, 1380448, 2070592, 2760736, 3450880, 4141024
Running: sync
Running: glabel label rootfs0 /dev/ad0p2.eli
Running: sync
Running: sync
Running: glabel label swap0 /dev/ad0p3
Running: sync
NEWFS: /dev/ad0p4 - UFS+S
Running: newfs -U /dev/ad0p4
/dev/ad0p4: 1024.0MB (2097152 sectors) block size 16384, fragment size 2048
    using 6 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920
Running: sync
Running: glabel label var0 /dev/ad0p4
Running: sync
NEWFS: /dev/ad0p5 - UFS+S
Running: newfs -U /dev/ad0p5
/dev/ad0p5: 32007.0MB (65550336 sectors) block size 16384, fragment size 2048
    using 175 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
    with soft updates
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792,
 6398144, 6774496, 7150848, 7527200, 7903552, 8279904, 8656256, 9032608,
 9408960, 9785312, 10161664, 10538016, 10914368, 11290720, 11667072, 12043424,
 12419776, 12796128, 13172480, 13548832, 13925184, 14301536, 14677888,
 15054240, 15430592, 15806944, 16183296, 16559648, 16936000, 17312352,
 17688704, 18065056, 18441408, 18817760, 19194112, 19570464, 19946816,
 20323168, 20699520, 21075872, 21452224, 21828576, 22204928, 22581280,
 22957632, 23333984, 23710336, 24086688, 24463040, 24839392, 25215744,
 25592096, 25968448, 26344800, 26721152, 27097504, 27473856, 27850208,
 28226560, 28602912, 28979264, 29355616, 29731968, 30108320, 30484672,
 30861024, 31237376, 31613728, 31990080, 32366432, 32742784, 33119136,
 33495488, 33871840, 34248192, 34624544, 35000896, 35377248, 35753600,
 36129952, 36506304, 36882656, 37259008, 37635360, 38011712, 38388064,
 38764416, 39140768, 39517120, 39893472, 40269824, 40646176, 41022528,
 41398880, 41775232, 42151584, 42527936, 42904288, 43280640, 43656992,
 44033344, 44409696, 44786048, 45162400, 45538752, 45915104, 46291456,
 46667808, 47044160, 47420512, 47796864, 48173216, 48549568, 48925920,
 49302272, 49678624, 50054976, 50431328, 50807680, 51184032, 51560384,
 51936736, 52313088, 52689440, 53065792, 53442144, 53818496, 54194848,
 54571200, 54947552, 55323904, 55700256, 56076608, 56452960, 56829312,
 57205664, 57582016, 57958368, 58334720, 58711072, 59087424, 59463776,
 59840128, 60216480, 60592832, 60969184, 61345536, 61721888, 62098240,
 62474592, 62850944, 63227296, 63603648, 63980000, 64356352, 64732704,
 65109056, 65485408
Running: sync
Running: glabel label usr0 /dev/ad0p5
Running: sync
NEWFS: /dev/da0p2 - UFS
Running: newfs /dev/da0p2
/dev/da0p2: 100.0MB (204800 sectors) block size 16384, fragment size 2048
    using 4 cylinder groups of 25.02MB, 1601 blks, 3264 inodes.
super-block backups (for fsck -b #) at:
 160, 51392, 102624, 153856
Running: sync
Running: glabel label boot0 /dev/da0p2
Running: sync
mount -o rw /dev/ad0p2.eli -> /mnt/
Running: mount -o rw /dev/ad0p2.eli /mnt/
swapon ad0p3
Running: swapon /dev/ad0p3
mount -o rw /dev/ad0p4 -> /mnt/var
Running: mount -o rw /dev/ad0p4 /mnt/var
mount -o rw /dev/ad0p5 -> /mnt/usr
Running: mount -o rw /dev/ad0p5 /mnt/usr
mount -o rw /dev/da0p2 -> /mnt/boot
Running: mount -o rw /dev/da0p2 /mnt/boot
FOUND DVD: /dev/cd0
pc-sysinstall: Starting Extraction
pc-sysinstall: Extraction Finished
Running chroot command: /usr/bin/cap_mkdb /etc/login.conf
Setting em0 to DHCP on the system.
Running chroot command: cat /.tmpPass | pw useradd -n a -c "a" -h 0 -s "/bin/csh" -m -d "/home/a" -G "wheel,operator"
Running: rm /mnt/.tmpPass
Running chroot command: cp /usr/PCBSD/xorg-gui/conf/ttys.xsetup /etc/ttys
Running chroot command: sh /usr/PCBSD/Scripts/reset-firewall
Setting hostname: pcbsd-844
Setting root password
Running chroot command: cat /.rootpw | pw usermod root -h 0
Running: rm /mnt/.rootpw
Running: mkdir -p /mnt//boot-mount/boot
Running: mv /mnt/boot/* /mnt/boot-mount/boot/
mv: rename /mnt/boot/* to /mnt/boot-mount/boot/*: Device not configured
Error 1: mv /mnt/boot/* /mnt/boot-mount/boot/
Running: umount -f /dev/ad0p4
Running: umount -f /mnt/var
umount: /mnt/var: not a file system root directory
Running: umount -f /dev/ad0p5
Running: umount -f /mnt/usr
umount: /mnt/usr: not a file system root directory
Running: umount -f /dev/da0p2
Running: umount -f /mnt/boot
umount: /mnt/boot: not a file system root directory
Running: umount -f /mnt
Running: umount /cdmnt-install

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/testing/attachments/20101025/0970ed70/attachment.html>


More information about the Testing mailing list