[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disk_bsd.c broke

From: Harley D. Eades III
Subject: disk_bsd.c broke
Date: Wed, 14 Dec 2005 18:48:54 -0600

I have been porting upstream to FreeBSD RELEASE-6.0 and all is going
well, I have been working on libparted/freebsd.c and have came to a bug
in disk_bsd.c.  I thought my code was the problem, so I downed upstream
in my qemu Debian install and tried to read a bsd label off a memory
disk created with bsdlabel(8).  I can read the label successfully with
fdisk(8) as well as bsdlabel(8).  The first major problem with
disk_bsd.c is it fails to grab the magic number correctly, I think it
is'nt reading in the boot block correctly.  I am on top of this and will
be posting a patch to fix the issue.  I just wanted to let everyone on
the list know in case anyone sends in a bug-report.

G: GCS-- d- a? C++++ B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+++++

#ifdef ERROR
GNU/Linux current upstream
debian:/home/hde/trunk/parted# ./parted /home/hde/grub2/test.img
GNU Parted 1.6.26
Copyright (C) 1998 - 2005 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public

This program is distributed in the hope that it will be useful, but
WARRANTY; without even the implied warranty of MERCHANTABILITY or
PARTICULAR PURPOSE.  See the GNU General Public License for more

Using /home/hde/grub2/test.img
(parted) p
Error: Invalid partition table - recursive partition on
Ignore/Cancel? i

Disk /home/hde/grub2/test.img: 268MB
Sector size (logical/physical): 512B/0B
Partition Table: msdos

Number    Start     End    Size Type      File system  Flags

(parted) q
#endif /* ERROR */

#ifdef SUCCESS
hde{~} $ uname -a
FreeBSD devilBSD.freeBSD 6.0-RELEASE
hde{~} $ bsdlabel -f test.img
# test.img:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   524272       16    unused        0     0
  c:   524288        0    unused        0     0         # "raw" part,
don't edit

debian:/home/hde/trunk/libparted# fdisk /home/hde/grub2/test.img

Command (m for help): p

Disk /home/hde/grub2/test.img: 0 heads, 0 sectors, 0 cylinders
Units = cylinders of 1 * 512 bytes

8 partitions:
#       start       end      size     fstype   [fsize bsize   cpg]
  a:        1*      521*      520*    unused        0     0
  c:        1       521*      520*    unused        0     0

Command (m for help): q

#endif /* SUCCESS */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]