On Sun, 9 Nov 2014 10:09:49 +0100 =?utf-8?Q?S=C3=A9bastien?= Marie 
<semarie-open...@latrappe.fr> wrote:
> On Sat, Nov 08, 2014 at 10:57:41PM +0200, Atanas Vladimirov wrote:
> > On 24.10.2014 00:33, Robert Peichaer wrote:
> > 
> > I'm following -current and decided to try autoinstall(8) from
> > /auto_upgrade.conf when I moved to newer snapshot.
> > I made a custom auto_upgrade.conf on my root [sd2a] partition but when I
> > boot a newer bsd.rd,
> > auto_upgrade.conf is not on the miniroot. I escaped to shell, mounted sd2a
> > on /mnt and copied auto_upgrade.conf to miniroot.
> > Then Autoupgrade completed as it should.
> > The question is whether there are any easier steps to make auto_upgrade from
> > local file, not by using dhcp/tftp/http?
> > Thanks,
> > Atanas
> 
> The auto_upgrade.conf is searched in the ramdisk partition (which was
> into bsd.rd). As thevoid@ wrote, you could rebuild a new bsd.rd image to
> include it.
> 
> Personnally, I extract the ramdisk image from bsd.rd, mount it, copy the
> auto_upgrade.conf to it, and restore the ramdisk into bsd.rd.
> 
> Here the "pseudo-script" I use:
> 
> # build rdsetroot
> ( cd /usr/src/distrib/common && cc -o /tmp/rdsetroot elf32.c elf64.c 
> elfrdsetroot.c )
> 
> # extract ramdisk from bsd.rd
> /tmp/rdsetroot -x bsd.rd ramdisk.img
> 
> # mount ramdisk
> vnconfig vnd0 ramdisk.img
> mount /dev/vnd0a /mnt
> 
> # copy config file
> cp auto_upgrade.conf /mnt/auto_upgrade.conf
> 
> # umount ramdisk
> umount /dev/vnd0a
> vnconfig -u vnd0
> 
> # put modified ramdisk in bsd.rd
> /tmp/rdsetroot bsd.rd ramdisk.img
> 
> # cleanup
> rm ramdisk.img
> 
> And now, you could boot your modified bsd.rd.
> -- 
> Sébastien Marie
> 

i like this. for this particular purpose, this is definitely a better method.

Reply via email to