Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2015 00:49:46 -0700
From:      Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
To:        Jason Birch <jbirch@jbirch.net>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Possible (or smart) to put freebsd-boot on USB stick for root-on-ZFS?
Message-ID:  <CAOgwaMtJpBboseqb295fr1Fdtw09dqFLqG5BVS4rWHPd_h2f7A@mail.gmail.com>
In-Reply-To: <CAA=KUhvYfhJ9i_CU6Lhni0EB03zjPMBpBHOHLJ92THVs2owZxw@mail.gmail.com>
References:  <CAA=KUhvYfhJ9i_CU6Lhni0EB03zjPMBpBHOHLJ92THVs2owZxw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 23, 2015 at 10:09 PM, Jason Birch <jbirch@jbirch.net> wrote:

> Hey there,
>
> I'm looking at a relatively old resource
> (https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE) about how
> to run root on ZFS for 9.0, and I noticed the section on installing
> the boot section to all drives that make up the root. In my setup,
> I'll only be mirroring two SSDs on 10.1, but it made me consider the
> possibility of having the freebsd-boot partition on a USB stick rather
> than on each drive itself for basically the following reason:
>
> Should an SSD die, I'd need to say "boot from this other device" to
> get my system back up and running, do the original partitioning magic
> on the replacement device, get that back into the vdev... Should the
> USB stick die, I'd need to simply replace it with one that had the
> same image (that is, only the boot partition), and `zpool replace` a
> blank device (I won't have a swap partition).
>
> However, I can think of some downsides as well - namely that the USB
> stick is probably more likely to die than the SSDs, and that the image
> on the USB stick will change over time (This gets mounted as /boot? or
> am I mistaken here... This would plague the freebsd-boot on the SSDs
> as well, with drift...)
>
> Am I misinterpreting the point of freebsd-boot? Does /boot actually
> end up living on the ZFS mount, and freebsd-boot just contains enough
> information to read the kernel and other goodies required to bring up
> a full system from a ZFS dataset? Is my thought to use a USB stick for
> this partition a little thick or actually worth trying out?
>
> JB
> _______________________________________________
>
>

Not a direct answer to your question , but only an example :


I was using a FULL installation previously : Everything on the SAME HDD .
When it was becoming necessary to install a new operating system , I was
using another HDD and after installation on it the new OS , I was copying
my files ( in my home directory in previous HDD ) into new installed HDD .
This was taking approximately twelve hours .

I one instance , my OS has been corrupted by a malicious inject ( this is
my suspect because I could not find a true reason for what was the attack
through "Bash" )  .

Now , I am using the following set up :


I am using TWO HDDs :

One is ONLY OS , and other is for my data files ( all of them downloaded
from Internet as open source project files ) mounted after installation of
OS .

When I want to upgrade to a new OS , I am using a NEW HDD ( I am NOT
installing onto existing HDD ) by disconnecting power of existing OS and
data HDDs .

After installing the new OS and verifying that it is working correctly , I
am powering the data HDD and using an fstab entry to mount it .

I am keeping the old OS HDD for a NEW install .


My suggestion :


Use a USB stick or HDD ( revolving platter or SSD ) for ONLY OS and OTHER
HDDs for your data files .


OS my be on any convenient medium : revolving HDD , SSD , USB stick , it is
not important .
It may be in any form , it is not important . Important point is for your
convenience : You may select any form .

You may generate any number of copies of it as a spare for possible
failures of used OS device :
In case of failure , the only thing is to do is to shut down the computer ,
attach a spare OS medium and boot the computer .

I am not using RAID , but "rsync" : one with -"-delete"  as a replication
of current data disk , another without "--delete" for fear of accidental
deletions .


I wish that my example may be useful for you .


Thank you very much .



Mehmet Erol Sanliturk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMtJpBboseqb295fr1Fdtw09dqFLqG5BVS4rWHPd_h2f7A>