From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 8 14:09:51 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30B33E7B for ; Sat, 8 Dec 2012 14:09:51 +0000 (UTC) (envelope-from jack.mclauren@yahoo.com) Received: from nm2.bullet.mail.bf1.yahoo.com (nm2.bullet.mail.bf1.yahoo.com [98.139.212.161]) by mx1.freebsd.org (Postfix) with ESMTP id B8D8A8FC14 for ; Sat, 8 Dec 2012 14:09:50 +0000 (UTC) Received: from [98.139.215.140] by nm2.bullet.mail.bf1.yahoo.com with NNFMP; 08 Dec 2012 14:09:49 -0000 Received: from [98.139.212.207] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 08 Dec 2012 14:09:49 -0000 Received: from [127.0.0.1] by omp1016.mail.bf1.yahoo.com with NNFMP; 08 Dec 2012 14:09:49 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 909747.2383.bm@omp1016.mail.bf1.yahoo.com Received: (qmail 32608 invoked by uid 60001); 8 Dec 2012 14:09:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1354975789; bh=ae03nN7fp6ukmw9sOvg9i4h/8E9sNE+zN1ssPthmr8g=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=U3DDNjHpbdQ8Wo1gDneqAnZzwLJeQDN1CItv17IfngtzuumN9hou1YZiWkPWJswBXmh0UcH4GYvrqS/yuaM1v2UVUTt11pACwG6jzzGTce2pM/S0P7odm4IltE0Y6I3Xvumq9Grq5FVU390STo0NUPcMKTP2iihMzaROS+Mb8qM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=FV7Xe4H3XYZ92XS6HrFIK2FEKdYVrY7ihgju+wuBE0l5D4wqGnF3XrD7QhBjGYajGOSs2LMHOsw3G329nHCVgB6+RWZV4f50ucORTdX+h3o31D/4kfn/u5PSefUC+798e130k3kMu9qOVX39OVqgmZqlr1gj+Iqo7141t2FL5aQ=; X-YMail-OSG: ke34T2gVM1lLQ2E2DCd4ZllxW3QUSwoFAn5qqlgDU3i3NUw FiGPEh4.KX0CzM617YwxHKYeQSxABf5rLXOtPtgFMBof6688H7cxpwqAPMvN 7m.04_ncivCgcuuXUTHDFBJTAtT8gR9Ym434o49ErZ4niQOhMQkHtoO1REet vx3qAvVq_oc_9.t3UmfviiVbeGREmpJFZNwJ5rMcPdv9GmMrTsECd7LhH0Sq pGXMPWAhrMTKP1BHamz.n.FefPG4JfdoK_3HvOfqYYpoQLVkAqPXXs9IgTZ3 i2EGoHypy_fFWInTnvZ9HYlLvLknIwDV2C98LVLFCMjKesuflFh3uCCG4LEk Vbn7DnZqRHe9.4EIsE9Ze.fenqF_sAsSy_AUcNhZQZxyzVKaHWO6dta9jNjU Vs8En.eKjsmklH5unVce7CpmPuJkwHajxNwNGkbBG.PkkfSogp_EefGKaevW 6YHZWu5M9Y9srHbWhnjNp Received: from [89.165.120.140] by web160106.mail.bf1.yahoo.com via HTTP; Sat, 08 Dec 2012 06:09:49 PST X-Rocket-MIMEInfo: 001.001, PiBIaSBhbGwKCj4gCj4gQXJlIHRoZXJlIGFueSB3YXlzIHRvIGNvbXByZXNzIHRoZSBuYW5vQlNEIGltYWdlIGFuZCBkZWNvbXByZXNzIGl0IGF0Cj4gYm9vdCB0aW1lID8KPiAKPiBUaGFuayB1IGFsbMKgCgo.PkhpIQo.Pgo.PnlvdSBjYW4gdXNlIG1rdXppcC9ta3Vsem1hIGFuZCBnZW9tX3VuY29tcHJlc3MgaW4ga2VybmVsLgo.PkJ1dCBSZWFkLW9ubHkgb2YgY291cnNlLiAKPj4KPj5XQlcKPj4tLSAKClRoYW5rIHlvdSBzbyBtdWNoLgpDYW4geW91IGhlbHAgbWUgd2l0aCBhbiBleGFtcGxlIHBsZWFzZSABMAEBAQE- X-Mailer: YahooMailWebService/0.8.128.478 References: <1354956680.94571.YahooMailNeo@web160104.mail.bf1.yahoo.com> <20121208154907.e642ba5b.ray@freebsd.org> Message-ID: <1354975789.32487.YahooMailNeo@web160106.mail.bf1.yahoo.com> Date: Sat, 8 Dec 2012 06:09:49 -0800 (PST) From: Jack Mc Lauren Subject: Re: compressing nanoBSD image To: Aleksandr Rybalko In-Reply-To: <20121208154907.e642ba5b.ray@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jack Mc Lauren List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Dec 2012 14:09:51 -0000 > Hi all=0A=0A> =0A> Are there any ways to compress the nanoBSD image and d= ecompress it at=0A> boot time ?=0A> =0A> Thank u all=A0=0A=0A>>Hi!=0A>>=0A>= >you can use mkuzip/mkulzma and geom_uncompress in kernel.=0A>>But Read-onl= y of course. =0A>>=0A>>WBW=0A>>-- =0A=0AThank you so much.=0ACan you help m= e with an example please ?=0A=0AThanks From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 8 23:19:55 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34FBB910 for ; Sat, 8 Dec 2012 23:19:55 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id D5E438FC12 for ; Sat, 8 Dec 2012 23:19:54 +0000 (UTC) Received: from rnote.ddteam.net (184-57-135-95.pool.ukrtel.net [95.135.57.184]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 30CD5C4927; Sun, 9 Dec 2012 01:19:53 +0200 (EET) Date: Sun, 9 Dec 2012 01:19:44 +0200 From: Aleksandr Rybalko To: Jack Mc Lauren Subject: Re: compressing nanoBSD image Message-Id: <20121209011944.8d888866.ray@freebsd.org> In-Reply-To: <1354975789.32487.YahooMailNeo@web160106.mail.bf1.yahoo.com> References: <1354956680.94571.YahooMailNeo@web160104.mail.bf1.yahoo.com> <20121208154907.e642ba5b.ray@freebsd.org> <1354975789.32487.YahooMailNeo@web160106.mail.bf1.yahoo.com> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Dec 2012 23:19:55 -0000 On Sat, 8 Dec 2012 06:09:49 -0800 (PST) Jack Mc Lauren wrote: > > Hi all > > > > > Are there any ways to compress the nanoBSD image and decompress it > > at boot time ? > > > > Thank u allĀ  > > >>Hi! > >> > >>you can use mkuzip/mkulzma and geom_uncompress in kernel. > >>But Read-only of course. > >> > >>WBW > >>-- > > Thank you so much. > Can you help me with an example please ? > > Thanks Yeah, sure! Assume you have rootfs dir, then makefs -d 255 -t cd9660 -o "rockridge" rootfs.iso rootfs mkulzma -v rootfs.iso.ulzma -s 131072 rootfs.iso So now you have rootfs.iso.ulzma which is rootfs files in the ISO9660 filesystem packed into ulzma (each block compressed with LZMA) so you have to have already loaded kernel with geom_uncompress inside and that image at begin of any attached to system media, or on some partition/slice of media. For example, if you have only CF card to boot, you need way to load kernel first. You can put kernel on separate partition (since ulzma inaccessible yet, till kernel started), or depend on loader(BIOS) ability it can be even some blocks of card w/o any FS. Then when kernel done attaching media, GEOM inspect meta info on it, parse partitions, find header of ulzma and attach it as "something.uncompress". If you put rootfs.iso.ulzma into /dev/da0s2, then it appear as /dev/da0s2.uncompress, and you will able to mount it with mount -t cd9660 /dev/da0s2.uncompress /dir. etc. WBW -- Aleksandr Rybalko