From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9504F138E20 for ; Fri, 21 Feb 2014 14:31:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F36BE0CDE; Fri, 21 Feb 2014 14:31:10 +0000 (UTC) Received: from mail-oa0-f41.google.com (mail-oa0-f41.google.com [209.85.219.41]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 36FE3E0C7D for ; Fri, 21 Feb 2014 14:31:09 +0000 (UTC) Received: by mail-oa0-f41.google.com with SMTP id o6so3880960oag.14 for ; Fri, 21 Feb 2014 06:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=vSapYp9prfO2YnvNGEX5yMZirZjJePHG9izxdi2eDIs=; b=oHe11nXclehxRqL9/Yn/cAAMLKIR/T8hm17xU/4HaUw46ZLI35mHvL5G1mqgUhcQSi qtI1SqOehp8EBDdyT9aHxfucSN78xNdW37JRdz26WZ1/hsFdJxSo5TFU/hRaKV/jKuTh QKcO4vsZYKbRxPy3Q7Ov26iuxOedpmXABYee/scNdvwXp0bgY9a1xTV8qQeegScU4uTi J8rwQ9QuED85p+18UIaGRL3RpRw7gbfMpAhLgGjDUplfE6vKn7wseFkcP+VH1tnUcuHN 4SkNiGt455I5xhHnNncpfVkOU1nRsvJsYHJXNIwI2neXt5gGFXFvSMuvkT4yJMfBQVBt CYuw== X-Received: by 10.60.74.105 with SMTP id s9mr9495337oev.49.1392993068291; Fri, 21 Feb 2014 06:31:08 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.60.74.165 with HTTP; Fri, 21 Feb 2014 06:30:28 -0800 (PST) In-Reply-To: <53075656.1000508@thegeezer.net> References: <53075656.1000508@thegeezer.net> From: Francisco Ares Date: Fri, 21 Feb 2014 11:30:28 -0300 Message-ID: Subject: Re: [gentoo-user] looking a way to create a flash drive from scratch To: gentoo-user Content-Type: multipart/alternative; boundary=001a1134d10002a0f104f2eb794b X-Archives-Salt: 2cfcb260-c8f9-478e-b140-e76713416e32 X-Archives-Hash: ef55d5bacbeb7f9b21e575e2bfc708ef --001a1134d10002a0f104f2eb794b Content-Type: text/plain; charset=UTF-8 Thanks, gonna try it Francisco 2014-02-21 10:36 GMT-03:00 thegeezer : > On 02/21/2014 01:13 PM, Francisco Ares wrote: > > Hi, > > > > I need to create a bootable flash stick, preferably using already > > working Gentoo system (or at least most of it), which was tailored for > > an embedded system. > > > > Already googled around, but I would like to know if anyone has already > > succeeded on this. > > > > Thanks > > Francisco > > what I do is this: > > 1. make your usb stick an PV of your existing LVM volumegroup > 2. create a small boot LV > 3. install grub2 into the boot LV and onto the boot sector of the usb stick > 4. insert stick into live running system > 5. lvm convert running system LV into a mirror with one part of the > mirror on the stick. if it's already a mirror make it a 3way etc > 6. when done, split the mirror > 7. rename the usb into a different volumegroup, called backup for > example, and rename the LV to something sensible > 8. configure grub on the usb to boot gentoo from the volume group > backup, root partition > 9. eject the usb stick and plug into your other device > 10. boot from the usb stick > 11. repeat the mirror steps this time going onto the SD/hard drive of > the new device > > LVM ftw > > --001a1134d10002a0f104f2eb794b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks, gonna try it

Francisco
=


2014-02-21 10= :36 GMT-03:00 thegeezer <thegeezer@thegeezer.net>:
On 0= 2/21/2014 01:13 PM, Francisco Ares wrote:
> Hi,
>
> I need to create a bootable flash stick, preferably using already
> working Gentoo system (or at least most of it), which was tailored for=
> an embedded system.
>
> Already googled around, but I would like to know if anyone has already=
> succeeded on this.
>
> Thanks
> Francisco

what I do is this:

1. make your usb stick an PV of your existing LVM volumegroup
2. create a small boot LV
3. install grub2 into the boot LV and onto the boot sector of the usb stick=
4. insert stick into live running system
5. lvm convert running system LV into a mirror with one part of the
mirror on the stick. if it's already a mirror make it a 3way etc
6. when done, split the mirror
7. rename the usb into a different volumegroup, called backup for
example, and rename the LV to something sensible
8. configure grub on the usb to boot gentoo from the volume group
backup, root partition
9. eject the usb stick and plug into your other device
10. boot from the usb stick
11. repeat the mirror steps this time going onto the SD/hard drive of
the new device

LVM ftw


--001a1134d10002a0f104f2eb794b--