Subject: Re: New replacement for "hdtoolbox"
To: Jost Menke <cyberlab@gmx.de>
From: Florian Stoehr <netbsd@wolfnode.de>
List: port-amiga
Date: 08/25/2006 20:08:34
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--0-613161656-1156529314=:19251
Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Fri, 25 Aug 2006, Jost Menke wrote:
> -------- Original-Nachricht --------
>> Subject: New replacement for "hdtoolbox"
>> To: None <port-amiga@netbsd.org>
>> From: Florian Stoehr <netbsd@wolfnode.de>
>> List: port-amiga
>> Date: 05/17/2005 10:49:34
>> Dear Amiga list,
>>
>> I wrote a program to replace Amiga OS' hdtoolbox program for
>> NetBSD.
>>
>> The intention of this tool was to replace hdtoolbox in a
>> NetBSD-only environment (no AmigaOS required at all).
>>
>> This is by far not "finished", but it already serves the
>> following two purposes:
>>
>> (1) Cross-partition any harddisk for NetBSD/amiga use from
>> any other NetBSD platform (put the disk in your i386 or
>> whatever, create partitions, copy miniroot.fs to slice b,
>> and install the Amiga).
>>
>> (2) Add/remove/resize slices, either from NetBSD/amiga itself
>> or from any other NetBSD platform. Note that you must reboot
>> the amiga after changing slice sizes in order to make the
>> changes take effect (I know no other way of rereading the
>> disklabel - "-r" doesn't work?)
>>
>> As this is not finished and my possibilities to test it are
>> limited, use this new thing with CARE. Known limitations:
>>
>> - Interactive use only (like the disklabel interactive interface)
>> - CANNOT HANDLE AMIGA OS PARTITIONS. WILL DESTROY NON-NETBSD
>> PARTITIONS. REWRITES THE TABLE ENTIRELY, SO USE ONLY WITH PURE
>> NETBSD DISKS
>>
>> Of course, there might be a bunch of other bugs (I could only
>> test with two disks and one Amiga 4000 system).
>>
>> Beside that, there's no need to use AmigaOS if you only want
>> to install NetBSD anymore. Even "a bit software" is better than
>> "no software" at all.
>>
>> Feel free to test this - of couse at your own risk - and
>> send comments or patches back to me.
>>
>> The program is called "neb-hdtoolbox" and available via
>> pkgsrc-wip (pkgsrc-wip.sourceforge.net).
>>
>> Read the manpage before using it.
>>
>> Have fun!
>> -Florian
>
> Hi Florian,
>
> thanks for the effort, I've been quite searching for something like this!=
I'd like to prepare a SCSI drive for a fresh 3.01 install, however I only =
have a FreeBSD 6.1 i386 system at hand at the moment. I tried to compile ne=
b-hdtoolbox, but no luck:
>
> [root@bsdbox ~/temp]# make
> cc -O2 -fno-strict-aliasing -pipe -c neb-hdtoolbox.c
> neb-hdtoolbox.c:21:18: util.h: No such file or directory
> neb-hdtoolbox.c: In function `GetDefaultLabel':
> neb-hdtoolbox.c:467: error: `DIOCGDEFLABEL' undeclared (first use in this=
function)
> neb-hdtoolbox.c:467: error: (Each undeclared identifier is reported only =
once
> neb-hdtoolbox.c:467: error: for each function it appears in.)
> *** Error code 1
>
> Stop in /root/temp.
>
>
> System sources are installed, and I found several files called util.h, ye=
t none of them seems to be the one that's needed. Any chance for a workarou=
nd?
>
> Regards,
> Jost Menke
> --=20
>
>
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal f=FCr Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
>
hi,
unfortunately: "no", because my program uses some NetBSD-specific API,=20
e.g. "opendisk()" and an IOCTL for reading the (NetBSD-)disklabel.
However, I use the DIOCGDEFLABEL IOCTL only for discovering the disk=20
geometry, so you could patch it and use hard-coded values for your disk.
opendisk() where still necessary could also be replaced by open() with
the raw disk device.
Also, line 1027 contains the code to dump the label image to a file
which you could then install with dd.
Although I don't know by heart, I think util.h is for opendisk() only,
so if you remove this you could also remove the header.
-flo
--0-613161656-1156529314=:19251--