Extracting installation images in root?

A USB installation drive was created for Freebsd-12.0-release-memstick.img. The compressed img.xz file was downloaded via a browser from an Ubuntu Linux machine. It was then extracted with $ xz -dk Freebsd-12.0-memstick.img.xz

Should the img.xz file have been extracted in root?
 
Why did you extract it in the first place? I hardly bother with memory sticks myself, but iirc a common procedure is to use dd to dump the image onto the memory stick.

Even so; I don't see how root privileges would have made a difference. It most certainly won't matter for the FreeBSD session because you'd be root anyway. At the least it might be better for cosmetic purposes (root:wheel might look cleaner) but that's all there is to it.
 
Thank you. The img.xz is the compressed image, correct? I’m under the impression that it is, therefore, I’m also assuming it needs to be decompressed, hence the extraction. I opted for this image because I downloaded it from a browser. The full size image may have taken too long.
 
Why did you extract it in the first place? I hardly bother with memory sticks myself, but iirc a common procedure is to use dd to dump the image onto the memory stick.

I prefer the .img format because I can use the same stick over and over. After I cd to the same directory as the .img file I use this command for my FreeBSD machines:

Code:
# dd bs=1m if=FreeBSD-12.0-RELEASE-amd64-memstick.img of=/dev/da0 conv=sync

You'll need to set the correct designation for your Linux disk labeling scheme and make sure the stick is not mounted when you run dd on the stick.
 
Ah, right. There's a big difference here though. That Arch Linux file isn't an "image" file, it's basically a file structure you need to use to overwrite the existing install, as some of those files need to be root owned you have to extract them as root. In the FreeBSD IMG case it's just a file you extract. Actually 'burning' that image file to a stick or CD does require root privileges.
 
It’s (Arch Linux) is basically a file structure you need to use to overwrite the existing install, as some of those files need to be root owned. In the FreeBSD IMG case it's just a file you extract. Actually 'burning' that image file to a stick or CD does require root privileges.

Got it. That makes sense.

Yes on the actual flash process I used # dd if=Freebsd-12.0 of=/dev/sdx bs=1M conv=sync
 
Back
Top