Possible (or smart) to put freebsd-boot on USB stick for root-on-ZFS?
Mehmet Erol Sanliturk
m.e.sanliturk at gmail.com
Tue Mar 24 08:56:56 UTC 2015
On Tue, Mar 24, 2015 at 1:29 AM, Polytropon <freebsd at edvax.de> wrote:
> On Tue, 24 Mar 2015 00:49:46 -0700, Mehmet Erol Sanliturk wrote:
> > 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 .
> This setup gives you the ability to relapse to the old "state"
> whenever something fails - both the OS and your files will be
> as you left them. I think the main problem here is the copying
> process. If you are using separate UFS partitions, using dump
> and restore to transfer files might be quicker than "stupid"
> > 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" ) .
> The "modern" installation method of "curl ... | sudo bash" maybe? ;-)
> > 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
> > OS .
> This is a good approach. In case you can't use separate disks,
> at least use separate UFS partitions. If you're using ZFS, you
> can apply the restriction that /home is not mounted during OS
> installation or upgrade.
> > 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 .
> This will also help you to avoid accidental messing with boot
> records or partition tables. I "happily" remember the OS/2 installer
> damaging my partition table, and I had to reconstruct it manually
> with a hex editor and a handheld calculator. :-)
> > After installing the new OS and verifying that it is working correctly ,
> > am powering the data HDD and using an fstab entry to mount it .
> You can do something similar with ZFS and connected disks: Use
> boot environments as known on Solaris. Create a snapshot of the
> working installation first. Then install the new OS. Boot into
> that environment and check if everything works. Make sure /home
> is out of scope, just in case. And if you're happy with it, you
> can delete the snapshot. If not - make it the active installation
> again and purge the damaged new install. See the "beadm" port
> for details.
> > 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
> > not important .
> If you don't mind longer startup times, you can even use a SD
> card in an USB enclosure, or a USB stick. This makes it possible
> to have "pluggable OS versions", like "beadm in hardware". :-)
> > 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 .
> Exactly. BEs allow you to do this with your regular set of hard
> disks. However, by applying ultimate fat fingers, you can still
> damage things. It's way harder to do that when your old install
> is on a separate physical disk, disconnected, safely stored.
> > 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 .
> Also have a look at cpdup, it's very handy.
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
In my set up , my /home/user_name
is in OS disk for login purposes and it is mainly empty , it is not in data
On NEW OS installs , I am using the SAME user name ( not password ) to
prevent user changes in data disks .
Data disks are mounted on different directories such as
An external HDD ( ntfs ) , synchronized through .../media/... in Linux (
auto mounted when attached ).
( In FreeBSD , this may be an internal HDD mounted by "fstab" into a
directory such as /Saved_Files_B and formatted as like /Saved_Files_A or
different ( one UFS , other ZFS , etc. ) . )
directories are my user_name , not "root" .
Thank you very much .
Mehmet Erol Sanliturk
More information about the freebsd-questions