Re: howto make sysintall

From: iv gan (devif0_at_gmail.com)
Date: 08/16/05

  • Next message: Martin Nilsson: "Re: Backup problem for backup MySQL (a table > 2GB)"
    Date: Tue, 16 Aug 2005 11:44:10 +0200
    To: John Baldwin <jhb@freebsd.org>
    
    

    Thanks for the answers John, Glen
    I think John was right that it is better to build my own mfsroot and
    then make config scripts etc.
    The `sysctl -a` can do the thing with detecting the hardware etc. It
    is a bit lammy but is working. Then dd fdisk bsdlabel and newfs do the
    rest.
    However if someone is there with an idea how to correctly build
    sysinstall it would be wellcome.
    greets..

    Ivo

    On 8/10/05, John Baldwin <jhb@freebsd.org> wrote:
    > On Wednesday 10 August 2005 09:18 am, iv gan wrote:
    > > I am not so sure because the script cannot detect different devices.
    > > It can be ad or ar or whatever but it cannot chechk for it. And what I
    > > would like to do is more to detect the device and then to do something
    > > like 10% to /, 20% to /tmp 35% to /var and 35% to /usr or something
    > > like it.
    > > Any suggestion?
    >
    > You can run a command to generate a config file that you then include. I use
    > this with shell scripts that invoke 'dialog' to provide the user with custom
    > menus. A sample is something like this:
    >
    > install.cfg:
    >
    > # select media
    > command=sh /stand/setmedia.sh
    > system
    > configFile=/stand/setmedia.cfg
    > loadConfig
    >
    > setmedia.sh:
    >
    > #!/bin/sh
    > #
    > # Set the installation media based on kernel environment variables.
    >
    > config=/stand/setmedia.cfg
    >
    > case `kenv media` in
    > FTP)
    > iface=`kenv iface`
    > server=`kenv server`
    >
    > echo "abort" > ${config}
    > if [ -z "${iface}" -o -z "${server}" ]; then
    > dialog --title "Missing Settings" --msgbox "The
    > network interface and FTP server must be specified\nvia the 'iface' and
    > 'server' variables in loader.conf." -1 -1
    > exit 1
    > fi
    > found=0
    > for ifn in `ifconfig -l`; do
    > if [ "${ifn}" = "${iface}" ]; then
    > found=1
    > fi
    > done
    > if [ ${found} -eq 0 ]; then
    > dialog --title "Invalid Interface" --msgbox "The
    > network interface ${iface} is not present." -1 -1
    > exit 1
    > fi
    > echo "# Setup for FTP install" > ${config}
    > echo "command=/stand/dhclient ${iface}" >> ${config}
    > echo "system" >> ${config}
    > echo "hostname=localhost" >> ${config}
    > echo "netDev=${iface}" >> ${config}
    > echo "_ftpPath=ftp://${server}/pub/FreeBSD" >> ${config}
    > echo "ifconfig_${iface}=DHCP" >> ${config}
    > echo "mediaSetFTP" >> ${config}
    > ;;
    > *)
    > # Default to CD
    > echo "# select CDROM media" > ${config}
    > echo "mediaSetCDROM" >> ${config}
    > esac
    >
    >
    > This is just the part to setup the install media. What I do here is share the
    > same mfsroot across both CD installs and installs over PXE, but in
    > the /usr/nfsroot on the PXE server I have a boot/loader.conf that looks like:
    >
    > boot/loader.conf:
    > # NFS install
    > media=FTP
    > iface=fxp0
    > server=10.1.2.3
    >
    > I also use a similar approach to use different disk layouts for different
    > configurations, etc. In my case I patched the release sources to include
    > kenv and dialog in the crunch for the mfsroot and added my custom scripts to
    > stand/ in the mfsroot.
    >
    > --
    > John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
    > "Power Users Use the Power to Serve" = http://www.FreeBSD.org
    >
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Martin Nilsson: "Re: Backup problem for backup MySQL (a table > 2GB)"

    Relevant Pages

    • Re: howto make sysintall
      ... this with shell scripts that invoke 'dialog' to provide the user with custom ... # Set the installation media based on kernel environment variables. ... This is just the part to setup the install media. ... kenv and dialog in the crunch for the mfsroot and added my custom scripts to ...
      (freebsd-hackers)
    • Setting permissions/ownership/destination in distutils?
      ... config in setup.cfg to control where the scripts go: ... But it would be very helpful if I could install some of the scripts in ...
      (comp.lang.python)
    • Re: Multiple Questions
      ... adding to the local administrators group is giving ... Login scripts - I've a bunch of various apps I need installed on ... Assigning to a user will install the app upon logon. ...
      (microsoft.public.win2000.active_directory)
    • Re: Multiple Questions
      ... adding to the local administrators group is giving ... Login scripts - I've a bunch of various apps I need installed on ... Assigning to a user will install the app upon logon. ...
      (microsoft.public.win2000.general)
    • Re: Multiple Questions
      ... adding to the local administrators group is giving ... Login scripts - I've a bunch of various apps I need installed on ... Assigning to a user will install the app upon logon. ...
      (microsoft.public.win2000.group_policy)