Hi,

As said in my previous message about this wishlist bug report, I was
working on a version for login as a user.  The solution I have used is
quite ugly, but nonetheless, I shamelessly publish it here.

Unfortunately I have not been able to put the /usr directory in the
ramdisk: it is too small.  And I have not found where its size was
decided in dfsbuild source code.

Best regards,
Frederic Lehobey
# Copyright (c) 2004 John Goerzen
# Copyright (c) 2005 Frédéric Daniel Luc LEHOBEY (fdl)
# Inspired from the dfs.cfg config file originally written by John
# Goerzen for Debian From Scratch this xdfs-user.cfg config file provides
# some support for X and autologin as xdfs-user.
# 
# Below are some remainder of capabilities and limitations of the
# syntax of this configuration file (see package
# libmissinglib-ocaml-dev).  Remember them when writing you own
# additions.
# 
# = and : are separators for options like:
# 
#   name : value                    or               name = value
# 
# and
# 
#   /file/path = body               or               /file/path : body
# 
# The consequence is that no ":" nor "=" can be put in a file body
# excepted on the first line (after the first separator = or :).
# The workaround used here is to put all the lines with an "=" or a
# ":" on the first line.  Like:
# 
#   /etc/environment = [EMAIL PROTECTED]
# 
# It is not always possible... (I have not found a way for menu files).
# 
# The option name is, by standard, always turned to lower case.  It
# means files or directories like /etc/X11/XF86Config-4 with capital
# letters cannot be created or modified (see /root/.profile for some
# ugly workaround).
# 
# Only text can put into touched config files (only owned by root).
# Changing file modes from this config file or moving random binary
# file is not supported by the version of dfsbuild (0.6.19) I have used.
# 
# The "#" (followed with at least an other character like a white
# space otherwise it breaks the parsing) is the beginning of a comment
# for this file.  It cannot be used inside the body of an option (see
# Debian bug #278484).  It means your modified config files inside the
# target will not inherit new comments from here.
# 
# Have fun.  dfsbuild is a very nice tool (do not forget it must be
# run as root).

[DEFAULT]
######################################################################
# Overall settings, set defaults for all archs
######################################################################

# Name of generated disc
name = XDFS Live CD (DFS + X Window System)

# Version of generated disc
version = 2005-06-03

# Person that built it
builder = Frederic LEHOBEY <[EMAIL PROTECTED]>

# Repositories to mirror.  Details about each one are configured below.
dlrepos = sid

# Repository to build the CD with.  Must be in above list.
suite = sid

# Whether or not to use zftree compression on ISO image
compress = yes

