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.