Re: Reinstall without reformat

2013-10-14 Thread Mehmet Erol Sanliturk
On Mon, Oct 14, 2013 at 1:21 AM, Polytropon free...@edvax.de wrote:

 On Sun, 13 Oct 2013 23:01:02 -0600 (MDT), Warren Block wrote:
  On Mon, 14 Oct 2013, Polytropon wrote:
 
   On Sun, 13 Oct 2013 13:24:30 -0400, Kenta Suzumoto wrote:
   Hi all. Is it possible to install FreeBSD without formatting the disk?
  
   Yes. The installer supports not formatting existing partitions.
   The file system characteristica will be kept, possible content
   will overwritten. Note that superfluous content will also be
   kept, except of course you previously remove everything.
 
  sysinstall supported that, but AFAIK bsdinstall does not.

 Oh, seems you're right. I've checked The FreeBSD Handbook for
 the relevant instructions for using bsdinstall at

 http://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html

 and

 http://www.freebsd.org/doc/handbook/bsdinstall-final-warning.html

 and I didn't find an option to _not_ initialize existing partitions,
 even though it seems you can assign existing partitions without any
 problem. The remaining question: Will they be initialized again?

 I know that sysinstall had the option newfs toggle so you could
 skip the newfs step after you had assigned the existing partitions
 to the desired mountpoints.

 It can be seen at

 http://www.freebsd.org/doc/handbook/install-steps.html

 in Fig. 3.19 and 3.24.

 I have to admit that I didn't assume such a significant loss of
 functionality (that sysinstall provided!) in the new installer... :-(

 That's why maybe manually extracting the distribution files from
 the installation media, using the CLI tools, would probably the
 easiest thing: Manually mount existing partitions as desired,
 then extract the installation datasets, and apply any further
 modifications as needed.



 --
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...



OR

Disconnect power line of existing HDD to be reinstalled .
Attach another HDD or drive , for example USB stick .
Perform a fresh install on the new unit .
After verifying that the new install is working properly ,
Shutdown the computer ,
attach power of previous HDD ,
mount it ,
copy all of the new files from freshly installed unit into previous HDD,
Shutdown the computer ,
Disconnect newly installed unit ,
Restart the computer .
It is very likely that your previous HDD will work as like newly installed .

OR

Do the reverse :

From previous HDD , copy all of the required files to the new HDD .
Disconnect previous HDD or unit .
Continue with the new HDD or unit .

If the previous HDD is not bootable , it is necessary to continue with the
new HDD .

I am applying the second kind of steps for all my new installs .

In that way nothing is broken , even there is no back up of the files
because
nothing applied to the existing HDD .

The cost of this operation is to have a spare disk or a USB stick having
sufficient capacity .
Personally I am not using USB sticks for such operations because they may
fail unexpectedly .

Thank you very much .


Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Reinstall without reformat

2013-10-14 Thread Warren Block

On Mon, 14 Oct 2013, Polytropon wrote:


On Sun, 13 Oct 2013 23:01:02 -0600 (MDT), Warren Block wrote:

On Mon, 14 Oct 2013, Polytropon wrote:


On Sun, 13 Oct 2013 13:24:30 -0400, Kenta Suzumoto wrote:

Hi all. Is it possible to install FreeBSD without formatting the disk?


Yes. The installer supports not formatting existing partitions.
The file system characteristica will be kept, possible content
will overwritten. Note that superfluous content will also be
kept, except of course you previously remove everything.


sysinstall supported that, but AFAIK bsdinstall does not.


Oh, seems you're right. I've checked The FreeBSD Handbook for
the relevant instructions for using bsdinstall at

http://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html

and

http://www.freebsd.org/doc/handbook/bsdinstall-final-warning.html

and I didn't find an option to _not_ initialize existing partitions,
even though it seems you can assign existing partitions without any
problem. The remaining question: Will they be initialized again?


It is possible to mount filesystems manually from the shell and have 
bsdinstall continue with the install without formatting them.  It's been 
a while since I tried that, and I don't recall the exact details. 
bsdinstall(8) suggests it may be as easy as just having the existing 
filesystems mounted at /mnt.  Still, not something to try without a 
backup.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Reinstall without reformat

2013-10-14 Thread Polytropon
On Mon, 14 Oct 2013 07:51:15 -0600 (MDT), Warren Block wrote:
 It is possible to mount filesystems manually from the shell and have 
 bsdinstall continue with the install without formatting them.  It's been 
 a while since I tried that, and I don't recall the exact details. 
 bsdinstall(8) suggests it may be as easy as just having the existing 
 filesystems mounted at /mnt.  Still, not something to try without a 
 backup.

So if I understand everything correctly, the decision logic
is -- when partitions do already exist -- as follows:

a) existing partitions not mounted:
   run newfs
   mount partitions
   copy files

