Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Oct 2015 15:25:55 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        "William A. Mahaffey III" <wam@hiwaay.net>
Cc:        FreeBSD Questions !!!! <freebsd-questions@freebsd.org>
Subject:   Re: Geom question
Message-ID:  <alpine.BSF.2.20.1510021521390.7062@wonkity.com>
In-Reply-To: <560EEE5F.3080904@hiwaay.net>
References:  <560EDE45.3040605@hiwaay.net> <3D81C7BC-1A31-4046-88B7-50F25EA3B952@ccsys.com> <560EEE5F.3080904@hiwaay.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2 Oct 2015, William A. Mahaffey III wrote:

> On 10/02/15 15:31, Chad J. Milios wrote:
>>> On Oct 2, 2015, at 3:41 PM, William A. Mahaffey III <wam@hiwaay.net> 
>>> wrote:
>>> 
>>> I am prepping to provision 2 boxen w/ FreeBSD 9.3R, preferably from a 
>>> thumb drive. I would like to add a 'utils' directory w/ some scripts I 
>>> wrote to automate the partitioning/slicing of the HDD's (2X on 1 box, 8X 
>>> on the other), & also accumulate output from the install process in case 
>>> questions arise. To that end, I am planning on partitioning/slicing a 
>>> thumb drive, prepping it to be bootable following examples on the gpart 
>>> man page, & copying verbatim stuff from the memstick.img for 9.3R that I 
>>> downloaded a while back, as well as adding my utils directory. Reading up 
>>> on gpart & geom raises 1 question: can I do all these preps on a disk 
>>> image file I create w/ dd, or do i do them in place on the target 
>>> memstick, then dd the results onto an on-disk image for safekeeping ? Put 
>>> another way, can a disk image created by dd be a 'geom' for gpart ? TIA & 
>>> have a good one.
>>> 
>>> -- 
>>>
>>>     William A. Mahaffey III
>> In a way, yes. `mdconfig -f filename` will make your file accessible as a 
>> virtual device.
>> 
>
> Then to be accessed as /dev/md0 ? Any other clues/gotchas :-) ? Thanks & TIA 
> & have a good one.

GPT does not work well with that.  If the target device is larger, the 
backup GPT that is supposed to go at the very end of the disk ends up 
someplace before that.  If the target device is smaller, well, it won't 
work at all.

Also, avoid using dd on SSDs.

In general, it's better to use higher-level things that understand the 
metadata, like 'gpart backup'/'gpart restore' for the partitioning 
information and dump/restore or 'zfs send' for the filesystems.
'gpart restore' can correctly restore the partitioning scheme onto a 
larger device because it understands what that data means.



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