Just came up with this handy cmd:-
xz -dc FreeBSD-12.0-RELEASE-amd64-mini-memstick.img.xz > /dev/da0
fetch -o - http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE/src.txz | tar xSf -
fetch -o - https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/FreeBSD-12.0-RELEASE-amd64-mini-memstick.img.xz | xz -dc - > /dev/da0
you seem to like creating potential troubles, wondering where you get such ideas from.if you know what I mean...
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/bsdinstall-pre.html said:After downloading the image file, download CHECKSUM.SHA256 from the same directory. Calculate a checksum for the image file. FreeBSD provides sha256(1) for this, used as sha256 imagefilename.
I was trying to enhance this by combining it with fetch() as in
Code:fetch -o - http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE/src.txz | tar xSf -
which fetches and extracts into the current directory. I was wondering if I could somehow pipe the output of fetch into xz....
kind of
if you know what I mean...Code:fetch -o - https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/FreeBSD-12.0-RELEASE-amd64-mini-memstick.img.xz | xz -dc - > /dev/da0
fetch -o - https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/FreeBSD-12.0-RELEASE-amd64-mini-memstick.img.xz | xz -dc > /dev/da0
You should not ask others following your crude practices.Can anyone give it a try?
Why don't you try it yourself? I rather check my download first before burning it to disk.Can anyone give it a try?
It works for me, just wondered if I was assuming something which wouldn't apply for someone else...Why don't you try it yourself? I rather check my download first before burning it to disk.
Yes, like tommiie implies, you are assuming your download will *always* result in a *perfectly valid* ISO image.It works for me, just wondered if I was assuming something which wouldn't apply for someone else...Why don't you try it yourself? I rather check my download first before burning it to disk.
Yes, like tommiie implies, you are assuming your download will *always* result in a *perfectly valid* ISO image.
From what I understand xz does not have a proper CRC implementation (or any at all?), so to play it safe, the very least you should do is to also fetch the signature file and check your download against its checksum...
note that the script above does not install but just copy the content on the da0.
automatically, you could fetch, mkdir /usr/freebsd-dist, run bsdinstall and there it would be installation, or
faster:
run gpart from script, you could replace bsdinstall by fetch and bring (unpack) the kernel and base on any places that you desire in few cmds.
Because you're outputting to the standard output which gets redirected through a pipe. And?Easier said than done since I don't actually have a download.
Maybe, maybe not. It depends on which part got corrupted. It may boot and throw errors but otherwise cause no dire consequences. It may boot and instead of reading from the disk it'll write to it. It may boot and write rubbish in unwanted parts of the memory. Or it may not boot at all because vital parts are completely messed up. A broken finger doesn't prevent you from running a marathon but a broken toe will.If the img is corrupted would I end up with a bootable USB stick? Just asking...
... doesn't mean you should not have checks in place. It's like programming without ever checking for errorcodes or exceptions. That's asking for trouble. Sooner or later you'll run into problems and you'll regret being sloppy.To be honest, I can't remember ever having problems retrieving files from freebsd.org...
so you take a cdrom memstick you bring freebsd on it...but the idea is to create a bootable USB stick which would be inserted in a computer to install FreeBSD.
I actually do have a script which I can run to install FreeBSD by booting off the network. Maybe I'll post that sometime in another thread.