[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Anyone working on an automated install?
On Sat, Oct 27, 2012 at 08:43:43AM +0400, Aleksej Saushev wrote:
> The process goes as this (read man pages to understand what's going on):
> fdisk -v -u -f -i -0 -s 169/63/2029041 wd0
> # you only need to make your script to find the last number by another fdisk
Actually you probably want to start the partition on a 4-sector boundary
(not 63). 64 is a much better value, although 2048 (1Mb) is often used.
> fdisk -v -f -a0 wd0
> disklabel -i wd0 # or this
> disklabel -FR wd0 /tmp/cf.label # you only need to learn how to generate
> correct file
> newfs wd0a; mount /dev/wd0a /target
> cd /target; for s in base etc text man ...; do pax -zrpe -f
> /path/to/sets/$s.tgz; done
> for s in kern-GENERIC modules; do sudo pax -zrpe -f
> /path/to/kernel/sets/$s.tgz; done
> cp /target/usr/mdec/boot /target/boot
> /usr/sbin/installboot -vf -o timeout=2 /dev/rwd0a
> Perhaps it can be simplified more, I don't remember.
> I couldn't find more detailed notes from my past project.
You can be more brutal.
# Zap existing mbr, should also hide any label
dd if=/dev/zero of=/dev/rwd0d count=1
# Zap early part of disk, things can get confused
dd if=/dev/zero of=/dev/rwd0d bs=1m count=2
# Copy in a saved mbr and first 8k of the netbsd partition.
# This include the bios partition table, mbr boot code, partition boot
# code and netbsd label. (fdisk, disklabel and installboot all in one)
# (will only work is the disks are all the same size).
dd if=image of=/dev/rwd0d bs=8k
Continue with the newfs as above.
If you want to reduce the steps further restore the required sets on another
system (not as root), and generate another archive of that directory tree.
You can then easily edit rc.conf for your site.
The two zaps from /dev/zero are probably a good idea anyway (depending
on what the dsk was used for before).
I suspect that the GPT partitioning has info squirelled away near the
end - and that ought to be zapped as well (sysinst dosn't do that).
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |