From owner-freebsd-geom@FreeBSD.ORG Mon Jun 8 11:06:53 2009 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 854A6106566C for ; Mon, 8 Jun 2009 11:06:53 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 72BF78FC26 for ; Mon, 8 Jun 2009 11:06:53 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n58B6rgo020642 for ; Mon, 8 Jun 2009 11:06:53 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n58B6q6E020638 for freebsd-geom@FreeBSD.org; Mon, 8 Jun 2009 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 8 Jun 2009 11:06:52 GMT Message-Id: <200906081106.n58B6q6E020638@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/134922 geom [gmirror] [panic] kernel panic when use fdisk on disk o kern/134113 geom [geli] Problem setting secondary GELI key o kern/134044 geom [geom] gmirror(8) overwrites fs with stale data from r o kern/133931 geom [geli] [request] intentionally wrong password to destr o bin/132845 geom [geom] [patch] ggated(8) does not close files opened a o kern/132273 geom glabel(8): [patch] failing on journaled partition o kern/132242 geom [gmirror] gmirror.ko fails to fully initialize o kern/131353 geom [geom] gjournal(8) kernel lock o kern/131037 geom [geli] Unable to create disklabel on .eli-Device p docs/130548 geom [patch] gjournal(8) man page is missing sysctls o kern/130528 geom gjournal fsck during boot o kern/129674 geom [geom] gjournal root did not mount on boot o kern/129645 geom gjournal(8): GEOM_JOURNAL causes system to fail to boo o kern/129245 geom [geom] gcache is more suitable for suffix based provid o bin/128398 geom [patch] glabel(8): teach geom_label to recognise gpt l f kern/128276 geom [gmirror] machine lock up when gmirror module is used o kern/126902 geom [geom] geom_label: kernel panic during install boot o kern/124973 geom [gjournal] [patch] boot order affects geom_journal con o kern/124969 geom gvinum(8): gvinum raid5 plex does not detect missing s o kern/124294 geom [geom] gmirror(8) have inappropriate logic when workin o kern/124130 geom [gmirror] [usb] gmirror fails to start usb devices tha o kern/123962 geom [panic] [gjournal] gjournal (455Gb data, 8Gb journal), o kern/123630 geom [patch] [gmirror] gmirror doesnt allow the original dr o kern/123122 geom [geom] GEOM / gjournal kernel lock o kern/122738 geom [geom] gmirror list "losts consumers" after gmirror de f kern/122415 geom [geom] UFS labels are being constantly created and rem o kern/122067 geom [geom] [panic] Geom crashed during boot o kern/121559 geom [patch] [geom] geom label class allows to create inacc o kern/121481 geom [gmirror] data rot on disk with gmirror o kern/121364 geom [gmirror] Removing all providers create a "zombie" mir o kern/120231 geom [geom] GEOM_CONCAT error adding second drive o kern/120091 geom [geom] [geli] [gjournal] geli does not prompt for pass o kern/120044 geom [msdosfs] [geom] incorrect MSDOSFS label fries adminis o kern/120021 geom [geom] [panic] net-p2p/qbittorrent crashes system when o kern/119743 geom [geom] geom label for cds is keeped after dismount and p kern/116896 geom [geom] [patch] Typo in a kassert in GEOM o kern/115856 geom [geli] ZFS thought it was degraded when it should have o kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro o kern/114532 geom [geom] GEOM_MIRROR shows up in kldstat even if compile o kern/113957 geom [gmirror] gmirror is intermittently reporting a degrad o kern/113885 geom [gmirror] [patch] improved gmirror balance algorithm o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113419 geom [geom] geom fox multipathing not failing back p bin/110705 geom gmirror(8) control utility does not exit with correct o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to o kern/104389 geom [geom] [patch] sys/geom/geom_dump.c doesn't encode XML o kern/98034 geom [geom] dereference of NULL pointer in acd_geom_detach o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/90582 geom [geom] [panic] Restore cause panic string (ffs_blkfree o bin/90093 geom fdisk(8) incapable of altering in-core geometry a kern/89660 geom [vinum] [patch] [panic] due to g_malloc returning null o kern/89546 geom [geom] GEOM error s kern/89102 geom [geom] [panic] panic when forced unmount FS from unplu o kern/88601 geom [geli] geli cause kernel panic under heavy disk usage o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o kern/84556 geom [geom] [panic] GBDE-encrypted swap causes panic at shu o bin/81779 geom misleading error messages in geom(8) utilities. o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/79035 geom [vinum] gvinum unable to create a striped set of mirro o bin/78131 geom gbde(8) "destroy" not working. s kern/73177 geom kldload geom_* causes panic due to memory exhaustion 61 problems total. From owner-freebsd-geom@FreeBSD.ORG Mon Jun 8 19:47:08 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7312D106564A for ; Mon, 8 Jun 2009 19:47:08 +0000 (UTC) (envelope-from jeff+freebsd@wagsky.com) Received: from mail.wagsky.com (wildside.wagsky.com [75.101.96.15]) by mx1.freebsd.org (Postfix) with ESMTP id ADA8E8FC13 for ; Mon, 8 Jun 2009 19:47:03 +0000 (UTC) (envelope-from jeff+freebsd@wagsky.com) Received: from [172.16.0.86] (mail.guidewire.com [69.108.213.131]) by mail.wagsky.com (Postfix) with ESMTPSA id CD3942842A; Mon, 8 Jun 2009 12:28:29 -0700 (PDT) Message-ID: <4A2D6652.4050008@wagsky.com> Date: Mon, 08 Jun 2009 12:28:18 -0700 From: Jeff Kletsky User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: GPT fails to be recognized by BIOS boot, Intel Atom 330 D945GCLF2, 7.2-RELEASE X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 19:47:08 -0000 I'm puzzled -- the eventual goal was to get GPT/gmirror/gjournal up and running on four boxes here, at least until ZFS boot was a little more mainstream. After getting what I thought to be a good configuration built up and installed on, it failed to boot. I confirmed that I could build a MBR-based system on the same drive on the same platform (Intel Atom 330 on Intel D945GCLF2 motherboard, 2 GB RAM, BIOS LF94510J.86A.0140.2008.1231.0012, later updated to BIOS LF94510J.86A.0182.2008.1231.0012) BIOS later than the troublesome one indicated in http://www.freebsd.org/cgi/getmsg.cgi?fetch=430283+0+/usr/local/www/db/text/2009/freebsd-questions/20090329.freebsd-questions and later updated (without apparent change in behavior) to 0182 http://downloadmirror.intel.com/17694/eng/LF_0182_ReleaseNotes.pdf After this, I went back to confirming that 7.2-RELEASE on AMD64 would boot the machine properly on an MBR-based setup on the same physical drive and SATA channel (it does), and then just trying to get GPT-boot to work. Installs are from 7.2-RELEASE AMD64 DVD, as is the "Fixit" environment. I've tried several different approaches, using both gpt and gpart, none of which seem to be able to boot the system. Bizzarely enough, if I do try to boot the GPT disk, with a functional, bootable MBR-based system either on the PATA or on a USB stick, that drive is also no longer bootable. I've tried the approaches outlined by * [GUID] GPT howto -- https://forums.freebsd.org/showthread.php?t=1305 (gpt-based) * http://m8d.de/news/freebsd-on-gpt.php (gpart-based) and the suggestions that gpart should be used instead of gpt in http://forums.freebsd.org/showthread.php?t=1196 by "richardpl" Any suggestions as to how to resolve this (or at least debug it) would be welcome. Thanks! Jeff Not shown are the 'gpart show' commands and responses to determine the next starting offset, as well as a few ls and related commands to make sure I was in the right place. Fixit# df -h Filesystem Size Used Avail Capacity Mounted on /dev/md0 3.7M 2.8M 954K 75% / devfs 1.0K 1.0K 0B 100% /dev /dev/acd0 2.3G 2.3G 0B 100% /dist /dev/da0s1 15G 1.0M 15G 0% /corsair Fixit# gpart show ad4 gpart: No such geom: ad4. Fixit# sysctl kern.geom.debugflags kern.geom.debugflags: 0 Fixit# sysctl kern.geom.debugflags=17 kern.geom.debugflags: 0 -> 17 Fixit# dd if=/dev/zero of=/dev/ad4 bs=512 count=1024 1024+0 records in 1024+0 records out 524288 bytes transferred in 0.819502 secs (639764 bytes/sec) Fixit# gpart show ad4 gpart: No such geom: ad4. Fixit# gpart create -s GPT ad4 ad4 created Fixit# gpart add -b 34 -s 128 -t freebsd-boot ad4 ad4p1 added Fixit# gpart add -b 162 -s 2097152 -t freebsd-ufs ad4 ad4p2 added Fixit# gpart add -b 2097314 -s 8388608 -t freebsd-swap ad4 ad4p3 added Fixit# gpart add -b 10485922 -s 12582912 -t freebsd-ufs ad4 ad4p4 added Fixit# gpart add -b 23068834 -s 12582912 -t freebsd-ufs ad4 ad4p5 added Fixit# gpart add -b 35651746 -s 23068672 -t freebsd-ufs ad4 ad4p6 added Fixit# gpart add -b 58720418 -s 23068672 -t freebsd-ufs ad4 ad4p7 added Fixit# cd /dist/boot Fixit# gpart bootcode -b /dist/boot/pmbr ad4 ad4 has bootcode Fixit# gpart show ad4 => 34 976773101 ad4 GPT (466G) 34 128 1 freebsd-boot (64K) 162 2097152 2 freebsd-ufs (1.0G) 2097314 8388608 3 freebsd-swap (4.0G) 10485922 12582912 4 freebsd-ufs (6.0G) 23068834 12582912 5 freebsd-ufs (6.0G) 35651746 23068672 6 freebsd-ufs (11G) 58720418 23068672 7 freebsd-ufs (11G) 81789090 894984045 - free - (427G) Fixit# gpt show ad4 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 128 1 GPT part - FreeBSD boot 162 2097152 2 GPT part - FreeBSD UFS/UFS2 2097314 8388608 3 GPT part - FreeBSD swap 10485922 12582912 4 GPT part - FreeBSD UFS/UFS2 23068834 12582912 5 GPT part - FreeBSD UFS/UFS2 35651746 23068672 6 GPT part - FreeBSD UFS/UFS2 58720418 23068672 7 GPT part - FreeBSD UFS/UFS2 81789090 894984045 976773135 32 Sec GPT table 976773167 1 Sec GPT header Fixit# gpart bootcode -p /dist/boot/gptboot -i 1 ad4 Fixit# newfs -L root /dev/ad4p2 Fixit# newfs -UL var /dev/ad4p4 Fixit# newfs -UL tmp /dev/ad4p5 Fixit# newfs -UL usr /dev/ad4p6 Fixit# newfs -UL vartmp /dev/ad4p7 Fixit# mount /dev/ad4p2 /mnt Fixit# cd /mnt Fixit# mkdir var tmp usr Fixit# mount /dev/ad4p4 var Fixit# mount /dev/ad4p5 tmp Fixit# mount /dev/ad4p6 usr Fixit# mkdir var/tmp Fixit# mount /dev/ad4p7 var/tmp Fixit# df -h Filesystem Size Used Avail Capacity Mounted on /dev/md0 3.7M 2.8M 954K 75% / devfs 1.0K 1.0K 0B 100% /dev /dev/acd0 2.3G 2.3G 0B 100% /dist /dev/da0s1 15G 1.1M 15G 0% /corsair /dev/ad4p2 989M 10K 910M 0% /mnt /dev/ad4p4 5.8G 6.0K 5.3G 0% /mnt/var /dev/ad4p5 5.8G 4.0K 5.3G 0% /mnt/tmp /dev/ad4p6 11G 4.0K 9.8G 0% /mnt/usr /dev/ad4p7 11G 4.0K 9.8G 0% /mnt/var/tmp Fixit# cd /dist Fixit# cd 7.2-RELEASE Fixit# cd base Fixit# export DESTDIR='/mnt' Fixit# ./install.sh You are about to extract the base distribution into /mnt - are you SURE you want to do this over your installed system (y/n)? y Fixit# cd ../kernels Fixit# ./install.sh GENERIC Fixit# cd /mnt/boot Fixit# cp -rp GENERIC/ kernel Fixit# diff -r GENERIC kernel Fixit# exit Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.2-RELEASE #0: Fri May 1 07:18:07 UTC 2009 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Atom(TM) CPU 330 @ 1.60GHz (1618.36-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x106c2 Stepping = 2 Features=0xbfe9fbff Features2=0x40e31d> AMD Features=0x20100800 AMD Features2=0x1 Cores per package: 2 Logical CPUs per core: 2 usable memory = 2120077312 (2021 MB) avail memory = 2044051456 (1949 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP/HT): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP/HT): APIC ID: 3 ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0x20e0-0x20e7 mem 0x90200000-0x9027ffff,0x80000000-0x8fffffff,0x90280000-0x902bffff irq 16 at device 2.0 on pci0 agp0: on vgapci0 agp0: detected 7932k stolen memory agp0: aperture size is 256M pci0: at device 27.0 (no driver attached) pcib1: at device 28.0 on pci0 pci1: on pcib1 re0: port 0x1000-0x10ff mem 0x90100000-0x90100fff,0x90000000-0x9000ffff irq 16 at device 0.0 on pci1 re0: Using 1 MSI messages re0: Chip rev. 0x3c000000 re0: MAC rev. 0x00400000 miibus0: on re0 rgephy0: PHY 1 on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto re0: Ethernet address: 00:1c:c0:cd:99:9c re0: [FILTER] pcib2: at device 28.2 on pci0 pci2: on pcib2 pcib3: at device 28.3 on pci0 pci3: on pcib3 uhci0: port 0x2080-0x209f irq 23 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] uhci0: [ITHREAD] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x2060-0x207f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] uhci1: [ITHREAD] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x2040-0x205f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] uhci2: [ITHREAD] usb2: on uhci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered uhci3: port 0x2020-0x203f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] uhci3: [ITHREAD] usb3: on uhci3 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0x902c4000-0x902c43ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: on usb4 uhub4: 8 ports with 8 removable, self powered umass0: on uhub4 pcib4: at device 30.0 on pci0 pci4: on pcib4 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x20b0-0x20bf irq 18 at device 31.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] atapci1: port 0x20c8-0x20cf,0x20ec-0x20ef,0x20c0-0x20c7,0x20e8-0x20eb,0x20a0-0x20af irq 19 at device 31.2 on pci0 atapci1: [ITHREAD] ata2: on atapci1 ata2: [ITHREAD] ata3: on atapci1 ata3: [ITHREAD] pci0: at device 31.3 (no driver attached) ppc0: port 0x378-0x37f,0x778-0x77f irq 7 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 ppbus0: [ITHREAD] plip0: on ppbus0 plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 ppc0: [GIANT-LOCKED] ppc0: [ITHREAD] atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio0: [FILTER] cpu0: on acpi0 p4tcc0: on cpu0 cpu1: on acpi0 p4tcc1: on cpu1 cpu2: on acpi0 p4tcc2: on cpu2 cpu3: on acpi0 p4tcc3: on cpu3 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec md0: Preloaded image 4194304 bytes at 0xffffffff80cd23e0 GEOM_LABEL: Label for provider md0 is ufsid/49faae8a8342179f. acd0: DVDR at ata0-slave UDMA33 ad4: 476940MB at ata2-master SATA150 GEOM_LABEL: Label for provider acd0 is iso9660/FreeBSD_Install. SMP: AP CPU #1 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #3 Launched! da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 15424MB (31588352 512 byte sectors: 255H 63S/T 1966C) GEOM_LABEL: Label for provider da0s1 is msdosfs/CORSAIR16G. Trying to mount root from ufs:/dev/md0 GEOM_LABEL: Label ufsid/49faae8a8342179f removed. GEOM_LABEL: Label msdosfs/CORSAIR16G removed. From owner-freebsd-geom@FreeBSD.ORG Tue Jun 9 19:45:55 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B80E31065672 for ; Tue, 9 Jun 2009 19:45:55 +0000 (UTC) (envelope-from listat@apz.fi) Received: from basestar1.apz.fi (basestar1.apz.fi [62.237.4.40]) by mx1.freebsd.org (Postfix) with ESMTP id 73B658FC12 for ; Tue, 9 Jun 2009 19:45:55 +0000 (UTC) (envelope-from listat@apz.fi) Received: from localhost (localhost [127.0.0.1]) by basestar1.apz.fi (Postfix) with ESMTP id 14810272C2A for ; Tue, 9 Jun 2009 22:27:05 +0300 (EEST) X-Virus-Scanned: by amavisd-new at basestar1. Got none of those nasty buggers! Received: from basestar1.apz.fi ([127.0.0.1]) by localhost (basestar1.apz.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZqfXY7fX3dTM for ; Tue, 9 Jun 2009 22:27:00 +0300 (EEST) Received: from [214.1.1.1] (adsl-109-212-210.kymp.net [77.109.212.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by basestar1.apz.fi (Postfix) with ESMTPSA id 22D65272C26 for ; Tue, 9 Jun 2009 22:27:00 +0300 (EEST) Message-ID: <4A2EB780.2020607@apz.fi> Date: Tue, 09 Jun 2009 22:26:56 +0300 From: =?ISO-8859-1?Q?Ari_Sovij=E4rvi?= User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Geli and EVP_camellia_256_cbc X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 19:45:56 -0000 Hi folks. I tried to set up an encypted swap partition with Geli as described in the handbook. However, during the reboot, the encswap-script caused the following error: geli: Cannot open library: /lib/geom/geom_eli.so: Undefined symbol "EVP_camellia_256_cbc". The system is: FreeBSD 7.2-RELEASE (RAINFALL) #0: Tue Jun 9 15:31:12 EEST 2009 sparc64 I originally ran into this problem with 7.1, and I upgraded to 7.2 today to see if the problem was fixed in that. TIA for any clues for solving this one :) -- Ari Sovijärvi From owner-freebsd-geom@FreeBSD.ORG Wed Jun 10 07:57:50 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4141106567D for ; Wed, 10 Jun 2009 07:57:50 +0000 (UTC) (envelope-from bo.coopci@i-waihui.com) Received: from mail-pz0-f195.google.com (mail-pz0-f195.google.com [209.85.222.195]) by mx1.freebsd.org (Postfix) with ESMTP id A5D5B8FC0A for ; Wed, 10 Jun 2009 07:57:50 +0000 (UTC) (envelope-from bo.coopci@i-waihui.com) Received: by pzk33 with SMTP id 33so560058pzk.3 for ; Wed, 10 Jun 2009 00:57:50 -0700 (PDT) Received: by 10.114.37.1 with SMTP id k1mr1611254wak.194.1244620670121; Wed, 10 Jun 2009 00:57:50 -0700 (PDT) Received: from ?10.217.15.144? ([61.135.152.194]) by mx.google.com with ESMTPS id m31sm8484314wag.66.2009.06.10.00.57.46 (version=SSLv3 cipher=RC4-MD5); Wed, 10 Jun 2009 00:57:49 -0700 (PDT) Message-ID: <4A2F6778.4050200@gmail.com> Date: Wed, 10 Jun 2009 15:57:44 +0800 From: cooper User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Subject: how is multipath information stored X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 07:57:51 -0000 Hi, folks. I wander where FreeBSD saves the information about the geom, for instance which underlying devices are used to construct a multipath label and what's the name of the label. In another word, how does the system restore the multipathes which I configured before the last reboot during the start up phase. From owner-freebsd-geom@FreeBSD.ORG Wed Jun 10 08:16:50 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C1A1065673 for ; Wed, 10 Jun 2009 08:16:50 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6B98FC15 for ; Wed, 10 Jun 2009 08:16:49 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: by an-out-0708.google.com with SMTP id c3so336832ana.13 for ; Wed, 10 Jun 2009 01:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=q7RcLudWQYV0lCR0bxux1u4Awyj+rzruPf8dBIvwku8=; b=ETghBrIgZrlGH8JoqN/6GEmD5dEV0hF/dmGU1HCw2h77DvPEoc8VUDRn9iaaLJoTrY 1fNCWwjMIOOUXbmOv46yzgBawCpncizsfAxCQG5Gcqttyz8WIsWUnKNCeRJB3kvrL0xU XZVPAHHpEZ/x+F4H32yNkBtEJv7LJGFTpPJuo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=SRSlfwYnUvKDAehjs514IGI55J8j5MO/svbY2JO2msP0dBSAk6+KN4NxHr43+HUeS4 z4O1eyXkYXeS42YnQR9pulVjMnqRcMz16s9JDlre85xgJXBZEeBfn783QotIoRIB/Jvo WgVgFmMGweg52oW8Uo2SGczpeYlLtkAF7UtH0= MIME-Version: 1.0 Received: by 10.100.231.4 with SMTP id d4mr946827anh.24.1244621809429; Wed, 10 Jun 2009 01:16:49 -0700 (PDT) In-Reply-To: <4A2F6778.4050200@gmail.com> References: <4A2F6778.4050200@gmail.com> Date: Wed, 10 Jun 2009 11:16:49 +0300 Message-ID: From: Dan Naumov To: cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: how is multipath information stored X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 08:16:50 -0000 This is a really wild guess (so correct me if I am wrong), but I would guess this information is stored as metadata inside the geom provider after you have initialized it, so on boot, GEOM searches for any providers attached, reads their metadata and loads them accordingly. What has me curious though is what happens if you, for example, swap a few disks around so your (for example) /dev/ad1 "this boot" isn't the same as the /dev/ad1 the previous time. Are GEOM labels unique? If they are, it is obviously possible for GEOM to transparently restore your configuration after you have changed your disk configuration. But if they aren't, it could be quite a pain in certain situations... - Dan Naumov 2009/6/10 cooper : > Hi, folks. > I wander where FreeBSD saves the information about the geom, for > instance which underlying devices are used to construct a multipath > label and what's the name of the label. In another word, how does the > system restore the multipathes which I configured before the last reboot > during the start up phase. > _______________________________________________ > freebsd-geom@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-geom > To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org" > From owner-freebsd-geom@FreeBSD.ORG Wed Jun 10 09:12:11 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24BB41065673 for ; Wed, 10 Jun 2009 09:12:11 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id D573A8FC21 for ; Wed, 10 Jun 2009 09:12:10 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MEJqr-0002Sz-3H for freebsd-geom@freebsd.org; Wed, 10 Jun 2009 09:12:09 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jun 2009 09:12:09 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jun 2009 09:12:09 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Wed, 10 Jun 2009 11:12:06 +0200 Lines: 35 Message-ID: References: <4A2EB780.2020607@apz.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.21 (X11/20090409) In-Reply-To: <4A2EB780.2020607@apz.fi> Sender: news Subject: Re: Geli and EVP_camellia_256_cbc X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 09:12:11 -0000 Ari Sovij=C3=A4rvi wrote: > Hi folks. >=20 > I tried to set up an encypted swap partition with Geli as described in > the handbook. However, during the reboot, the encswap-script caused the= > following error: >=20 > geli: Cannot open library: /lib/geom/geom_eli.so: Undefined symbol > "EVP_camellia_256_cbc". >=20 > The system is: > FreeBSD 7.2-RELEASE (RAINFALL) #0: Tue Jun 9 15:31:12 EEST 2009 sparc6= 4 >=20 > I originally ran into this problem with 7.1, and I upgraded to 7.2 toda= y > to see if the problem was fixed in that. >=20 > TIA for any clues for solving this one :) Possibly your world is not in sync. /usr/lib> strings libssl.so | grep EVP EVP_des_cbc EVP_add_cipher EVP_des_ede3_cbc EVP_rc4 EVP_rc2_cbc EVP_aes_128_cbc EVP_aes_192_cbc EVP_aes_256_cbc EVP_camellia_128_cbc EVP_camellia_256_cbc From owner-freebsd-geom@FreeBSD.ORG Thu Jun 11 17:14:17 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EABA1065697 for ; Thu, 11 Jun 2009 17:14:17 +0000 (UTC) (envelope-from listat@apz.fi) Received: from basestar1.apz.fi (basestar1.apz.fi [62.237.4.40]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5808FC1F for ; Thu, 11 Jun 2009 17:14:16 +0000 (UTC) (envelope-from listat@apz.fi) Received: from localhost (localhost [127.0.0.1]) by basestar1.apz.fi (Postfix) with ESMTP id 8DAA4272C59 for ; Thu, 11 Jun 2009 20:14:14 +0300 (EEST) X-Virus-Scanned: by amavisd-new at basestar1. Got none of those nasty buggers! Received: from basestar1.apz.fi ([127.0.0.1]) by localhost (basestar1.apz.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hi4O8ElzVpml for ; Thu, 11 Jun 2009 20:14:09 +0300 (EEST) Received: from [214.1.1.1] (adsl-109-212-210.kymp.net [77.109.212.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by basestar1.apz.fi (Postfix) with ESMTPSA id 97311272C57 for ; Thu, 11 Jun 2009 20:14:09 +0300 (EEST) Message-ID: <4A313B5E.3040300@apz.fi> Date: Thu, 11 Jun 2009 20:14:06 +0300 From: =?ISO-8859-1?Q?Ari_Sovij=E4rvi?= User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Geli and EVP_camellia_256_cbc X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 17:14:17 -0000 Ivan Voras wrote: > Possibly your world is not in sync. > /usr/lib> strings libssl.so | grep EVP > EVP_des_cbc > EVP_add_cipher > EVP_des_ede3_cbc > EVP_rc4 > EVP_rc2_cbc > EVP_aes_128_cbc > EVP_aes_192_cbc > EVP_aes_256_cbc > EVP_camellia_128_cbc > EVP_camellia_256_cbc That command does not list camellia, as it's disabled in sparc64 builds. Looking at openssl's source (especially crypto/openssl/crypto/evp/e_camellia.c), there's a condition not to build camellia if OPENSSL_NO_CAMELLIA is defined. In opensslconf-sparc64.h again that gets set, but that condition isn't in geom, so apparently in sparc64 geli is broken to my understanding. Could someone with more in-depth knowledge about geli verify this finding, or alternatively try this on a sparc64 system? I have couple of the systems online, one with 7.1 and the other with 7.2, both seem to behave the same way. I've also have one i386 7.2 system (from the same source), and it seems to work. -- Ari Sovijärvi From owner-freebsd-geom@FreeBSD.ORG Fri Jun 12 18:11:23 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C6AE106567A for ; Fri, 12 Jun 2009 18:11:23 +0000 (UTC) (envelope-from jeff+freebsd@wagsky.com) Received: from mail.wagsky.com (wildside.wagsky.com [75.101.96.15]) by mx1.freebsd.org (Postfix) with ESMTP id CC4278FC19 for ; Fri, 12 Jun 2009 18:11:22 +0000 (UTC) (envelope-from jeff+freebsd@wagsky.com) Received: from [172.16.0.86] (mail.guidewire.com [69.108.213.131]) by mail.wagsky.com (Postfix) with ESMTPSA id 48CD12842A; Fri, 12 Jun 2009 11:11:27 -0700 (PDT) Message-ID: <4A329A44.9060505@wagsky.com> Date: Fri, 12 Jun 2009 11:11:16 -0700 From: Jeff Kletsky User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: freebsd-geom@freebsd.org References: <4A2D6652.4050008@wagsky.com> In-Reply-To: <4A2D6652.4050008@wagsky.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: GPT fails to be recognized by BIOS boot, Intel Atom 330 D945GCLF2, 7.2-RELEASE X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 18:11:23 -0000 Jeff Kletsky wrote: > After getting what I thought to be a good configuration built up and > installed on, it failed to boot. I confirmed that I could build a > MBR-based system on the same drive on the same platform > (Intel Atom 330 on Intel D945GCLF2 motherboard, 2 GB RAM, > BIOS LF94510J.86A.0140.2008.1231.0012, later updated to > BIOS LF94510J.86A.0182.2008.1231.0012) > > [...] > > I've tried several different approaches, using both gpt and gpart, > none of which seem to be able to boot the system. Bizzarely enough, if > I do try to boot the GPT disk, with a functional, bootable MBR-based > system > either on the PATA or on a USB stick, that drive is also no longer > bootable. > The problem appears to be with the MB and BIOS (consistent on three different boards). For some set of reasonable BIOS settings, the machine will enter a state where it will not recognize anything I've tried but a CD/DVD as bootable (even though they boot other systems). I've since confirmed that I can create bootable gjournal on gmirror on GPT via gpart for AMD64. Intel not supplying help until I use 'approved" memory (I'm using a Corsair 2G stick that they've only tested the 1G and below versions). http://communities.intel.com/message/25506 contains pointers to several Intel forums issues, as well as the OCZ forums where this has been deeply explored. From owner-freebsd-geom@FreeBSD.ORG Fri Jun 12 20:44:24 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64B59106566B for ; Fri, 12 Jun 2009 20:44:24 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 1DFC58FC08 for ; Fri, 12 Jun 2009 20:44:23 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: by an-out-0708.google.com with SMTP id c3so1346315ana.13 for ; Fri, 12 Jun 2009 13:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PQ2vmbObalLij147hWJWFJdcPQ7P0G4G0poqBfyuSbU=; b=gjR69FZkrwqE98Mx8EPOdPB47i8HP9IIR0R2tmS28mm8ZpvTKawyJsro4OODd0AnZW +NJKVexq+hnOCWigv2S7jiiBk/ksef+PtkwVBAaNWy168SyJIPDhT8n6DiOBa57Ive+L TOFRxEXE3367LxuTd7a3fDxhgs4JUu9wyKQig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Z7kLjsU4oloI2/KKVJVRMPAcIEAP47PtVYFDHL7X2aKRAohO5/L+uUb2vTTo9LNc0l fLN7BGDREC72Z3u3M44kNTT7kPU4dy6pio6/NBrN1+fbFflgaO5ILxsZfq31l+zkW5eL z+ry1VxbSCce3A9hUsyOhznCutxL9kGkpuGPY= MIME-Version: 1.0 Received: by 10.100.154.17 with SMTP id b17mr5530533ane.45.1244839462815; Fri, 12 Jun 2009 13:44:22 -0700 (PDT) In-Reply-To: <4A329A44.9060505@wagsky.com> References: <4A2D6652.4050008@wagsky.com> <4A329A44.9060505@wagsky.com> Date: Fri, 12 Jun 2009 23:44:22 +0300 Message-ID: From: Dan Naumov To: Jeff Kletsky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: GPT fails to be recognized by BIOS boot, Intel Atom 330 D945GCLF2, 7.2-RELEASE X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2009 20:44:24 -0000 Try the following: BIOS Setting BIOS_POWER_After Power Falure = - Dan Naumov On Fri, Jun 12, 2009 at 9:11 PM, Jeff Kletsky wrote: > Jeff Kletsky wrote: >> >> After getting what I thought to be a good configuration built up and >> installed on, it failed to boot. I confirmed that I could build a >> MBR-based system on the same drive on the same platform >> (Intel Atom 330 on Intel D945GCLF2 motherboard, 2 GB RAM, >> BIOS LF94510J.86A.0140.2008.1231.0012, later updated to >> BIOS LF94510J.86A.0182.2008.1231.0012) >> >> [...] >> >> I've tried several different approaches, using both gpt and gpart, >> none of which seem to be able to boot the system. Bizzarely enough, if >> I do try to boot the GPT disk, with a functional, bootable MBR-based >> system >> either on the PATA or on a USB stick, that drive is also no longer >> bootable. >> > > The problem appears to be with the MB and BIOS (consistent on three > different boards). For some set of reasonable BIOS settings, the machine > will enter a state where it will not recognize anything I've tried but a > CD/DVD as bootable (even though they boot other systems). > > I've since confirmed that I can create bootable gjournal on gmirror on GPT > via gpart for AMD64. > > Intel not supplying help until I use 'approved" memory (I'm using a Corsair > 2G stick that they've only tested the 1G and below versions). > > http://communities.intel.com/message/25506 contains pointers to several > Intel forums issues, as well as the OCZ forums where this has been deeply > explored. > > > _______________________________________________ > freebsd-geom@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-geom > To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org" > From owner-freebsd-geom@FreeBSD.ORG Sat Jun 13 00:30:04 2009 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13B701065674 for ; Sat, 13 Jun 2009 00:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EBC168FC12 for ; Sat, 13 Jun 2009 00:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n5D0U3AQ053308 for ; Sat, 13 Jun 2009 00:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n5D0U3A2053304; Sat, 13 Jun 2009 00:30:03 GMT (envelope-from gnats) Date: Sat, 13 Jun 2009 00:30:03 GMT Message-Id: <200906130030.n5D0U3A2053304@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: bin/128398: commit references a PR X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2009 00:30:04 -0000 The following reply was made to PR bin/128398; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/128398: commit references a PR Date: Sat, 13 Jun 2009 00:27:18 +0000 (UTC) Author: ivoras Date: Sat Jun 13 00:27:03 2009 New Revision: 194092 URL: http://svn.freebsd.org/changeset/base/194092 Log: Add support for labels derived from GPT metadata. Approved by: gnn (mentor) Reviewed by: pjd PR: 128398 Submitted by: Marius Nuennerich < marius at nuenneri.ch > Added: head/sys/geom/label/g_label_gpt.c (contents, props changed) Modified: head/sbin/geom/class/label/glabel.8 head/sys/conf/files head/sys/geom/label/g_label.c head/sys/geom/label/g_label.h Modified: head/sbin/geom/class/label/glabel.8 ============================================================================== --- head/sbin/geom/class/label/glabel.8 Sat Jun 13 00:13:44 2009 (r194091) +++ head/sbin/geom/class/label/glabel.8 Sat Jun 13 00:27:03 2009 (r194092) @@ -1,4 +1,5 @@ .\" Copyright (c) 2004-2005 Pawel Jakub Dawidek +.\" Copyright (c) 2008-2009 Ivan Voras .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 2, 2004 +.Dd June 13, 2009 .Dt GLABEL 8 .Os .Sh NAME @@ -119,7 +120,18 @@ NTFS (directory .Pa /dev/ntfs/ ) . .El .Pp -Non file-system labels are created in the directory +Support for partition metadata is implemented for: +.Pp +.Bl -bullet -offset indent -compact +.It +GPT labels (directory +.Pa /dev/gpt/ ) . +.It +GPT UUIDs (directory +.Pa /dev/gptid/ ) . +.El +.Pp +Generic labels are created in the directory .Pa /dev/label/ . .Pp The first argument to Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jun 13 00:13:44 2009 (r194091) +++ head/sys/conf/files Sat Jun 13 00:27:03 2009 (r194092) @@ -1852,6 +1852,7 @@ geom/label/g_label_msdosfs.c optional ge geom/label/g_label_ntfs.c optional geom_label geom/label/g_label_reiserfs.c optional geom_label geom/label/g_label_ufs.c optional geom_label +geom/label/g_label_gpt.c optional geom_label geom/linux_lvm/g_linux_lvm.c optional geom_linux_lvm geom/mirror/g_mirror.c optional geom_mirror geom/mirror/g_mirror_ctl.c optional geom_mirror Modified: head/sys/geom/label/g_label.c ============================================================================== --- head/sys/geom/label/g_label.c Sat Jun 13 00:13:44 2009 (r194091) +++ head/sys/geom/label/g_label.c Sat Jun 13 00:27:03 2009 (r194092) @@ -84,6 +84,8 @@ const struct g_label_desc *g_labels[] = &g_label_ext2fs, &g_label_reiserfs, &g_label_ntfs, + &g_label_gpt, + &g_label_gpt_uuid, NULL }; Modified: head/sys/geom/label/g_label.h ============================================================================== --- head/sys/geom/label/g_label.h Sat Jun 13 00:13:44 2009 (r194091) +++ head/sys/geom/label/g_label.h Sat Jun 13 00:27:03 2009 (r194092) @@ -71,6 +71,8 @@ extern const struct g_label_desc g_label extern const struct g_label_desc g_label_ext2fs; extern const struct g_label_desc g_label_reiserfs; extern const struct g_label_desc g_label_ntfs; +extern const struct g_label_desc g_label_gpt; +extern const struct g_label_desc g_label_gpt_uuid; #endif /* _KERNEL */ struct g_label_metadata { Added: head/sys/geom/label/g_label_gpt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/geom/label/g_label_gpt.c Sat Jun 13 00:27:03 2009 (r194092) @@ -0,0 +1,164 @@ +/*- + * Copyright (c) 2008 Marius Nuennerich + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#define PART_CLASS_NAME "PART" +#define SCHEME_NAME "GPT" + +#define G_LABEL_GPT_VOLUME_DIR "gpt" +#define G_LABEL_GPT_ID_DIR "gptid" + +/* also defined in geom/part/g_part_gpt.c */ +struct g_part_gpt_entry { + struct g_part_entry base; + struct gpt_ent ent; +}; + +/* shamelessly stolen from g_part_gpt.c */ +static void +sbuf_nprintf_utf16(struct sbuf *sb, uint16_t *str, size_t len) +{ + u_int bo; + uint32_t ch; + uint16_t c; + + bo = LITTLE_ENDIAN; /* GPT is little-endian */ + while (len > 0 && *str != 0) { + ch = (bo == BIG_ENDIAN) ? be16toh(*str) : le16toh(*str); + str++, len--; + if ((ch & 0xf800) == 0xd800) { + if (len > 0) { + c = (bo == BIG_ENDIAN) ? be16toh(*str) + : le16toh(*str); + str++, len--; + } else + c = 0xfffd; + if ((ch & 0x400) == 0 && (c & 0xfc00) == 0xdc00) { + ch = ((ch & 0x3ff) << 10) + (c & 0x3ff); + ch += 0x10000; + } else + ch = 0xfffd; + } else if (ch == 0xfffe) { /* BOM (U+FEFF) swapped. */ + bo = (bo == BIG_ENDIAN) ? LITTLE_ENDIAN : BIG_ENDIAN; + continue; + } else if (ch == 0xfeff) /* BOM (U+FEFF) unswapped. */ + continue; + + /* Write the Unicode character in UTF-8 */ + if (ch < 0x80) + sbuf_printf(sb, "%c", ch); + else if (ch < 0x800) + sbuf_printf(sb, "%c%c", 0xc0 | (ch >> 6), + 0x80 | (ch & 0x3f)); + else if (ch < 0x10000) + sbuf_printf(sb, "%c%c%c", 0xe0 | (ch >> 12), + 0x80 | ((ch >> 6) & 0x3f), 0x80 | (ch & 0x3f)); + else if (ch < 0x200000) + sbuf_printf(sb, "%c%c%c%c", 0xf0 | (ch >> 18), + 0x80 | ((ch >> 12) & 0x3f), + 0x80 | ((ch >> 6) & 0x3f), 0x80 | (ch & 0x3f)); + } +} + +static void +g_label_gpt_taste(struct g_consumer *cp, char *label, size_t size) +{ + struct g_provider *pp; + struct g_part_table *tp; + struct g_part_gpt_entry *part_gpt_entry; + struct sbuf *lbl; + + g_topology_assert_not(); + pp = cp->provider; + tp = (struct g_part_table *)pp->geom->softc; + label[0] = '\0'; + + /* We taste only partitions from GPART */ + if (strncmp(pp->geom->class->name, PART_CLASS_NAME, sizeof(PART_CLASS_NAME))) + return; + /* and only GPT */ + if (strncmp(tp->gpt_scheme->name, SCHEME_NAME, sizeof(SCHEME_NAME))) + return; + + part_gpt_entry = (struct g_part_gpt_entry *)pp->private; + + /* + * create sbuf with biggest possible size + * we need max. 4 bytes for every 2-byte utf16 char + */ + lbl = sbuf_new(NULL, NULL, sizeof(part_gpt_entry->ent.ent_name) << 1, SBUF_FIXEDLEN); + /* size ist the number of characters, not bytes */ + sbuf_nprintf_utf16(lbl, part_gpt_entry->ent.ent_name, sizeof(part_gpt_entry->ent.ent_name) >> 1); + sbuf_finish(lbl); + strlcpy(label, sbuf_data(lbl), size); + sbuf_delete(lbl); +} + +static void +g_label_gpt_uuid_taste(struct g_consumer *cp, char *label, size_t size) +{ + struct g_provider *pp; + struct g_part_table *tp; + struct g_part_gpt_entry *part_gpt_entry; + + g_topology_assert_not(); + pp = cp->provider; + tp = (struct g_part_table *)pp->geom->softc; + label[0] = '\0'; + + /* we taste only partitions from GPART */ + if (strncmp(pp->geom->class->name, PART_CLASS_NAME, sizeof(PART_CLASS_NAME))) + return; + /* and only GPT */ + if (strncmp(tp->gpt_scheme->name, SCHEME_NAME, sizeof(SCHEME_NAME))) + return; + + part_gpt_entry = (struct g_part_gpt_entry *)pp->private; + snprintf_uuid(label, size, &part_gpt_entry->ent.ent_uuid); +} + +const struct g_label_desc g_label_gpt = { + .ld_taste = g_label_gpt_taste, + .ld_dir = G_LABEL_GPT_VOLUME_DIR +}; + +const struct g_label_desc g_label_gpt_uuid = { + .ld_taste = g_label_gpt_uuid_taste, + .ld_dir = G_LABEL_GPT_ID_DIR +}; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"