misc/161677: Probably bug in gptboot
Alexander Yerenkow
yerenkow at gmail.com
Sat Oct 15 09:30:05 UTC 2011
>Number: 161677
>Category: misc
>Synopsis: Probably bug in gptboot
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 15 09:30:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Alexander Yerenkow
>Release: FreeBSD-9-r226337
>Organization:
>Environment:
>Description:
When working with disk images, I have problems with boot them.
Booting went fine until screen with boot choices, and with FreeBSD logo, after choicing any, finished with message:
Can't work out which disk we are booting from.
Guessed BIOS device 0xffffffff not found by probes, defaulting to disk0:
panic: free: guard1 fail @ 0x3f2880b8 from sys/boot/i386/loader/../../common/module.c:1004
If I trying to boot in VirtualBox, then all the same, except that there's no last message, about panic, VirtBox just hangs.
>How-To-Repeat:
This is my way to make it:
touch $imagefile
truncate -s 4G $imagefile
mdconfig -af $imagefile -u $u
gpart create -s gpt /dev/md$u
gpart add -s 64k -t freebsd-boot -i 1 md$u
gpart add -t freebsd-ufs -s 2G -i 2 md$u
gpart add -t freebsd-swap -i 3 md$u
newfs -Uj /dev/md${u}p2
mount -o rw,noatime /dev/md${u}p2 $mountdir
.
make installworld DESTDIR=$mountdir
make distribution DESTDIR=$mountdir
make installkernel DESTDIR=$mountdir
gpart bootcode -b $mountdir/boot/pmbr md$u
gpart bootcode -p $mountdir/boot/gptboot -i 1 md$u
That's it, we created image;
Now any one to test:
1. VBoxManage convertfromraw $imagefile $imagevdi --format VDI -- and test in VirtualBox;
2. dd if=/$imagefile of=/dev/da* bs=1M -- write to some USB disk, and boot from it.
>Fix:
Use mbr probably? :)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list