NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Is it possible to chroot and then install NetBSD to the boot drive



Al <al%familysafeinternet.com@localhost> writes:

> What I would like to be able to do is do an install on either another
> drive or on an NFS partition. Then chroot to it and then delete the
> files that are on /, /var, and /usr and then do a clean install of
> NetBSD. Is this possible? If it is, could someone give me a how to on
> doing something like this?

chrooting will be awkward, because once you chroot then you will be
running the binaries from the new install, which only works if your host
system is compatible (NetBSD, same or later, more or less).  And if you
remove files, you won't be able to run new commands.

However, you don't need to chroot.  If you take a new drive, and
fdisk/disklabel it, and mount it, and then unpack the sets, and then
install bootblocks, it should work.  You didn't mention, but if you mean
i386, then bootblocks consists of installboot for bootxx_ffsv1
(probably) and also /boot, plus mbr boot records.  If the host is NetBSD
you can just use installboot and cp, pointing to /usr/mdec in the new
system.

I have done something similar a number of times, basically moving a
system from old disks to new (bigger, less aged and in theory more
reliable) disks.  So instead of unpacking sets, I have done dump/restore
or rsync from old to new (under /mnt) and then installed bootblocks.

Attachment: pgpR3SzSy5UTS.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index