Date: Sat, 15 Oct 2011 09:23:41 GMT From: Alexander Yerenkow <yerenkow@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/161677: Probably bug in gptboot Message-ID: <201110150923.p9F9NfkW051305@red.freebsd.org> Resent-Message-ID: <201110150930.p9F9U58D048191@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110150923.p9F9NfkW051305>
