How to make APM disk which can be detected by Linux' GParted?
Muammer Hamutçu
revivo73 at yahoo.com
Tue Feb 19 10:48:01 UTC 2013
Hello
Thank you for the continued interest. I'd like to try it but with my current FreeBSD PPC 8.2 CD and FreeBSD PPC Livefs CD, I couldn't do it.
First, the PPC Livefs CD doesn't have /usr/src
Second, it doesn't have the mdconfig command.
I guess they are in FreeBSD i386 DVD. I will try it on an Intel machine by plugging this 40GB IDE HDD through USB.
________________________________
From: Andrey V. Elsukov <bu7cher at yandex.ru>
To: Muammer Hamutçu <revivo73 at yahoo.com>
Cc: "freebsd-ppc at freebsd.org" <freebsd-ppc at freebsd.org>
Sent: Monday, February 18, 2013 3:54 PM
Subject: Re: How to make APM disk which can be detected by Linux' GParted?
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
More information about the freebsd-ppc
mailing list