paul@6 | 1 | Introduction
|
paul@6 | 2 | ------------
|
paul@6 | 3 |
|
paul@6 | 4 | The userinstall distribution consists of a number of scripts, together with a
|
paul@6 | 5 | short configuration file, which allows non-root users to set up and use their
|
paul@12 | 6 | own package and dependency management facilities and to download and install
|
paul@12 | 7 | Debian packages without having to obtain root privileges. The software within
|
paul@12 | 8 | installed packages may then be used, subject to certain constraints such as
|
paul@12 | 9 | program environments, library paths, and so on. In effect, userinstall
|
paul@12 | 10 | provides a personal package manager.
|
paul@6 | 11 |
|
paul@43 | 12 | In addition, userinstall also provides tools to manage conventional chroot
|
paul@43 | 13 | filesystem areas and User Mode Linux system images. Such capabilities are
|
paul@43 | 14 | useful when needing to run distributions that are sufficiently different from
|
paul@43 | 15 | the host system's distribution that the non-root approach no longer works,
|
paul@43 | 16 | due to system library or kernel incompatibilities.
|
paul@43 | 17 |
|
paul@46 | 18 | The following table summarises the capabilities and limitations of the
|
paul@46 | 19 | different modes of the software:
|
paul@46 | 20 |
|
paul@46 | 21 | Programs Unprivileged usage Same distribution Other versions
|
paul@46 | 22 | -------- ------------------ ----------------- --------------
|
paul@46 | 23 |
|
paul@46 | 24 | user-* Yes Yes Probably not
|
paul@46 | 25 | (sensitive to core
|
paul@46 | 26 | library versions)
|
paul@46 | 27 |
|
paul@46 | 28 | user-* No Yes Yes (subject to
|
paul@46 | 29 | (with --root option) kernel suitability)
|
paul@46 | 30 |
|
paul@46 | 31 | uml-* Yes (although Yes Yes
|
paul@46 | 32 | networking must be
|
paul@46 | 33 | set up by root)
|
paul@46 | 34 |
|
paul@6 | 35 | Contact, Copyright and Licence Information
|
paul@6 | 36 | ------------------------------------------
|
paul@6 | 37 |
|
paul@6 | 38 | The current Web page for userinstall at the time of release is:
|
paul@6 | 39 |
|
paul@6 | 40 | http://www.boddie.org.uk/paul/userinstall.html
|
paul@6 | 41 |
|
paul@6 | 42 | Copyright and licence information can be found in the docs directory - see
|
paul@6 | 43 | docs/COPYING.txt and docs/gpl-3.0.txt for more information.
|
paul@6 | 44 |
|
paul@17 | 45 | Thanks to Piotr Roszatycki, the maintainer of fakechroot, for helpfully fixing
|
paul@25 | 46 | system call coverage in that utility in order to attempt to support
|
paul@25 | 47 | cross-distribution bootstrapping.
|
paul@17 | 48 |
|
paul@6 | 49 | Dependencies
|
paul@6 | 50 | ------------
|
paul@6 | 51 |
|
paul@6 | 52 | fakeroot Tested with 1.5.10ubuntu2
|
paul@17 | 53 | fakechroot 2.8 or later required
|
paul@15 | 54 | debootstrap Tested with 0.3.3.2ubuntu3 on Ubuntu Hoary 5.04, 1.0.7~feisty1
|
paul@21 | 55 | on Ubuntu Feisty 7.04, 1.0.20~hardy1 on Ubuntu Hardy
|
paul@54 | 56 | lsb-release Tested with 3.2-23.2squeeze1 (apparently required for Debian
|
paul@54 | 57 | squeeze and subsequent distribution versions)
|
paul@6 | 58 |
|
paul@48 | 59 | New in userinstall 0.2.1 (Changes since userinstall 0.2)
|
paul@48 | 60 | --------------------------------------------------------
|
paul@48 | 61 |
|
paul@49 | 62 | * Added more User Mode Linux and configuration-related documentation.
|
paul@54 | 63 | * Introduced usage of the lsb_release command in preference to the
|
paul@54 | 64 | /etc/lsb-release file.
|
paul@48 | 65 |
|
paul@22 | 66 | New in userinstall 0.2 (Changes since userinstall 0.1)
|
paul@22 | 67 | ------------------------------------------------------
|
paul@14 | 68 |
|
paul@21 | 69 | * Adopted lsb-release environment variables instead of new ones like
|
paul@22 | 70 | DISTNAME, exposing derivatives of these variables by default.
|
paul@21 | 71 | * Added explicit keyring package installation.
|
paul@25 | 72 | * Added -do scripts for configuring and entering the chroot.
|
paul@25 | 73 | * Removed specific apt- and dpkg-related scripts, replacing them with the
|
paul@25 | 74 | general -do scripts.
|
paul@25 | 75 | * Added --root options to certain scripts in order to support normal chroot
|
paul@30 | 76 | installations. Added --dev option for bind mounting of /dev in normal
|
paul@30 | 77 | chroot installations.
|
paul@27 | 78 | * Added support for UML instance construction from distribution
|
paul@43 | 79 | installations, along with networking support and a uml-net script. Also
|
paul@43 | 80 | added some support for booting from initrd files and installation media
|
paul@43 | 81 | image files.
|
paul@14 | 82 |
|
paul@6 | 83 | Configuration
|
paul@6 | 84 | -------------
|
paul@6 | 85 |
|
paul@12 | 86 | If the system defaults are not to be used, or if userinstall is not installed
|
paul@6 | 87 | as a system package, the userinstall-defaults file supplied with the
|
paul@12 | 88 | distribution may be edited to specify the nature and location of the personal
|
paul@22 | 89 | package manager.
|
paul@21 | 90 |
|
paul@22 | 91 | The following settings can be edited:
|
paul@21 | 92 |
|
paul@22 | 93 | USERINSTALL_ID This should reflect the distribution being used or, in
|
paul@22 | 94 | special cases, a different distribution. Examples
|
paul@22 | 95 | include Debian and Ubuntu.
|
paul@6 | 96 |
|
paul@22 | 97 | USERINSTALL_CODENAME This should reflect the version of the distribution
|
paul@22 | 98 | being used and need only be altered in special
|
paul@22 | 99 | situations (such as the creation of a sandbox for
|
paul@22 | 100 | testing other distributions).
|
paul@15 | 101 |
|
paul@22 | 102 | Examples of codenames include hardy and jaunty for
|
paul@22 | 103 | Ubuntu and lenny and squeeze for Debian. Note that the
|
paul@22 | 104 | setup process may not work with different distributions
|
paul@22 | 105 | due to library incompatibilities.
|
paul@22 | 106 |
|
paul@22 | 107 | PACKAGEROOT The location of the personal package manager in the
|
paul@22 | 108 | filesystem.
|
paul@22 | 109 |
|
paul@22 | 110 | See the /etc/lsb-release file for example values describing your own system,
|
paul@22 | 111 | with the DISTRIB prefix used instead of the USERINSTALL prefix for each of the
|
paul@22 | 112 | settings.
|
paul@6 | 113 |
|
paul@6 | 114 | If a completely new userinstall-defaults file is created, it is essential that
|
paul@6 | 115 | the above variables be defined so that the scripts know where to create or to
|
paul@48 | 116 | find the personal package manager. Typically, a new userinstall-defaults file
|
paul@48 | 117 | will reside in the current directory when the different userinstall commands
|
paul@48 | 118 | are being issued.
|
paul@6 | 119 |
|
paul@12 | 120 | Creating a Personal Package Manager
|
paul@12 | 121 | -----------------------------------
|
paul@6 | 122 |
|
paul@6 | 123 | In order to install packages as a non-root user, first invoke the user-setup
|
paul@6 | 124 | script; this will create and initialise a basic Debian system with a basic set
|
paul@6 | 125 | of packages installed. For example, with userinstall installed as a system
|
paul@12 | 126 | package, using the system defaults:
|
paul@6 | 127 |
|
paul@6 | 128 | user-setup
|
paul@6 | 129 |
|
paul@12 | 130 | It is possible to override the "template" for the system by specifying a
|
paul@6 | 131 | "mirror" location. This is useful if you have the CD or DVD image for the
|
paul@12 | 132 | distribution already mounted in the filesystem. For example:
|
paul@6 | 133 |
|
paul@6 | 134 | user-setup file:///cdrom
|
paul@20 | 135 |
|
paul@20 | 136 | sudo mount -o loop /home/me/downloads/kubuntu-7.04-alternate-i386.iso /tmp/cdrom
|
paul@20 | 137 | user-setup file:///tmp/cdrom
|
paul@6 | 138 |
|
paul@34 | 139 | A URL must be specified as the "mirror" location, not a normal filename.
|
paul@6 | 140 |
|
paul@22 | 141 | Once the installation is complete, some post-installation is necessary:
|
paul@22 | 142 |
|
paul@22 | 143 | user-postsetup
|
paul@22 | 144 |
|
paul@22 | 145 | If a different distribution is being used for the package manager than that
|
paul@22 | 146 | being run on the system, it might be necessary to specify a country code so
|
paul@22 | 147 | that the configuration of package repositories can be performed successfully.
|
paul@22 | 148 | For example, for repositories mirrored in the United Kingdom (UK):
|
paul@22 | 149 |
|
paul@22 | 150 | user-postsetup uk
|
paul@22 | 151 |
|
paul@22 | 152 | At this point, the package manager should be ready to use.
|
paul@22 | 153 |
|
paul@12 | 154 | Adding Package Repositories to the Package Manager
|
paul@12 | 155 | --------------------------------------------------
|
paul@12 | 156 |
|
paul@12 | 157 | To get access to repositories of packages beyond those provided by the basic
|
paul@12 | 158 | distribution, edit the /etc/apt/sources.list file inside the system. The
|
paul@6 | 159 | user-path script can help you find the exact location of the file:
|
paul@6 | 160 |
|
paul@7 | 161 | user-path /etc/apt/sources.list
|
paul@6 | 162 |
|
paul@6 | 163 | And you can edit the file directly with a text editor (such as vi) as follows:
|
paul@6 | 164 |
|
paul@7 | 165 | vi `user-path /etc/apt/sources.list`
|
paul@6 | 166 |
|
paul@6 | 167 | Installing Packages
|
paul@6 | 168 | -------------------
|
paul@6 | 169 |
|
paul@25 | 170 | To install packages from other repositories, invoke the user-do script and
|
paul@25 | 171 | specify the apt-get program together with options expected by that program.
|
paul@25 | 172 | For example:
|
paul@15 | 173 |
|
paul@25 | 174 | user-do apt-get --help
|
paul@25 | 175 | user-do apt-get update
|
paul@15 | 176 |
|
paul@25 | 177 | Packages can then be installed. For example:
|
paul@15 | 178 |
|
paul@25 | 179 | user-do apt-get install python-cmdsyntax
|
paul@6 | 180 |
|
paul@6 | 181 | Provided that the specified packages are known and their dependencies can be
|
paul@12 | 182 | met, they will be installed into the system.
|
paul@6 | 183 |
|
paul@6 | 184 | Installing Single Packages
|
paul@6 | 185 | --------------------------
|
paul@6 | 186 |
|
paul@25 | 187 | To install individual package files, first copy them into the package manager
|
paul@25 | 188 | directory hierarchy. For example:
|
paul@6 | 189 |
|
paul@25 | 190 | cp python-cmdsyntax_0.91-0ubuntu2_all.deb `user-path /tmp`
|
paul@6 | 191 |
|
paul@25 | 192 | The invoke the dpkg program through the user-do script as follows:
|
paul@25 | 193 |
|
paul@25 | 194 | user-do dpkg -i /tmp/python-cmdsyntax_0.91-0ubuntu2_all.deb
|
paul@7 | 195 |
|
paul@7 | 196 | Using Packages
|
paul@7 | 197 | --------------
|
paul@7 | 198 |
|
paul@7 | 199 | Unlike most packages installed in the usual way by the root user, the installed
|
paul@7 | 200 | packages will not reside within a directory hierarchy rooted at / - the top of
|
paul@7 | 201 | the filesystem. Instead, they will reside in a location such as the following:
|
paul@7 | 202 |
|
paul@7 | 203 | /home/me/.userinstall
|
paul@7 | 204 | /tmp/packages
|
paul@7 | 205 |
|
paul@7 | 206 | (The precise location may be found by running the user-path script.)
|
paul@7 | 207 |
|
paul@7 | 208 | Consequently, to make use of the installed software, it may be necessary to
|
paul@7 | 209 | edit your environment in a number of ways so that it may be located and
|
paul@7 | 210 | correctly loaded, initialised and executed.
|
paul@7 | 211 |
|
paul@7 | 212 | Using Python Packages
|
paul@7 | 213 | ---------------------
|
paul@7 | 214 |
|
paul@7 | 215 | Installed Python packages may be made available to Python by defining the
|
paul@7 | 216 | PYTHONPATH to include the directories usually searched by Python, but which
|
paul@12 | 217 | are actually located within the personal package management environment. For
|
paul@12 | 218 | example, with the Python 2.5 site-packages directory:
|
paul@7 | 219 |
|
paul@11 | 220 | PYTHONPATH=`user-path /usr/lib/python2.5/site-packages/` python2.5
|
paul@11 | 221 |
|
paul@11 | 222 | More complicated extension modules may require further adjustments to the
|
paul@11 | 223 | LD_LIBRARY_PATH and PYTHONPATH variables:
|
paul@11 | 224 |
|
paul@25 | 225 | export LD_LIBRARY_PATH=`user-path /usr/lib`
|
paul@25 | 226 | export PYTHONPATH=`user-path /usr/lib/python2.5/site-packages/`
|
paul@25 | 227 | export PYTHONPATH=${PYTHONPATH}:`user-path /var/lib/python-support/python2.5`
|
paul@22 | 228 |
|
paul@22 | 229 | Entering the Package Manager
|
paul@22 | 230 | ----------------------------
|
paul@22 | 231 |
|
paul@22 | 232 | It is also possible to administer the package manager from within the
|
paul@22 | 233 | installation:
|
paul@22 | 234 |
|
paul@25 | 235 | user-do
|
paul@22 | 236 |
|
paul@22 | 237 | This should provide a "root" prompt which can then be used to issue commands
|
paul@22 | 238 | within the package manager environment. For example:
|
paul@22 | 239 |
|
paul@39 | 240 | apt-get update && apt-get upgrade
|
paul@22 | 241 |
|
paul@29 | 242 | Creating and Entering a Package Manager in Root Mode
|
paul@29 | 243 | ----------------------------------------------------
|
paul@29 | 244 |
|
paul@29 | 245 | The user-setup, user-postsetup and user-do scripts also support a --root
|
paul@29 | 246 | option which sets up a package manager for a user with root privileges. To
|
paul@31 | 247 | set up such an installation, the following commands can be used:
|
paul@29 | 248 |
|
paul@34 | 249 | user-setup --root
|
paul@34 | 250 | user-postsetup --root
|
paul@29 | 251 |
|
paul@29 | 252 | Entering the installation is done using the user-do script:
|
paul@29 | 253 |
|
paul@34 | 254 | user-do --root
|
paul@29 | 255 |
|
paul@29 | 256 | Note that in root mode, the /proc and /sys filesystems are mounted within the
|
paul@29 | 257 | installation. Care must be taken not to delete the contents of these
|
paul@29 | 258 | directories within the installation while the above command is running;
|
paul@29 | 259 | otherwise, this can potentially damage the main operating system installation
|
paul@29 | 260 | on your computer.
|
paul@29 | 261 |
|
paul@30 | 262 | Using the Host's Device Filesystem
|
paul@30 | 263 | ----------------------------------
|
paul@30 | 264 |
|
paul@30 | 265 | In root mode, the /dev filesystem on the host can be mounted by using the
|
paul@30 | 266 | --dev option with user-do:
|
paul@30 | 267 |
|
paul@34 | 268 | user-do --root --dev
|
paul@30 | 269 |
|
paul@30 | 270 | Note that care must be taken not to delete the contents of this directory
|
paul@30 | 271 | within the installation while the above command is running.
|
paul@30 | 272 |
|
paul@30 | 273 | Enabling Audio in Root Mode
|
paul@30 | 274 | ---------------------------
|
paul@30 | 275 |
|
paul@30 | 276 | Together with the --root and --dev options, audio can be enabled for
|
paul@30 | 277 | applications within an installation by adding users to the audio group in
|
paul@30 | 278 | /etc/group. In addition, it may be necessary to run an audio manager daemon
|
paul@30 | 279 | depending on the system used to manage the audio on the host.
|
paul@30 | 280 |
|
paul@30 | 281 | For example, the artsd package may need installing in order to make the
|
paul@30 | 282 | corresponding artsdsp program available to applications within the package
|
paul@30 | 283 | manager.
|
paul@30 | 284 |
|
paul@48 | 285 | Configuration of User Mode Linux Instances
|
paul@48 | 286 | ------------------------------------------
|
paul@22 | 287 |
|
paul@22 | 288 | For some applications, it can be desirable to provide a completely isolated
|
paul@22 | 289 | environment for package installation and testing. This can be performed using
|
paul@22 | 290 | the User Mode Linux (UML) software.
|
paul@22 | 291 |
|
paul@48 | 292 | Alongside the userinstall-defaults file, a userinstall-defaults-uml file must
|
paul@48 | 293 | be made available. As with the generic userinstall-defaults file, the
|
paul@48 | 294 | UML-specific configuration in userinstall-defaults-uml must be edited to
|
paul@48 | 295 | reflect the desired settings such that appropriate network addresses are used
|
paul@48 | 296 | along with a suitable Linux kernel.
|
paul@48 | 297 |
|
paul@48 | 298 | Constructing UML Instances
|
paul@48 | 299 | --------------------------
|
paul@48 | 300 |
|
paul@31 | 301 | Since UML needs to see its filesystems as images, not directories within an
|
paul@31 | 302 | existing filesystem, the uml-make-image script needs to create these image
|
paul@39 | 303 | files. For example, to create a root filesystem 4GB in size, along with a swap
|
paul@31 | 304 | file 512MB in size:
|
paul@22 | 305 |
|
paul@31 | 306 | uml-make-image 4 512
|
paul@22 | 307 |
|
paul@31 | 308 | This will create a UML instance from an existing package manager installation.
|
paul@73 | 309 | Where a root mode package filesystem has been created, use the following
|
paul@73 | 310 | command:
|
paul@73 | 311 |
|
paul@73 | 312 | uml-make-image --root 4 512
|
paul@73 | 313 |
|
paul@66 | 314 | However, if a UML instance will be populated using installation media
|
paul@66 | 315 | (described below), the following is more suitable:
|
paul@66 | 316 |
|
paul@66 | 317 | uml-make-image --no-fs 4 512
|
paul@66 | 318 |
|
paul@66 | 319 | This does not create filesystems but instead leaves it to the installer to
|
paul@66 | 320 | partition the files created.
|
paul@22 | 321 |
|
paul@75 | 322 | Resizing Filesystems
|
paul@75 | 323 | --------------------
|
paul@75 | 324 |
|
paul@75 | 325 | To change the size of filesystems later on, use the resize2fs command after
|
paul@75 | 326 | having checked the filesystem. For example, with a root filesystem file called
|
paul@75 | 327 | root-root.fs and a desired new filesystem size of 6GB:
|
paul@75 | 328 |
|
paul@75 | 329 | /sbin/e2fsck -f root-root.fs
|
paul@75 | 330 | /sbin/resize2fs root-root.fs 6G
|
paul@75 | 331 |
|
paul@75 | 332 | Obviously, these commands will only work with ext2 family filesystems.
|
paul@75 | 333 |
|
paul@31 | 334 | Building User Mode Linux
|
paul@31 | 335 | ------------------------
|
paul@22 | 336 |
|
paul@31 | 337 | To make a User Mode Linux executable, run the uml-build-linux script.
|
paul@22 | 338 |
|
paul@27 | 339 | Enabling Networking for UML Instances
|
paul@27 | 340 | -------------------------------------
|
paul@27 | 341 |
|
paul@27 | 342 | To enable networking for a UML instance, use the uml-net script:
|
paul@27 | 343 |
|
paul@27 | 344 | sudo uml-net --start $USER
|
paul@27 | 345 |
|
paul@27 | 346 | Here, $USER should be expanded to the name of the user running the above
|
paul@75 | 347 | command, not the root user. If invoked as above using sudo, the name of the
|
paul@75 | 348 | invoking user should be provided by $USER because the shell will expand that
|
paul@75 | 349 | variable before any program is run.
|
paul@27 | 350 |
|
paul@27 | 351 | To stop networking, use the same script:
|
paul@27 | 352 |
|
paul@27 | 353 | sudo uml-net --stop
|
paul@27 | 354 |
|
paul@22 | 355 | Entering or Starting UML Instances
|
paul@22 | 356 | ----------------------------------
|
paul@22 | 357 |
|
paul@29 | 358 | To enter a UML instance, use the uml-do script, specifying an amount of memory
|
paul@29 | 359 | to allocate to the instance:
|
paul@22 | 360 |
|
paul@29 | 361 | uml-do 512M
|
paul@34 | 362 |
|
paul@34 | 363 | Specifying the --net option allows networking to be used by the instance, if
|
paul@34 | 364 | set up as described above:
|
paul@34 | 365 |
|
paul@34 | 366 | uml-do 512M --net
|
paul@35 | 367 |
|
paul@49 | 368 | Accessing UML Consoles
|
paul@49 | 369 | ----------------------
|
paul@49 | 370 |
|
paul@49 | 371 | During the boot process, User Mode Linux should report a number of lines of
|
paul@49 | 372 | the following form:
|
paul@49 | 373 |
|
paul@49 | 374 | Virtual console 1 assigned device '/dev/pts/3'
|
paul@49 | 375 |
|
paul@49 | 376 | This indicates that to access console 1, the given device should be accessed.
|
paul@49 | 377 | This can be done using the screen command as follows:
|
paul@49 | 378 |
|
paul@49 | 379 | screen /dev/pts/3
|
paul@49 | 380 |
|
paul@49 | 381 | You may need to press Return/Enter to "wake up" the console in order to see a
|
paul@49 | 382 | login prompt.
|
paul@49 | 383 |
|
paul@43 | 384 | Booting into UML from Installation Media
|
paul@43 | 385 | ----------------------------------------
|
paul@43 | 386 |
|
paul@43 | 387 | Instead of populating a filesystem image for User Mode Linux from an existing
|
paul@43 | 388 | distribution installation, blank images can be created as follows:
|
paul@43 | 389 |
|
paul@73 | 390 | uml-make-image --no-fs 4 512
|
paul@43 | 391 |
|
paul@43 | 392 | Then, an initrd file can be used together with installation media - typically
|
paul@43 | 393 | an ISO file that would usually be burned onto a CD or DVD - such that a UML
|
paul@43 | 394 | instance can be booted and a distribution then installed into the blank images
|
paul@43 | 395 | from the installation media.
|
paul@43 | 396 |
|
paul@43 | 397 | The initrd file is typically extracted from an ISO file (for example,
|
paul@43 | 398 | installer.iso) as follows (with superuser privileges):
|
paul@43 | 399 |
|
paul@43 | 400 | mkdir installer
|
paul@43 | 401 | mount -o loop installer.iso installer
|
paul@43 | 402 | cp installer/initrd.gz .
|
paul@43 | 403 | umount installer
|
paul@43 | 404 |
|
paul@43 | 405 | This assumes that initrd.gz is found at the top level of the installation
|
paul@62 | 406 | media's filesystem. It may also be found in a directory below the top level
|
paul@62 | 407 | such as install.386 (taking the i386 architecture as an example) on Debian
|
paul@62 | 408 | installation media.
|
paul@43 | 409 |
|
paul@43 | 410 | The UML instance is then booted as follows:
|
paul@43 | 411 |
|
paul@43 | 412 | uml-do 512M --net --initrd initrd.gz installer.iso
|
paul@43 | 413 |
|
paul@43 | 414 | The blank images will appear as /dev/ubda and /dev/ubdb devices in the
|
paul@43 | 415 | instance, not merely as partitions, and so installers may ask you if you would
|
paul@43 | 416 | like to partition these devices still further.
|
paul@43 | 417 |
|
paul@62 | 418 | The installation media will appear as /dev/ubdc and this may need to be
|
paul@62 | 419 | specified manually when an installer is attempting to read the installation
|
paul@62 | 420 | media from what it thinks is a CD-ROM drive.
|
paul@62 | 421 |
|
paul@62 | 422 | Since the installer will most likely be designed for use on real hardware,
|
paul@62 | 423 | various operations will be performed that will fail in a UML environment. Of
|
paul@62 | 424 | particular importance is that of networking, and it may be necessary to
|
paul@62 | 425 | configure networking manually during any installation process, skip any update
|
paul@62 | 426 | steps requiring the network, and to perform additional configuration and
|
paul@62 | 427 | updates after the installation has been carried out.
|
paul@62 | 428 |
|
paul@62 | 429 | Exiting an installer may be problematic since the installer may assume that
|
paul@62 | 430 | the installation media has been ejected from the system when it is, in fact,
|
paul@62 | 431 | still available after a reboot. To shut down the UML instance, obtain a shell
|
paul@62 | 432 | from the installer program and issue the "halt" command.
|
paul@62 | 433 |
|
paul@48 | 434 | Once an installation has been performed using installation media, it should be
|
paul@53 | 435 | possible to omit the --initrd options when running uml-do on subsequent
|
paul@53 | 436 | occasions.
|
paul@48 | 437 |
|
paul@48 | 438 | Using Graphical Desktop Environments with UML
|
paul@48 | 439 | ---------------------------------------------
|
paul@48 | 440 |
|
paul@48 | 441 | It is possible to start a graphical desktop environment from within a User
|
paul@48 | 442 | Mode Linux instance and display the desktop on the host's display. In the host
|
paul@48 | 443 | environment, access to the display must be granted using a program such as
|
paul@48 | 444 | xhost. For example, for a UML instance whose network address is 192.168.0.98:
|
paul@48 | 445 |
|
paul@48 | 446 | xhost +192.168.0.98
|
paul@48 | 447 |
|
paul@48 | 448 | In the UML instance, the Xephyr program can be run to provide a display for
|
paul@48 | 449 | the graphical environment. For example, for a host that appears as
|
paul@48 | 450 | 192.168.0.254 to the UML instance:
|
paul@48 | 451 |
|
paul@48 | 452 | DISPLAY=192.168.0.254:0.0 Xephyr :1 -screen 1024x768 &
|
paul@48 | 453 |
|
paul@48 | 454 | It should then be possible to start a desktop environment with the
|
paul@48 | 455 | Xephyr-based display specified as the appropriate display to use:
|
paul@48 | 456 |
|
paul@48 | 457 | DISPLAY=:1 gnome-session &
|
paul@48 | 458 |
|
paul@48 | 459 | Here, Xephyr has been started as screen :1.
|
paul@48 | 460 |
|
paul@35 | 461 | Issues with Shared Memory
|
paul@35 | 462 | -------------------------
|
paul@35 | 463 |
|
paul@35 | 464 | It is possible for User Mode Linux to just crash having exhausted the host
|
paul@35 | 465 | system's shared memory. This can be worked around by remounting tmpfs with
|
paul@35 | 466 | more space. For example:
|
paul@35 | 467 |
|
paul@35 | 468 | sudo mount -t tmpfs tmpfs /dev/shm -o remount,size=805306368
|
paul@35 | 469 |
|
paul@35 | 470 | This allocates 768MB (the figure is given in bytes) to tmpfs.
|
paul@35 | 471 |
|
paul@35 | 472 | One bug related to User Mode Linux and Debian exists:
|
paul@35 | 473 |
|
paul@35 | 474 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388128
|
paul@35 | 475 |
|
paul@35 | 476 | And this Debian installer bug may be related to experiences with pbuilder and
|
paul@35 | 477 | other package installation activities:
|
paul@35 | 478 |
|
paul@35 | 479 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239758
|