b) existing partitions mounted:
   do not run newfs
   copy files

The installer itself doesn't seem to give a hint about
this logic, even though the manual _might_ suggest it.
I haven't examined the source code to fully verify this
logic, even though it would be a reasonable approach.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Reinstall without reformat

2013-10-14 Thread Michael Sierchio
The brutal and brute-force approach can work - better if you boot from
a USB stick, of course. You can untar base.tzx and kernel.tzx in your
/, with filesystems mounted.  As Polytropon says, do a backup of what
you'll want afterwards.

This approach will leave a lot of cruft (old versions of shared
libraries, etc.), but will certainly work.  Grab the distribution from

(in this case, the example is for 9.2, i386)

ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/i386/9.2-RELEASE
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Reinstall without reformat

2013-10-13 Thread Polytropon
On Sun, 13 Oct 2013 13:24:30 -0400, Kenta Suzumoto wrote:
 Hi all. Is it possible to install FreeBSD without formatting the disk?

Yes. The installer supports not formatting existing partitions.
The file system characteristica will be kept, possible content
will overwritten. Note that superfluous content will also be
kept, except of course you previously remove everything.



 I have one directory of data that I want to keep.

You should still make a backup, because I want to keep does
imply exactly that in regards of an OS installation. :-)



 I can boot from the
 installer and rm every directory except that (/bin /boot etc), but how
 could I install the OS from there?

You simply re-enter the installer, assign the (existing, but now
empty) partitions to the desired mountpoint, make sure _not_ to
newfs them, and then commit to the installation as usual.

An alternative would be, after preparing the partitions, mount
them as desired and extract the installation datasets from the
installation media manually (via shell commands). Still you might
miss other steps the installer performs.



 I've done ZFS on root installs with
 the shell and mounting the zpool to /mnt, would that work here too?

Probably yes (never tried that myself).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Reinstall without reformat

2013-10-13 Thread Warren Block

On Mon, 14 Oct 2013, Polytropon wrote:


On Sun, 13 Oct 2013 13:24:30 -0400, Kenta Suzumoto wrote:

Hi all. Is it possible to install FreeBSD without formatting the disk?


Yes. The installer supports not formatting existing partitions.
The file system characteristica will be kept, possible content
will overwritten. Note that superfluous content will also be
kept, except of course you previously remove everything.


sysinstall supported that, but AFAIK bsdinstall does not.


I have one directory of data that I want to keep.


You should still make a backup, because I want to keep does
imply exactly that in regards of an OS installation. :-)


Absolutely.  With no backup, only one tiny thing can go wrong and the 
data is gone.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Reinstall without reformat

2013-10-13 Thread Polytropon
On Sun, 13 Oct 2013 23:01:02 -0600 (MDT), Warren Block wrote:
 On Mon, 14 Oct 2013, Polytropon wrote:
 
  On Sun, 13 Oct 2013 13:24:30 -0400, Kenta Suzumoto wrote:
  Hi all. Is it possible to install FreeBSD without formatting the disk?
 
  Yes. The installer supports not formatting existing partitions.
  The file system characteristica will be kept, possible content
  will overwritten. Note that superfluous content will also be
  kept, except of course you previously remove everything.
 
 sysinstall supported that, but AFAIK bsdinstall does not.

Oh, seems you're right. I've checked The FreeBSD Handbook for
the relevant instructions for using bsdinstall at

http://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html

and

http://www.freebsd.org/doc/handbook/bsdinstall-final-warning.html

and I didn't find an option to _not_ initialize existing partitions,
even though it seems you can assign existing partitions without any
problem. The remaining question: Will they be initialized again?

I know that sysinstall had the option newfs toggle so you could
skip the newfs step after you had assigned the existing partitions
to the desired mountpoints.

It can be seen at

http://www.freebsd.org/doc/handbook/install-steps.html

in Fig. 3.19 and 3.24.

I have to admit that I didn't assume such a significant loss of
functionality (that sysinstall provided!) in the new installer... :-(

That's why maybe manually extracting the distribution files from
the installation media, using the CLI tools, would probably the
easiest thing: Manually mount existing partitions as desired,
then extract the installation datasets, and apply any further
modifications as needed.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org