Re: enable MFS for RAMDISK_CD on amd64

2011-05-10 Thread Daniel C. Sinclair
On Mon, May 9, 2011 at 1:49 PM, Stuart Henderson s...@spacehopper.org wrote:
 Why?

One situation that it would be useful is netbooting and using
/sbin/restore to rebuild filesystems over the network.  restore needs
to write temporary data to /tmp but the ramdisks don't have enough
space.  It would be handy to be able to mount /tmp on mfs.

I think it would be better it restore didn't write to /tmp, though.

Daniel



Re: enable MFS for RAMDISK_CD on amd64

2011-05-10 Thread Brett Lymn
On Tue, May 10, 2011 at 07:07:43PM -0700, Daniel C. Sinclair wrote:
 
 One situation that it would be useful is netbooting and using
 /sbin/restore to rebuild filesystems over the network.  restore needs
 to write temporary data to /tmp but the ramdisks don't have enough
 space.  It would be handy to be able to mount /tmp on mfs.
 
 I think it would be better it restore didn't write to /tmp, though.
 

restore honours TMPDIR.

-- 
Brett Lymn
Warning:
The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited.  If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender's responsibility.  It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer.



Re: enable MFS for RAMDISK_CD on amd64

2011-05-09 Thread Stuart Henderson
Why?

On 2011-05-09, Ted Roby ted.r...@gmail.com wrote:
 This patch enables MFS in RAMDISK_CD, adds the MFS flag to
 distrib/special/newfs binary and creates the sbin/mount_mfs link for instbin.

 ted dot roby at gmail dot com

 Index: distrib/amd64/common/list
===
 RCS file: /cvs/src/distrib/amd64/common/list,v
 retrieving revision 1.24
 diff -u -r1.24 list
 --- distrib/amd64/common/list 18 Oct 2010 04:07:49 -  1.24
 +++ distrib/amd64/common/list 7 May 2011 22:15:11 -
 @@ -40,7 +40,7 @@
  LINK instbin sbin/mount_ffs
  LINK instbin sbin/reboot sbin/halt
  LINK instbin sbin/kbd
 -LINK instbin sbin/newfs
 +LINK instbin sbin/newfs sbin/mount_mfs
  LINK instbin sbin/ping
  LINK instbin sbin/restore
  LINK instbin sbin/route
 Index: distrib/special/newfs/Makefile
===
 RCS file: /cvs/src/distrib/special/newfs/Makefile,v
 retrieving revision 1.2
 diff -u -r1.2 Makefile
 --- distrib/special/newfs/Makefile28 Oct 2009 07:36:49 -  1.2
 +++ distrib/special/newfs/Makefile7 May 2011 22:15:11 -
 @@ -3,7 +3,7 @@
  PROG=newfs
  SRCS=dkcksum.c getmntopts.c newfs.c mkfs.c

 -CFLAGS+= -I${.CURDIR}/../../../sbin/mount
 +CFLAGS+=-DMFS -I${.CURDIR}/../../../sbin/mount

Some ramdisks for some arch are tight enough on space that this will
be likely overflow them.

  .PATH:  ${.CURDIR}/../../../sbin/newfs
  .PATH:  ${.CURDIR}/../../../sbin/mount
  .PATH:   ${.CURDIR}/../../../sbin/disklabel
 Index: sys/arch/amd64/conf/RAMDISK_CD
===
 RCS file: /cvs/src/sys/arch/amd64/conf/RAMDISK_CD,v
 retrieving revision 1.116
 diff -u -r1.116 RAMDISK_CD
 --- sys/arch/amd64/conf/RAMDISK_CD3 Apr 2011 12:32:05 -   1.116
 +++ sys/arch/amd64/conf/RAMDISK_CD7 May 2011 22:15:32 -
 @@ -15,6 +15,7 @@
  option   FFS # UFS
  option   FFS2# UFS2
  #option  EXT2FS  # Linux ext2fs
 +option   MFS

  option   NFSCLIENT   # Network File System client



Re: enable MFS for RAMDISK_CD on amd64

2011-05-09 Thread Kenneth R Westerback
On Mon, May 09, 2011 at 08:49:17PM +, Stuart Henderson wrote:
 Why?

Whyt?++

 Ken

 
 On 2011-05-09, Ted Roby ted.r...@gmail.com wrote:
  This patch enables MFS in RAMDISK_CD, adds the MFS flag to
  distrib/special/newfs binary and creates the sbin/mount_mfs link for 
  instbin.
 
  ted dot roby at gmail dot com
 
  Index: distrib/amd64/common/list
 ===
  RCS file: /cvs/src/distrib/amd64/common/list,v
  retrieving revision 1.24
  diff -u -r1.24 list
  --- distrib/amd64/common/list   18 Oct 2010 04:07:49 -  1.24
  +++ distrib/amd64/common/list   7 May 2011 22:15:11 -
  @@ -40,7 +40,7 @@
   LINK   instbin sbin/mount_ffs
   LINK   instbin sbin/reboot sbin/halt
   LINK   instbin sbin/kbd
  -LINK   instbin sbin/newfs
  +LINK   instbin sbin/newfs 
  sbin/mount_mfs
   LINK   instbin sbin/ping
   LINK   instbin sbin/restore
   LINK   instbin sbin/route
  Index: distrib/special/newfs/Makefile
 ===
  RCS file: /cvs/src/distrib/special/newfs/Makefile,v
  retrieving revision 1.2
  diff -u -r1.2 Makefile
  --- distrib/special/newfs/Makefile  28 Oct 2009 07:36:49 -  1.2
  +++ distrib/special/newfs/Makefile  7 May 2011 22:15:11 -
  @@ -3,7 +3,7 @@
   PROG=  newfs
   SRCS=  dkcksum.c getmntopts.c newfs.c mkfs.c
 
  -CFLAGS+= -I${.CURDIR}/../../../sbin/mount
  +CFLAGS+=-DMFS -I${.CURDIR}/../../../sbin/mount
 
 Some ramdisks for some arch are tight enough on space that this will
 be likely overflow them.
 
   .PATH:  ${.CURDIR}/../../../sbin/newfs
   .PATH:  ${.CURDIR}/../../../sbin/mount
   .PATH: ${.CURDIR}/../../../sbin/disklabel
  Index: sys/arch/amd64/conf/RAMDISK_CD
 ===
  RCS file: /cvs/src/sys/arch/amd64/conf/RAMDISK_CD,v
  retrieving revision 1.116
  diff -u -r1.116 RAMDISK_CD
  --- sys/arch/amd64/conf/RAMDISK_CD  3 Apr 2011 12:32:05 -   1.116
  +++ sys/arch/amd64/conf/RAMDISK_CD  7 May 2011 22:15:32 -
  @@ -15,6 +15,7 @@
   option FFS # UFS
   option FFS2# UFS2
   #optionEXT2FS  # Linux ext2fs
  +option MFS
 
   option NFSCLIENT   # Network File System client



Re: enable MFS for RAMDISK_CD on amd64

2011-05-09 Thread Ted Roby
On Mon, May 9, 2011 at 2:49 PM, Stuart Henderson s...@spacehopper.org wrote:
 Why?


I posted it to misc for general archival.

When creating diskless systems that do not use pxeboot, I use mfs
mount points to construct userland in memory from a bsd.rd kernel.

I can do this with a modified rdroot with shadow paths and symlinks.

An alternate binary path with the default instbin will suffice while
replacing /sbin and /bin paths. Then, any setup media (hd, cd) can be
unmounted.

Anyone wanting to do the same will find this patch useful.