Gentoo Archives: gentoo-user

From: thegeezer <thegeezer@×××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] looking a way to create a flash drive from scratch
Date: Fri, 21 Feb 2014 13:36:37
Message-Id: 53075656.1000508@thegeezer.net
In Reply to: [gentoo-user] looking a way to create a flash drive from scratch by Francisco Ares
1 On 02/21/2014 01:13 PM, Francisco Ares wrote:
2 > Hi,
3 >
4 > I need to create a bootable flash stick, preferably using already
5 > working Gentoo system (or at least most of it), which was tailored for
6 > an embedded system.
7 >
8 > Already googled around, but I would like to know if anyone has already
9 > succeeded on this.
10 >
11 > Thanks
12 > Francisco
13
14 what I do is this:
15
16 1. make your usb stick an PV of your existing LVM volumegroup
17 2. create a small boot LV
18 3. install grub2 into the boot LV and onto the boot sector of the usb stick
19 4. insert stick into live running system
20 5. lvm convert running system LV into a mirror with one part of the
21 mirror on the stick. if it's already a mirror make it a 3way etc
22 6. when done, split the mirror
23 7. rename the usb into a different volumegroup, called backup for
24 example, and rename the LV to something sensible
25 8. configure grub on the usb to boot gentoo from the volume group
26 backup, root partition
27 9. eject the usb stick and plug into your other device
28 10. boot from the usb stick
29 11. repeat the mirror steps this time going onto the SD/hard drive of
30 the new device
31
32 LVM ftw

Replies

Subject Author
Re: [gentoo-user] looking a way to create a flash drive from scratch Francisco Ares <frares@×××××.com>