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 E1C1B138E20 for ; Fri, 21 Feb 2014 13:36:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CD3DCE0CE5; Fri, 21 Feb 2014 13:36:29 +0000 (UTC) Received: from uberouter3.guranga.net (unknown [78.25.223.226]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D1D28E0CA4 for ; Fri, 21 Feb 2014 13:36:28 +0000 (UTC) Received: from [192.168.151.100] (unknown [192.168.151.100]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by uberouter3.guranga.net (Postfix) with ESMTPSA id 41A55829F5 for ; Fri, 21 Feb 2014 13:36:27 +0000 (GMT) Message-ID: <53075656.1000508@thegeezer.net> Date: Fri, 21 Feb 2014 13:36:22 +0000 From: thegeezer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] looking a way to create a flash drive from scratch References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 42439351-e8d0-400e-a39e-40d9632aa403 X-Archives-Hash: a4ca8362c45926e94968e3688a86fd36 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