# Files to never compress if the above is yes
# If a dir is given, that dir and everything below is not compressed
dontcompress = /boot
        /etc/*boot*
        /opt/dfsruntime/initrd.dfs

# Location of dfsbuild support files
libdir = /usr/lib/dfsbuild

# Location of docs for CD
docdir = /usr/share/doc/dfsbuild

# Bootloader to place on CD.  Choices are:
# grub-hd              GRUB with ElTorito hard disk emulation (not working yet)
# grub-no-emul         "raw" ElTorito image
# aboot                Alpha SRM bootloader
# yaboot               PowerPC bootloader
# (usually set in arch area)
#bootloader = grub-no-emul


# Packages to install on live FS, on all archs, besides base system.
# Mandatory package for DFS is busybox-static.
# rungetty is used for autologin (see /root/.profile and
# /etc/inittab).
# strace and less are left only for debugging purposes.
allpackages = busybox-static
        rungetty sudo
        locales xfonts-75dpi-transcoded xfonts-100dpi-transcoded
        discover hotplug
        x-window-system-core xfce4 menu
        strace less

# Default mirror for "repo" sections
mirror = http://localhost/debian
#mirror = http://ftp.fr.debian.org/debian

# Devices to probe for CD
devices = scd0 scd1 scd2 scd3 scd4 hda hdb hdc hdd hde hdf hdg

# Files to place on the ramdisk
# /usr/lib/locale is for storing localedef results as called by
# locale-gen (see /root/.profile).
# I have not been able to put the full /usr (that would be nice) as it
# fills the ramdisk (not yet found how to set it up).
# If you want to install new packages from the live system, add /usr
# and full /etc.
# If you want to create user accounts, add /home and full /etc.
ramdisk_files = /dev
        /etc
        /home
        /root
        /tmp
        /usr/lib/locale
        /var

# Directories to create on live fs (compulsory entry).
makedirs = 

# Files to delete from live fs
deletefiles = /etc/rcS.d/*lvm

######################################################################
# Arch settings: i386
######################################################################

[i386]
# I have not yet dig into proper kernel compiling for DFS (standard
# Debian kernels do not work yet).  As a temporary workaround, I use
# here John Goerzen ones mounted in /mnt by
# mount -o loop dfs-0.6.19_i386.iso /mnt

# Name of any kernel images to install directly from your current filesystem
kernels = /mnt/boot/vmlinuz-2.6.11

# Modules to copy from host filesystem
modules = /mnt/lib/modules/2.6.11

# Other packages to install besides the list in DEFAULT
packages = %(allpackages)s grub read-edid

# Debs from local fs to install on live fs
# installdebs = 

# Bootloader (see options under default)
bootloader = grub-no-emul

# Extra lines for grub config
#grubconfig = default 1

######################################################################
# Text to add to existing files
######################################################################

[appendfiles]
/etc/network/interfaces = auto eth0
  iface eth0 inet dhcp
  iface eth1 inet dhcp
  iface eth2 inet dhcp
  iface wlan0 inet dhcp
  iface wlan1 inet dhcp
  iface wlan2 inet dhcp
  iface ath0 inet dhcp

/etc/issue = Bienvenue sur une XDFS « Debian From Scratch (DFS) avec X ».
 Pour se connecter, utiliser le nom d'utilisateur « root » et appuyer sur
 Entrée si un mot de passe est demandé.

# Some magic for autologin and setting up everything (?) at startup.
# Well, I agree it not very clean, but if you find a better way
# please publish it.
# NOTICE that any necessary 'adduser xdfs-user group' should be put
# there too.
# The 'mv /root/.xf86config-4' is a workaround for current lack of
# support of capital letters in filename options (see
# /tmp/xf86config-4).  The md5sum is only cosmetic to allow future
# xserver-xfree86 reconfiguration.
/root/.profile = /bin/loadkeys fr-latin0 ; if [ -z "$DISPLAY" -a `tty` = 
/opt/dfsruntime/runtimemnt/dev/tty10 ]; then echo "xdfs-user ALL = NOPASSWD: 
ALL" >> /etc/sudoers
 chvt 10
 rm /etc/nologin
 locale-gen
 update-menus
 adduser --gecos "XDFS User" --disabled-password xdfs-user
 mv /root/.xf86config-4 /etc/X11/XF86Config-4
 md5sum /etc/X11/XF86Config-4 >/var/lib/xfree86/XF86Config-4.md5sum
 cat /root/.xdfs-user.bashrc >> /home/xdfs-user/.bashrc
 su - xdfs-user
 fi

# This somewhat allows autologin with the /root/.profile (see the if
# condition in this file).
/etc/inittab = 10:2345:once:/sbin/rungetty -u root tty10 -- /bin/login -f root

# Enable bash completion.
/etc/bash.bashrc = if [ -f /etc/bash_completion ]; then
     . /etc/bash_completion
 fi

# Cosmetic: just to hide the actual expanded name of home directory of
# users.
/etc/profile = cd

######################################################################
# Files to create or truncate
######################################################################

[createfiles]
/etc/hostname = xdfs

/etc/syslog.conf = *.*             /dev/tty8
 *.info                            /dev/tty9

# Localisation.
/etc/environment = [EMAIL PROTECTED]

# Localisation.  Add the following locale environments to be generated
# by locale-gen (see /root/.profile).
/etc/locale.gen = [EMAIL PROTECTED] ISO-8859-15

# Menu files we want to get rid of (see man update-menus) in order
# not to clutter the Debian menus.
# It is easy to remove all the entries at once but I have not found a
# nice workaround to put some of them into the file (the menu syntax
# is full of ":" that can only be put on the first line of option name).
/etc/menu/pppconfig = 
/etc/menu/pppoeconf = 
/etc/menu/tasksel = 
/etc/menu/telnet = 
/etc/menu/xbase-clients = 
/etc/menu/xfce4-mcs-manager = 
/etc/menu/xfce4-utils = 
/etc/menu/xfdesktop4 = 
/etc/menu/xffm4 = 
/etc/menu/xfwm4 = 

# This file will be appended to xdfs-user .bashrc.  It is a ugly hack
# to start X with proper locale.
/root/.xdfs-user.bashrc = if [ -z "$DISPLAY" -a `tty` = 
/opt/dfsruntime/runtimemnt/dev/tty10 ]; then export [EMAIL PROTECTED] ; export 
TZ=Europe/Paris
 startx
 fi

# This file is used as XDFS default XF86Config file to provide a
# 1024x768 screen with X default vesa.  All entries with a ":" moved
# to the first line.
/root/.xf86config-4 = Section "Files" FontPath "unix/:7100" FontPath 
"/usr/lib/X11/fonts/100dpi/:unscaled" FontPath 
"/usr/lib/X11/fonts/75dpi/:unscaled"
        FontPath "/usr/lib/X11/fonts/misc"
        FontPath "/usr/lib/X11/fonts/cyrillic"
        FontPath "/usr/lib/X11/fonts/Type1"
        FontPath "/usr/lib/X11/fonts/CID"
        FontPath "/usr/lib/X11/fonts/Speedo"
        FontPath "/usr/lib/X11/fonts/100dpi"
        FontPath "/usr/lib/X11/fonts/75dpi"
 EndSection
 Section "Module"
        Load "GLcore"
        Load "bitmap"
        Load "dbe"
        Load "ddc"
        Load "dri"
        Load "extmod"
        Load "freetype"
        Load "glx"
        Load "int10"
        Load "record"
        Load "speedo"
        Load "type1"
        Load "vbe"
 EndSection
 Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver  "keyboard"
        Option  "CoreKeyboard"
        Option  "XkbRules" "xfree86"
        Option  "XkbModel" "pc105"
        Option  "XkbLayout" "fr"
 EndSection
 Section "InputDevice"
        Identifier "Configured Mouse"
        Driver  "mouse"
        Option  "CorePointer"
        Option  "Device"  "/dev/input/mice"
        Option  "Protocol"  "ImPS/2"
        Option  "Emulate3Buttons" "true"
        Option  "ZAxisMapping"  "4 5"
 EndSection
 Section "InputDevice"
        Identifier "Generic Mouse"
        Driver  "mouse"
        Option  "SendCoreEvents" "true"
        Option  "Device"  "/dev/input/mice"
        Option  "Protocol"  "ImPS/2"
        Option  "Emulate3Buttons" "true"
        Option  "ZAxisMapping"  "4 5"
 EndSection
 Section "Device"
        Identifier "Carte vidéo générique"
        Driver  "vesa"
 EndSection
 Section "Monitor"
        Identifier "Écran générique"
        HorizSync 28-50
        VertRefresh 43-75
        Option  "DPMS"
 EndSection
 Section "Screen"
        Identifier "Default Screen"
        Device  "Carte vidéo générique"
        Monitor  "Écran générique"
        DefaultDepth 24
        SubSection "Display"
                Depth  24
                Modes  "1024x768" "800x600" "640x480"
        EndSubSection
 EndSection
 Section "ServerLayout"
        Identifier "Default Layout"
        Screen  "Default Screen"
        InputDevice "Generic Keyboard"
        InputDevice "Configured Mouse"
        InputDevice "Generic Mouse"
 EndSection
 Section "DRI"
        Mode 0666
 EndSection

######################################################################
# Symlinks to create (from = to format)
######################################################################

[symlinks]
/etc/mtab = /proc/mounts

Reply via email to