Install from USB flash drive? Sort of...
olli at lurza.secnetix.de
Tue Aug 23 11:31:11 GMT 2005
Brandon Fosdick <bfoz at bfoz.net> wrote:
> So I had this "brilliant" idea that I was going to install FreeBSD
> on my new amd64 system using a 512MB flash drive since I didn't feel
> like digging out a CD-ROM. I ended up installing from CD anyway, but
> I thought I'd share my experience in case anyone else knows how to do
> The next morning it occured to me that I probably could have just
> copied the files from an install CD.
Right. Or from an FTP site.
> Determined to press on I tried the "install from existing file
> system" option, w hich I had never noticed before. That didn't work
> since I had no idea what path to give it, or even if the flash drive
> had been mounted.
It depends on the FreeBSD version. Older versions mounted
it on /dist, if I remember correctly, but newer ones mount
it directly on /.
> Thinking that maybe I had built a bad release I decided to try
> copying from the disc1 iso. The iso is listed at 515MB which is
> almost small enough. The packages are about 70MB and they're not
> strictly necessary so I thought it would work. So I mounted the iso
> and proceeded to copy the files out, since iso's mount read only and
> I needed to delete stuff.
You can copy directly from the ISO to your flash drive,
excluding the things that you don't need (i.e. packages).
There's no need to make an additional copy on your HD.
# cd /cdrom; find . | grep -v /packages | cpio -dump /flash
> To my surprise it turned into 1.1GB when copied onto a "real"
> filesystem. Obviously that's a problem.
Depends on how you copy things. Using cp(1) for recursive
copies is almost always a bad idea, because you will get
duplicates of all hardlinked files. That's why your copy
grew to 1.1GB.
For recursive copies, use cpio, tar, pax, cpdup or similar
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
"C++ is over-complicated nonsense. And Bjorn Shoestrap's book
a danger to public health. I tried reading it once, I was in
recovery for months."
-- Cliff Sarginson
More information about the freebsd-stable