1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
\r
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
\r
6 <meta name="generator" content="AsciiDoc 7.1.2" />
\r
7 <style type="text/css">
\r
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
\r
11 border: 1px solid red;
\r
16 margin: 1em 5% 1em 5%;
\r
21 text-decoration: underline;
\r
39 h1, h2, h3, h4, h5, h6 {
\r
41 font-family: sans-serif;
\r
43 margin-bottom: 0.5em;
\r
48 border-bottom: 2px solid silver;
\r
51 border-bottom: 2px solid silver;
\r
61 border: 1px solid silver;
\r
66 margin-bottom: 0.5em;
\r
76 font-family: sans-serif;
\r
83 font-family: sans-serif;
\r
87 font-family: sans-serif;
\r
89 border-top: 2px solid silver;
\r
95 padding-bottom: 0.5em;
\r
99 padding-bottom: 0.5em;
\r
103 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
\r
104 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
\r
105 div.admonitionblock {
\r
108 margin-bottom: 1.5em;
\r
110 div.admonitionblock {
\r
112 margin-bottom: 2.5em;
\r
115 div.content { /* Block element content. */
\r
119 /* Block element titles. */
\r
120 div.title, caption.title {
\r
121 font-family: sans-serif;
\r
125 margin-bottom: 0.5em;
\r
131 td div.title:first-child {
\r
134 div.content div.title:first-child {
\r
137 div.content + div.title {
\r
141 div.sidebarblock > div.content {
\r
142 background: #ffffee;
\r
143 border: 1px solid silver;
\r
147 div.listingblock > div.content {
\r
148 border: 1px solid silver;
\r
149 background: #f4f4f4;
\r
153 div.quoteblock > div.content {
\r
154 padding-left: 2.0em;
\r
160 div.verseblock + div.attribution {
\r
164 div.admonitionblock .icon {
\r
165 vertical-align: top;
\r
168 text-decoration: underline;
\r
170 padding-right: 0.5em;
\r
172 div.admonitionblock td.content {
\r
173 padding-left: 0.5em;
\r
174 border-left: 2px solid silver;
\r
177 div.exampleblock > div.content {
\r
178 border-left: 2px solid silver;
\r
182 div.verseblock div.content {
\r
186 div.imageblock div.content { padding-left: 0; }
\r
187 div.imageblock img { border: 1px solid silver; }
\r
188 span.image img { border-style: none; }
\r
192 margin-bottom: 0.8em;
\r
197 font-style: italic;
\r
199 dd > *:first-child {
\r
204 list-style-position: outside;
\r
207 list-style-type: lower-alpha;
\r
210 div.tableblock > table {
\r
211 border: 3px solid #527bbd;
\r
214 font-family: sans-serif;
\r
223 margin-bottom: 0.8em;
\r
226 vertical-align: top;
\r
227 font-style: italic;
\r
228 padding-right: 0.8em;
\r
231 vertical-align: top;
\r
235 div#footer-badges { display: none; }
\r
237 /* Workarounds for IE6's broken and incomplete CSS2. */
\r
239 div.sidebar-content {
\r
240 background: #ffffee;
\r
241 border: 1px solid silver;
\r
244 div.sidebar-title, div.image-title {
\r
245 font-family: sans-serif;
\r
248 margin-bottom: 0.5em;
\r
251 div.listingblock div.content {
\r
252 border: 1px solid silver;
\r
253 background: #f4f4f4;
\r
257 div.quoteblock-content {
\r
258 padding-left: 2.0em;
\r
261 div.exampleblock-content {
\r
262 border-left: 2px solid silver;
\r
263 padding-left: 0.5em;
\r
266 <title>grml2hd(8)</title>
\r
270 <h1>grml2hd(8)</h1>
\r
273 <div class="sectionbody">
\r
274 <p>grml2hd - install grml on harddisk</p>
\r
277 <div class="sectionbody">
\r
278 <p>grml2hd [ partition ] [ options ]</p>
\r
279 <div class="sidebarblock">
\r
280 <div class="sidebar-content">
\r
281 <p>Important! The grml team does not take responsibility for loss of any data!</p>
\r
284 <h2>Options and environment variables</h2>
\r
285 <div class="sectionbody">
\r
286 <div class="literalblock">
\r
287 <div class="content">
\r
288 <pre><tt>-v</tt></pre>
\r
290 <p>Return version and exit.</p>
\r
291 <div class="literalblock">
\r
292 <div class="content">
\r
293 <pre><tt>GRML2HD_NONINTERACTIVE=1 grml2hd ....</tt></pre>
\r
295 <p>Install grml2hd in non-interactive mode (using /etc/grml2hd/config).</p>
\r
296 <div class="literalblock">
\r
297 <div class="content">
\r
298 <pre><tt>NOSWREMOVAL=1 grml2hd ...</tt></pre>
\r
300 <p>Disable running script remove-packages-server for removing some
\r
301 special software packages.</p>
\r
302 <div class="literalblock">
\r
303 <div class="content">
\r
304 <pre><tt>SWRAID='mbr-only' grml2hd /dev/md0 -mbr /dev/md0</tt></pre>
\r
306 <p>Install grml on raid array /dev/md0 and install mbr as well.</p>
\r
307 <div class="literalblock">
\r
308 <div class="content">
\r
309 <pre><tt>LVM='/dev/mapper/grml2hd-lvm' grml2hd</tt></pre>
\r
311 <p>Install grml on a logical volume (LVM).</p>
\r
313 <h2>Introduction</h2>
\r
314 <div class="sectionbody">
\r
315 <p>grml2hd installs grml on a partition on your harddisk and makes it
\r
316 bootable. The partition is formatted with mkfs (using the selected
\r
317 filesystem), then all necessary files are copied. Then you have to answer a
\r
318 few questions like username, passwords and which features you want to use
\r
319 on your harddisk installation. To boot the new installation lilo is
\r
320 installed in the boot-sector of the partition or in the MBR, depending
\r
321 on your selection.</p>
\r
323 <h2>Automatic installation</h2>
\r
324 <div class="sectionbody">
\r
325 <p>It is possible to run grml2hd in a non-interactive mode where no further
\r
326 manual input is required. This mode is useful if you do not want to sit in
\r
327 front of your computer during installation or if you want to set up a
\r
328 cluster of computers (e.g. a computer lab). There are two possibilities to
\r
329 run grml2hd in automatic mode. But: Do <strong>not</strong> use the grml2hd
\r
330 non-interactive mode if you do not know what you are doing!</p>
\r
331 <h3>Automatic installation trough running grml system</h3>
\r
332 <p>Configuration of the automatic installation is done via the configuration file
\r
333 /etc/grml2hd/config. To activate automatic mode you have to set the environment
\r
334 variable GRML2HD_NONINTERACTIVE or use the <em>-i</em> option on the commandline.
\r
335 Use the automatic installation mode with care as you won't be prompted
\r
336 for any more questions!</p>
\r
337 <h3>Automatic installation through booting grml</h3>
\r
338 <p>You can install grml without even booting it before. If you do not know
\r
339 your system very well we recommend booting grml before running grml2hd. If
\r
340 everything works as intented and you want to install grml on many computers
\r
341 at the same time you can do this via entering only some few words on the
\r
342 bootprompt or use grml2hd via
\r
343 <a href="http://grml.org/terminalserver/">grml-terminalserver</a>.</p>
\r
344 <p>Configuration is done via boot options:</p>
\r
345 <div class="literalblock">
\r
346 <div class="content">
\r
347 <pre><tt>user= => user name for user which should be used at hd-install (default: grml)
\r
348 filesystem={ext2|ext3|reiserfs|reiser4|jfs|xfs} => filesystem to be used (default: ext3)
\r
349 mbr=/dev/... => partition where MBR should be installed (default:=partition)
\r
350 partition=/dev/... => partition where grml should be installed (must be set - no default!)</tt></pre>
\r
352 <p>Usage example for booting and installing grml on partition /dev/hda4:</p>
\r
353 <div class="literalblock">
\r
354 <div class="content">
\r
355 <pre><tt>grml2hd partion=/dev/hda4 mbr=/dev/hda filesystem=ext3 user=mika</tt></pre>
\r
357 <p>Passwords of user root and user are "grml" - please adjust after harddisk
\r
359 <div class="sidebarblock">
\r
360 <div class="sidebar-content">
\r
361 <p>Important: not all filesystems are supported in grml-small. ext3 is the
\r
362 default and recommended. Do <strong>not</strong> use the grml2hd bootoption if you do not
\r
363 know what you are doing!</p>
\r
366 <h2>grml2hd with software RAID</h2>
\r
367 <div class="sectionbody">
\r
368 <div class="literalblock">
\r
369 <div class="content">
\r
370 <pre><tt>mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/hda1 /dev/hdc1</tt></pre>
\r
372 <p>Prepare RAID setup with mdadm.</p>
\r
373 <div class="literalblock">
\r
374 <div class="content">
\r
375 <pre><tt>SWRAID='mbr-only' grml2hd</tt></pre>
\r
377 <p>Install grml on raid array /dev/md0 and install mbr as well. The SWRAID
\r
378 environment variable provides the option for the raid-extra-boot option in
\r
379 /etc/lilo.conf. Please notice that the driver(s) for the devices used in a
\r
380 raid array have to be statically compiled into the kernel, otherwise
\r
381 automatic assembling won't work and assembling has to be done in userland
\r
382 (won't work for SW-RAID on root partitions then of course).</p>
\r
384 <h2>grml2hd with Logical Volumes (LVM)</h2>
\r
385 <div class="sectionbody">
\r
386 <p>You can configure LVM as you prefer it to (see <em>grml-tips lvm</em> for some basic
\r
387 instructions on LVM) and use a logical volume as installation target. Usage
\r
388 example for /dev/hda1:</p>
\r
389 <div class="literalblock">
\r
390 <div class="content">
\r
391 <pre><tt># make sure /dev/hda1 is of partition type 8E / Linux LVM!
\r
393 vgcreate grml2hd /dev/hda1
\r
394 lvcreate -n rootlv -L1000 grml2hd
\r
395 LVM=/dev/mapper/grml2hd-rootlv grml2hd</tt></pre>
\r
398 <h2>grml2hd with encrypted partitions.</h2>
\r
399 <div class="sectionbody">
\r
400 <p>Installing grml on an encrypted root-partition ('/') is <strong>not</strong> supported.
\r
401 But you can use encrypted partitions like /home or swap. Install grml2hd as
\r
402 usual, (re)boot into your grml system and then activate encrypted
\r
403 partitions manually.</p>
\r
404 <h3>encrypted swap partition</h3>
\r
405 <p>Deactivate swap partition:</p>
\r
406 <div class="literalblock">
\r
407 <div class="content">
\r
408 <pre><tt># swapoff -a</tt></pre>
\r
410 <p>Now adjust /etc/crypttab</p>
\r
411 <div class="literalblock">
\r
412 <div class="content">
\r
413 <pre><tt># echo "cswap /dev/hda5 /dev/urandom swap" >> /etc/crypttab</tt></pre>
\r
415 <p>Now delete the old swap-entry in /etc/fstab and add the following line:</p>
\r
416 <div class="literalblock">
\r
417 <div class="content">
\r
418 <pre><tt>/dev/mapper/cswap none swap sw,pri=1 0 0</tt></pre>
\r
420 <p>Make sure this entry is above(!) the 'Warning! Please do *not* change
\r
421 any…' line! Then enable the encrypted swap partition running:</p>
\r
422 <div class="literalblock">
\r
423 <div class="content">
\r
424 <pre><tt># /etc/init.d/cryptdisks start && swapon -a</tt></pre>
\r
426 <h3>encrypted /home partition</h3>
\r
427 <p>Make sure the device you want to use for your /home-partition is not
\r
428 mounted. Then initialize the partition you want to use as encrypted /home
\r
429 using grml-crypt. Important: this will destroy all data on /home!
\r
430 grml-crypt is a wrapper around cryptsetup-luks, you will be able to use the
\r
431 partition with every linux distribution which supports cryptsetup-luks.</p>
\r
432 <p>The following example demonstrates how to use /dev/hda5 as an encrypted
\r
433 /home partition:</p>
\r
434 <div class="literalblock">
\r
435 <div class="content">
\r
436 <pre><tt># grml-crypt -t ext3 -o format /dev/hda5</tt></pre>
\r
438 <p>Now adjust /etc/crypttab</p>
\r
439 <div class="literalblock">
\r
440 <div class="content">
\r
441 <pre><tt># echo "chda5 /dev/hda5 none luks" >>/etc/crypttab</tt></pre>
\r
443 <p>Then add the /home-partition to /etc/fstab (make sure there is not other
\r
444 entry for the partition):</p>
\r
445 <div class="literalblock">
\r
446 <div class="content">
\r
447 <pre><tt>/dev/mapper/chda5 /home ext3 defaults 0 0</tt></pre>
\r
449 <p>Make sure this entry is above(!) the 'Warning! Please do *not* change
\r
450 any…' line! If you want to keep content of your old /home make sure you
\r
451 can access it later again:</p>
\r
452 <div class="literalblock">
\r
453 <div class="content">
\r
454 <pre><tt># mv /home /home.old
\r
455 # mkdir -m 755 /home</tt></pre>
\r
457 <p>To make sure that /home is not accessible before mounted as crypto
\r
458 partition you can use chattr:</p>
\r
459 <div class="literalblock">
\r
460 <div class="content">
\r
461 <pre><tt># chattr +i /home</tt></pre>
\r
463 <p>Now start cryptdisks and mount your new /home-partition:</p>
\r
464 <div class="literalblock">
\r
465 <div class="content">
\r
466 <pre><tt># /etc/init.d/cryptdisks start && mount /home</tt></pre>
\r
468 <p>Please make sure cryptdisks is started in runlevel 2 via
\r
469 /etc/runlevel.conf!</p>
\r
470 <p>If you moved your old /home to /home.old copy files to your new
\r
471 /home-partition:</p>
\r
472 <div class="literalblock">
\r
473 <div class="content">
\r
474 <pre><tt># cp -a /home.old/* /home/</tt></pre>
\r
476 <p>If everything works as expected you will be prompted for the given LUKS
\r
477 passphrase when booting your grml system.</p>
\r
480 <div class="sectionbody">
\r
481 <div class="literalblock">
\r
482 <div class="content">
\r
483 <pre><tt>/etc/grml2hd/config</tt></pre>
\r
485 <p>Configuration file for automatic installation via grml2hd. You do not
\r
486 need to adjust this file if you do not want to run the automatic installation.</p>
\r
487 <div class="literalblock">
\r
488 <div class="content">
\r
489 <pre><tt>/usr/sbin/grml2hd-chrooted</tt></pre>
\r
491 <p>A small helper script, that executes a few commands in the harddisk
\r
492 installation. You'll never need this script, it's only useful for the
\r
493 grml2hd script.</p>
\r
494 <div class="literalblock">
\r
495 <div class="content">
\r
496 <pre><tt>/usr/bin/grml2hd-bootparams</tt></pre>
\r
498 <p>A small helper script that reads kernel's command line and displays a menu
\r
499 of boot parameters which should be used for lilo's append line. The script
\r
500 provides the selected entries on stdout so it's possible to use the script
\r
501 inside grml2hd itself.</p>
\r
502 <div class="literalblock">
\r
503 <div class="content">
\r
504 <pre><tt>/boot/grub/grml-template_menu.lst</tt></pre>
\r
506 <p>Template file for use with grml installation (grml2hd) and Grub.
\r
507 Adjust it for your needs before using it.</p>
\r
510 <div class="sectionbody">
\r
511 <h3>Why is $FEATURE not available in grml2hd?</h3>
\r
512 <p>Because one major goal of grml2hd is keep it small, simple and stable. If
\r
513 you think that you can not live without $FEATURE please let us know, see
\r
514 <a href="#X7">the <em>Bugs</em> section in this document</a> how to report feedback/bugs.</p>
\r
515 <h3>Why is SW-RAID and/or encrypted partition not available through an interface?</h3>
\r
516 <p>If you are using such a feature you should know how to handle it. It won't
\r
517 help you if you get an interface within the installer but do not know
\r
518 how to handle it afterwards.</p>
\r
519 <h3>Is it possible to customize grml2hd?</h3>
\r
520 <p>Yes, you can customize execution of grml2hd via the configuration file
\r
521 /etc/grml2hd/customization. It is used automatically when running grml2hd,
\r
522 so you just have to adjust the configuration file itself.</p>
\r
524 <h2>Known issues</h2>
\r
525 <div class="sectionbody">
\r
526 <h3>grub and SW-RAID</h3>
\r
527 <p>Installation of grub as bootmanager does not yet support installation on
\r
528 Software RAID devices.</p>
\r
529 <h3>I can't boot my grml system because Lilo says LI L99 99 99…</h3>
\r
530 <p>You probably did not install lilo to master boot record (MBR) within grml2hd and
\r
531 don't have a bootmanager in your MBR. Solution: Install lilo to MBR. Example:</p>
\r
532 <div class="literalblock">
\r
533 <div class="content">
\r
534 <pre><tt>sudo mount /mnt/hda1 # mount harddisk
\r
535 sudo chroot /mnt/hda1 # chroot into the grml-system
\r
536 vim -X /etc/lilo.conf # adjust the line containing the bootoption to 'boot=/dev/hda'
\r
537 lilo # now run lilo again, leave chroot environment (exit) and reboot your system afterwards</tt></pre>
\r
539 <h3>I installed grml on a XFS, JFS or reiser4 filesystem and grml does not boot anymore</h3>
\r
540 <p>Some filesystems and lilo don't work together when lilo is installed in the
\r
541 boot sector of the harddisk because the filesystem superblock goes where
\r
542 lilo would be installed. You have to install lilo in the master boot record
\r
543 of your harddisk to solve this problem.
\r
544 If you read this after installing grml to your harddisk you should use the
\r
545 grml live-cd and fix /etc/lilo.conf manually and rerun lilo (see above).</p>
\r
546 <h3>I installed grml to an SCSI device and now I can not boot it anymore</h3>
\r
547 <p>To access an SCSI device you probably need a specific kernel module. This
\r
548 is provided by an initial ramdisk. Please use the initrd support within
\r
549 grml2hd. To fix this issue please install a kernel with SCSI-device support
\r
550 in the chroot after running grml2hd:</p>
\r
551 <div class="literalblock">
\r
552 <div class="content">
\r
553 <pre><tt>sudo mount -o /mnt/hda1 # mount harddisk where grml is installed
\r
554 sudo chroot /mnt/hda1 # chroot into the grml-system
\r
555 update-initramfs -u -t -k $(uname -r) # create initramfs
\r
556 vim -X /etc/lilo.conf # adjust lilo for use with initrd
\r
557 lilo # now run lilo again, leave chroot environment (exit) and reboot your system afterwards</tt></pre>
\r
559 <h3>Further issues</h3>
\r
560 <p>TODOs are documented at /usr/share/doc/grml2hd/TODO.</p>
\r
562 <h2>Usage examples</h2>
\r
563 <div class="sectionbody">
\r
564 <p>Install grml on /dev/sda4 and install lilo in the mbr of /dev/sda.</p>
\r
565 <div class="literalblock">
\r
566 <div class="content">
\r
567 <pre><tt>GRML2HD_NONINTERACTIVE=1 grml2hd</tt></pre>
\r
569 <p>Runs grml2hd in automatic (non-interactive) mode. Needs adjustment of
\r
570 /etc/grml2hd/config. Use with care!</p>
\r
572 <h2><a id="X7"></a>Bugs</h2>
\r
573 <div class="sectionbody">
\r
574 <p>Please report feedback, <a href="http://grml.org/bugs/">bugreports</a> and wishes <a href="http://grml.org/contact/">to us</a>!</p>
\r
577 <div class="sectionbody">
\r
578 <p>Michael Prokop <mika@grml.org> and Andreas "Jimmy" Gredler <jimmy@grml.org></p>
\r
581 <div id="footer-text">
\r
582 Last updated 16-Sep-2007 02:51:29 CEST
\r