Re: Upgrading a removable disk installation

2008-03-01 Thread Giorgos Keramidas
On 2008-02-29 09:46, Steve Bertrand <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a couple of systems that run from USB thumb sticks. These machines
> run 6.2.
>
> I'd like to do a typical source upgrade to 7.0 on a test machine.
>
> To do this, I plug the USB disk into a 'host' machine, and to save space on
> the thumb drive, I csup the sources to the standard locations on the host
> machine.
>
> My thumb drive 'OS' slice is mounted as /var/removable-os on the host
> machine.
>
> What I am unclear about is how I go about telling buildworld etc on the
> host machine. that I want to install the updates to the /var/removable-os
> location, instead of the default '/'.

It should be easy to use DESTDIR for this.  I regularly update my USB
flash installation using the DESTDIR support of our Makefiles and the
following (a slightly modified version of the process described by
Warner Losh  in a series of excellent blog posts at
his weblog).

The commands below use sh(1) syntax, but it should be easy to `port'
them to csh(1) too:

  # cd /usr/src
  # export MAKEOBJDIRPREFIX='/ws/obj/bsd.i836'
  # export TARGET='i386'
  # export TARGET_ARCH='i386'
  # make buildworld
  # make buildkernel KERNCONF=KERAMIDA
  # fdisk -I da0
  # fdisk -B da0
  # bsdlabel -w da0s1 auto
  # bsdlabel -B da0s1
  # newfs -L USBROOT /dev/da0s1a
  # mount /dev/da0s1a /mnt
  # make installworld DESTDIR=/mnt
  # make installkernel DESTDIR=/mnt KERNCONF=KERAMIDA INSTALL_NODEBUG=t
  # make distrib-dirs DESTDIR=/mnt
  # make distribution DESTDIR=/mnt
  # echo /dev/ufs/USBROOT / ufs rw 1 1 > /mnt/etc/fstab
  # echo ifconfig_DEFAULT=DHCP > /mnt/etc/rc.conf
  # echo 'hostname="demo"' >> /mnt/etc/rc.conf

As long as you have a base system which can buildworld for the target
version/release, this should work.

Notes
*

You can obviously skip the change for `MAKEOBJDIRPREFIX', `TARGET' and
`TARGET_ARCH', if you are building the same version & architecture for
the USB flash disk.

I usually customize `GENERIC', but you can use `KERNCONF=GENERIC' where
I have used `KERNCONF=KERAMIDA' above.

References
**

http://bsdimp.blogspot.com/
Warner's weblog.

http://bsdimp.blogspot.com/2007/10/building-bootable-freebsdi386-images.html
A post which describes the steps I copied above.  See the comments
of the blog post too.  They contain a fair amount of useful tips.

http://bsdimp.blogspot.com/2007/12/building-bootable-arm-sd.html
Yet another well written post, by Warner.  This time it describes
how to build an SD disk for ARM systems, but it is also a nice read.
Some of the bits are quite interesting, i.e. the description of how
the hypothetical ARM-based system boots :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Upgrading a removable disk installation

2008-02-29 Thread Dominic Fandrey

Steve Bertrand wrote:

Hi all,

I have a couple of systems that run from USB thumb sticks. These 
machines run 6.2.


I'd like to do a typical source upgrade to 7.0 on a test machine.

To do this, I plug the USB disk into a 'host' machine, and to save space 
on the thumb drive, I csup the sources to the standard locations on the 
host machine.


My thumb drive 'OS' slice is mounted as /var/removable-os on the host 
machine.


What I am unclear about is how I go about telling buildworld etc on the 
host machine. that I want to install the updates to the 
/var/removable-os location, instead of the default '/'.


I know how to do this with sysinstall, but I'm not sure if I need to put 
an entry into /etc/make.conf, or use a command-line switch to get my 
desired results.


Can someone please help clarify how I go about this?

Steve


Use DESTDIR for installkernel and installworld. This is documented in the 
build(7) manual page.


Use the -D parameter for mergemaster.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Upgrading a removable disk installation

2008-02-29 Thread Steve Bertrand

Hi all,

I have a couple of systems that run from USB thumb sticks. These 
machines run 6.2.


I'd like to do a typical source upgrade to 7.0 on a test machine.

To do this, I plug the USB disk into a 'host' machine, and to save space 
on the thumb drive, I csup the sources to the standard locations on the 
host machine.


My thumb drive 'OS' slice is mounted as /var/removable-os on the host 
machine.


What I am unclear about is how I go about telling buildworld etc on the 
host machine. that I want to install the updates to the 
/var/removable-os location, instead of the default '/'.


I know how to do this with sysinstall, but I'm not sure if I need to put 
an entry into /etc/make.conf, or use a command-line switch to get my 
desired results.


Can someone please help clarify how I go about this?

Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"