[geeks] Copy a linux disk
Joshua Boyd
jdboyd at jdboyd.net
Sat May 20 16:55:48 CDT 2006
On Sat, May 20, 2006 at 04:20:33PM -0500, Jonathan C. Patschke wrote:
> > Currently I've settled on using cpio to copy most stuff, a script to
> > copy the essential parts of /dev, and grub-install from a livecd to
> > make the flash card bootable.
>
> That's probably the best you'll be able to do with the tools you have
> on-hand. Does Linux not yet have a true (ie: in-kernel) devfs so that
> you can dispense with device node management entirely? Really, outside
> of them, you only need to worry with things cpio/tar can easily handle
> and the bootloader.
Linux doesn't have an in-kernel devfs. There was something called
devfs, but it has been deprecated, so I didn't bother reading the
documentation on it.
Linux has something called udev, that takes care of most of /dev.
However udev is a userland system, so a few entries need to exist on the
system somehow before hand. console and null are definately needed,
plus a few others. I can post the list I did by hand, but there might
be a few on that list not actually needed. I wasn't interested in
trying to find out be elimatation what was truly needed. Once udev is
running, the rest of the devices are managed by udev.
The current recommended practice is for /dev to be a tmpfs mountpoint.
But that only works if you are using the initramfs stuff (which will
have it's own /dev in it for the kernel to use until it has booted into
userland). The Linux From Scratch system hasn't yet adopted it, and I
wasn't sure it was really needed or even a good idea for our purposes.
> > When things are finalized, I plan to just use dd to copy flash cards
> > for additional systems.
>
> That's certainly the sanest option once you get a pristine image.
Plus, by that point it needs to be near fool proof since it will be the
production department making up the new CF cards.
--
Joshua D. Boyd
jdboyd at jdboyd.net
http://www.jdboyd.net/
http://www.joshuaboyd.org/
More information about the geeks
mailing list