From owner-freebsd-questions@freebsd.org Thu Jan 7 14:12:17 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92BB34D23A7 for ; Thu, 7 Jan 2021 14:12:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DBSq43W74z56MD for ; Thu, 7 Jan 2021 14:12:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([178.5.233.63]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPA (Nemesis) id 1N0nvJ-1k186Y3Jht-00wkPr; Thu, 07 Jan 2021 15:12:11 +0100 Date: Thu, 7 Jan 2021 15:12:11 +0100 From: Polytropon To: tech-lists Cc: freebsd-questions@freebsd.org Subject: Re: making one disk image from two Message-Id: <20210107151211.07b39199.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:CC6U/KnrsRG1SBFboiaKMvrADqMDywJtdv6N/G/FDOMqXsnXfRX OgPAmI0Cv/Hec+ouJ/UV08VdliHteJFJfl7wmi2/J4hQO6lFGtypP8KkqJi6tN0i4JYMTLD tx27xpoIt1K43flqTkFYc76Y1jnwx4/61HyRlDtiosAihamZa1cvLdd1ZfND4sKjj7Rb5NR bQb1jCw8zEyY7UySL3nwA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:V2vNPBL6ATU=:Th2piOndptLPObhe9edCyk z3FSJyFK8lgJuBJ1koossEHjcJE4lFKNsmtf0HyKyo8BTghoB38fe2F0SJOmf8hwXK8o7bDid 0+84HD7PIY7FP57B0X/Gyq9xTSy3YDSFdDnTMOLI8R0qQkHJ7V3blMt0hT5bG7gdvya5PvE8O HcYj+0d6MR1sPTjoEkdrUbUPAWsrCowYMxBR3iJPEIChpwhzPXgQJaiLAeDJCb27Fpj4zeqdp MgZTCv7x7rUlUyQP1BLcokRXjpRhtg1AvYmTL+Y8+L57z7oyTtvmUKmzYuVCI4NX/4HGF1H0r HsONGpubnwH9Z1iDKWHuSmNnRYvgunaNoUFGcgZHKx1DjCHT7+6lRKORhAeNkZFyTRniRHCLq a0IDnTxOzoBzXEgdZNVNxR2qWBlhe1dU4Dorqe0oqcVfbkD5DdZsojZrH4SDI X-Rspamd-Queue-Id: 4DBSq43W74z56MD X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.130) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [1.40 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[212.227.126.130:from]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.227.126.130:from]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[212.227.126.130:from:127.0.2.255]; RECEIVED_SPAMHAUS_PBL(0.00)[178.5.233.63:received]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.130:from]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 14:12:17 -0000 On Thu, 7 Jan 2021 14:03:07 +0000, tech-lists wrote: > If one were to make say a 16GB image, format it to msdos, then make a > 64GB image, format it to freebsd, then concatenate[1] the images to make > one image, would it be seen as one image with two partitions? > > thanks, > > [1] # cat freebsd.img >> msdos.img Hmmm... it doesn't look like this is possible in that simple way. A partition table would be needed to reflect that the disk image contains two partitions. Depending on if this should be MBR or GPT, the approach is quite different. However, you could create a disk image of a fixed size via mdconfig pseudo-device (virtual nodes), i. e., create a "null file" with dd first, then use mdconfig to make it impersonate a disk device file, and then use it as such: partition it, initialize the two created partitions (one FreeBSD, probably UFS, the other one FAT / msdosfs), then unload the two previous images' contents into the newly created and mounted ones (or dd them, if the size information is exact), so those will be reflected in the original intention of having one disk image containing two partitions and the appropriate partition table. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...