Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2013 17:54:24 +0400
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        =?ISO-8859-1?Q?Muammer_Hamut=E7u?= <revivo73@yahoo.com>
Cc:        "freebsd-ppc@freebsd.org" <freebsd-ppc@freebsd.org>
Subject:   Re: How to make APM disk which can be detected by Linux' GParted?
Message-ID:  <51223290.4070509@yandex.ru>
In-Reply-To: <1361183920.93805.YahooMailNeo@web160706.mail.bf1.yahoo.com>
References:  <1360858013.53771.YahooMailNeo@web160704.mail.bf1.yahoo.com> <511D2E19.6020809@yandex.ru> <1361183920.93805.YahooMailNeo@web160706.mail.bf1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 18.02.2013 14:38, Muammer Hamutçu wrote:
> I have a clue on how to achieve a partition structure which GParted
> can detect: http://d1302.hizliresim.com/16/f/k2fd8.jpg

It seems your partition table has not been created with gpart(8).
And probably this did the trick.

As you can see, your APM metadata takes 14 sectors, but when you use
gpart(8), by default it takes 18 sectors.

> How could I remake such a partitioning, how is it done? Thanks.

You can patch your geom_part_apm module:
Index: /usr/src/sys/geom/part/g_part_apm.c
===================================================================
--- /usr/src/sys/geom/part/g_part_apm.c	(revision 241375)
+++ /usr/src/sys/geom/part/g_part_apm.c	(working copy)
@@ -101,7 +101,7 @@ static struct g_part_scheme g_part_apm_scheme = {
 	g_part_apm_methods,
 	sizeof(struct g_part_apm_table),
 	.gps_entrysz = sizeof(struct g_part_apm_entry),
-	.gps_minent = 16,
+	.gps_minent = 12,
 	.gps_maxent = 4096,
 };
 G_PART_SCHEME_DECLARE(g_part_apm);

The you can do:
# mdconfig -s 78140160
# gpart create -s apm  md0
# gpart add -b 64 -t apple-boot -s 2001 md0
# gpart add -t freebsd-ufs -s 5859376 md0
# gpart add -t apple-ufs -s 1953126 md0
# gpart add -t freebsd-ufs -s 1171876 md0
# gpart add -t freebsd-ufs -s 1171876 md0
# gpart add -t freebsd-ufs -s 7812501 md0
# gpart add -t freebsd-ufs -s 1171876 md0
# gpart add -b 19144704 -t apple-boot -s 2048 md0
# gpart add -t apple-ufs -s 15624192 md0
# gpart add -t apple-ufs -s 1953792 md0

# gpart show md0
=>      14  78140146  md0  APM  (37G)
        14        50       - free -  (25k)
        64      2001    1  apple-boot  (1M)
      2065   5859376    2  freebsd-ufs  (2.8G)
   5861441   1953126    3  apple-ufs  (953M)
   7814567   1171876    4  freebsd-ufs  (572M)
   8986443   1171876    5  freebsd-ufs  (572M)
  10158319   7812501    6  freebsd-ufs  (3.7G)
  17970820   1171876    7  freebsd-ufs  (572M)
  19142696      2008       - free -  (1M)
  19144704      2048    8  apple-boot  (1.0M)
  19146752  15624192    9  apple-ufs  (7.5G)
  34770944   1953792   10  apple-ufs  (954M)
  36724736  41415424       - free -  (19G)

:)

-- 
WBR, Andrey V. Elsukov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51223290.4070509>