Guest User

Untitled

a guest
Nov 10th, 2015
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 99.73 KB | None | 0 0
  1. Slackware Linux CD-ROM Installation HOWTO
  2. Patrick Volkerding <volkerdi@slackware.com>
  3. v14.1, 2012-10-12
  4.  
  5. This document covers installation of the Slackware(R) distribution of the
  6. Linux operating system from the Slackware CD-ROM.
  7. ______________________________________________________________________
  8.  
  9.  
  10. Table of Contents
  11.  
  12.  
  13. 1. Introduction
  14.  
  15. 1.1 Sources of documentation
  16.  
  17. 2. Hardware requirements
  18.  
  19. 3. Slackware Space Requirements
  20.  
  21. 3.1 Preparing a Partition for Slackware
  22. 3.2 Booting the Slackware CD-ROM
  23. 3.3 Using Linux fdisk to create Linux partitions
  24.  
  25. 4. Installing the Slackware distribution
  26.  
  27. 4.1 The ADDSWAP option
  28. 4.2 The TARGET option
  29. 4.3 The SOURCE option
  30. 4.4 The SELECT option
  31. 4.5 The INSTALL option
  32. 4.6 The CONFIGURE option
  33. 4.7 LILO
  34. 4.8 Networking
  35.  
  36. 5. Booting the installed Slackware system
  37.  
  38. 6. Post-installation configuration
  39.  
  40. 6.1 /etc/rc.d/rc.modules
  41. 6.2 Configuring the X Window System
  42. 6.3 Hardware acceleration with X
  43. 6.4 User Accounts
  44.  
  45. 7. For more information
  46.  
  47. 8. Trademarks
  48.  
  49. ______________________________________________________________________
  50.  
  51. 1. Introduction
  52.  
  53. Linux is a multiuser, multitasking operating system that was developed by
  54. Linus Torvalds and hundreds of volunteers around the world working over
  55. the Internet.
  56.  
  57. The Linux operating system now runs on several machine architectures,
  58. including ARMs, Intel 80x86, Sparc, 68K, PowerPC, DEC Alpha, MIPS, and
  59. others. The x86 Slackware distribution of Linux runs on most PC
  60. processors compatible with the Intel 486 or better, including (but not
  61. limited to) the Intel 486, Celeron, Pentium I, MMX, Pro, II, III, Xeon,
  62. 4, M, D, Core, Core 2, Core i7, and Atom; AMD 486, K5, K6, K6-II, K6-III,
  63. Duron, Athlon, Athlon XP, Athlon MP, Athlon 64, Sempron, Phenom,
  64. Phenom II, and Neo; Cyrix 486, 5x86, 6x86, M-II; Via Cyrix III, Via C3,
  65. Via Nano; Transmeta Crusoe and Efficeon. Essentially anything that's
  66. x86 and 32-bit (with at least i486 opcodes) will do for the 32-bit x86
  67. edition of Slackware, or 64-bit and supporting x86_64 extensions (also
  68. known as AMD64, EM64T, or Intel 64) for the x86_64 edition of Slackware.
  69.  
  70. Linux is modeled after the UNIX(R) operating system. The Slackware
  71. distribution contains a full program development system with support for
  72. C, C++, Fortran-77, LISP, and other languages, full TCP/IP networking
  73. with NFS, PPP, CIFS/SMB (Samba), a full implementation of the X Window
  74. System, and much more.
  75.  
  76.  
  77. 1.1. Sources of Documentation
  78.  
  79. If you're new to Slackware, you'll be happy to know there is a *lot* of
  80. documentation and help available both on the Internet and on the CD-ROM
  81. itself.
  82.  
  83. The Slackware documentation wiki has a lot of information:
  84.  
  85. http://docs.slackware.com
  86.  
  87. A great source of general documentation about Linux is the Linux
  88. Documentation Project, online at: http://tldp.org/
  89.  
  90. Here you will find a collection of documents known as the "Linux HOWTOs"
  91. as well as other useful guides.
  92.  
  93. For additional help with Slackware, check out the Slackware forum at
  94. linuxquestions.org.
  95.  
  96.  
  97. 2. Hardware Requirements
  98.  
  99. Most PC hardware will work fine with Slackware, but some Plug-and-Play
  100. devices can be tricky to set up. In some cases you can work around this
  101. by letting DOS initialize the card and then starting Slackware with the
  102. Loadlin utility. Setting the computer's BIOS to configure Plug-and-Play
  103. cards also may help -- to do this, change the "Plug and Play OS" option to
  104. "no".
  105.  
  106. Here's a basic list of what you'll need to install Slackware:
  107.  
  108. 128 megabytes (128MB) or more of RAM. If you have less RAM than this, you
  109. might still be able to install, but if so don't expect the best possible
  110. experience.
  111.  
  112. You also will need some disk space to install Slackware. For a complete
  113. installation, you'll probably want to devote a 10GB *or larger* partition
  114. completely to Slackware (you'll need almost 8GB for a full default
  115. installation, and then you'll want extra space when you're done).
  116. If you haven't installed Slackware before, you may have to experiment.
  117. If you've got the drive space, more is going to be better than not enough.
  118. Also, you can always install only the first software set (the A series
  119. containing only the basic system utilities) and then install more software
  120. later once your system is running.
  121.  
  122. If you use SCSI, Slackware supports most SCSI controllers. The "huge"
  123. kernels support as much of the boot hardware as possible, including
  124. several hardware RAID controllers, Fiber Channel controllers, software
  125. RAID in linear and RAID 0 through 6 and RAID 10, LVM (Logical Volume
  126. Manager), and kernel support required to have fully encrypted systems.
  127.  
  128. To install from the DVD or CD-ROM, you'll need a supported drive. These
  129. days, the chances that your drive is supported by the install kernels
  130. is excellent. But, if not, you can always use a USB stick and install
  131. via the network. Or, use a floppy disk to install using PXE and the
  132. network. See the docs in usb-and-pxe-installers and the etherboot
  133. directory within for instructions.
  134.  
  135.  
  136. 3. Slackware Space Requirements
  137.  
  138. Slackware divides the installable software into categories. (in the old
  139. days when people installed Linux from floppy disks, these were often
  140. referred to as "disk sets") Only the A series category (containing the
  141. base Linux OS) is mandatory, but you can't do very much on a system that
  142. only has the A series installed. Here's an overview of the software
  143. categories available for installation, along with the (approximate) amount
  144. of drive space needed to install the entire set:
  145.  
  146. A The base Slackware system. (405 MB)
  147.  
  148. AP Linux applications. (445 MB)
  149.  
  150. D Program development tools. (1.1 GB)
  151.  
  152. E GNU Emacs. (117 MB)
  153.  
  154. F FAQs and HOWTOs for common tasks. (33 MB)
  155.  
  156. K Linux 3.10.17 kernel source. (582 MB)
  157.  
  158. KDE The KDE desktop environment and applications. (1.4 GB)
  159.  
  160. KDEI Language support for KDE. (1 GB)
  161.  
  162. L System libraries. (1.3 GB)
  163.  
  164. N Networking applications and utilities. (340 MB)
  165.  
  166. T TeX typesetting language. (291 MB)
  167.  
  168. TCL Tcl/Tk/TclX scripting languages and tools. (19 MB)
  169.  
  170. X X Window System graphical user interface. (389 MB)
  171.  
  172. XAP Applications for the X Window System. (571 MB)
  173.  
  174. XFCE The XFCE desktop environment and applications. (72 MB)
  175.  
  176. Y Classic text-based BSD games. (6 MB)
  177.  
  178. If you have the disk space, we encourage you to do a full installation for
  179. best results. Otherwise, remember that you must install the A set. You
  180. probably also want to install the AP, D, L, and N series, as well as the KDE,
  181. X, XAP, and XFCE sets if you wish to run the X Window System. The Y series is
  182. fun, but not required.
  183.  
  184.  
  185. 3.1 Preparing a Partition for Slackware
  186.  
  187. If you plan to install Slackware onto its own hard drive partition
  188. (this offers optimal performance), then you'll need to prepare one or
  189. more partitions for it.
  190.  
  191. NOTE: For information on partitioning UEFI systems, please see the
  192. README_UEFI.TXT file.
  193.  
  194. A partition is a section of a hard drive that has been set aside for
  195. use by an operating system. You can have up to four primary
  196. partitions on a single hard drive. If you need more than that, you
  197. can make what is called an ''extended partition.'' This is actually
  198. a way to make one of the primary partitions contain several
  199. sub-partitions.
  200.  
  201. Usually there won't be any free space on your hard drive. Instead,
  202. you will have already partitioned it for the use of other operating
  203. systems, such as MS-DOS or Windows. Before you can make your Linux
  204. partitions, you'll need to remove one or more of your existing drive
  205. partitions to make room for it. Removing a partition destroys the
  206. data on it, so you'll want to back it up first.
  207.  
  208. If you've got a large partition that you'd like to shrink to make
  209. space for Slackware you might consider using GParted, a partition
  210. editor that allows resizing and moving of existing partitions.
  211. They have a Live CD and USB image that allows running the program
  212. on a minimal OS, as well as versions to boot from PXE or the hard
  213. drive. Bootable images with GParted may be found here:
  214.  
  215. http://gparted.sourceforge.net/index.php
  216.  
  217. There's also the regular version of GNU parted that does the same
  218. thing from the command line. It is included in the installer, and
  219. as a package in the L series.
  220.  
  221. If you plan to repartition your system manually, you'll need to back
  222. up the data on any partitions you plan to change. The usual tool for
  223. deleting/creating partitions is the fdisk program. Most PC operating
  224. systems have a version of this tool, and if you're running DOS or
  225. Windows it's probably best to use the repartitioning tool from that OS.
  226. Usually DOS uses the entire drive. Use DOS fdisk to delete the
  227. partition. Then create a smaller primary DOS partition, leaving
  228. enough space to install Linux. Preferably this should be more than 6GB.
  229. If your machine doesn't have a lot of RAM, you'll want another
  230. partition for swap space. The swap partition should be equal to the
  231. amount of RAM your machine has, but should in any case be at least
  232. 128MB. If you don't have that much drive space to spare, the more the
  233. better to avoid running out of virtual RAM (especially if you plan on
  234. using a graphical desktop). You'll then need to reinstall DOS or
  235. Windows on your new DOS partition, and then restore your backup.
  236.  
  237. We'll go into more detail about partitioning later, and you don't need
  238. to create any new partitions yet -- just make sure you have enough free
  239. space on the drive to do an installation (more than 6GB is ideal), or
  240. that you have some idea about which existing partition you can use for
  241. to install on.
  242.  
  243.  
  244. 3.2 Booting the Slackware CD-ROM
  245.  
  246. If your machine has a bootable CD-ROM drive (you may need to configure
  247. this in the system's BIOS settings) then you'll be able to directly
  248. boot the first CD-ROM. If not, then see the files in the
  249. usb-and-pxe-installers directory for information about alternative
  250. methods of booting the installer. Also, don't neglect to read the
  251. CHANGES_AND_HINTS.TXT file, which is probably the most accurate piece
  252. of documentation to ship with Slackware (thanks Robby!).
  253.  
  254. Now it's time to boot the disc. Put the Slackware installation CD-ROM in
  255. your machine's CD-ROM drive and reboot to load the disc. You'll get an
  256. initial information screen and a prompt (called the "boot:" prompt) at the
  257. bottom of the screen. This is where you'll enter the name of the kernel
  258. that you want to boot with. With most systems you'll want to use the
  259. default kernel, called hugesmp.s. Even on a machine with only a single
  260. one-core processor, it is recommended to use this kernel if your machine
  261. can run it. Otherwise use the huge.s kernel, which should support any
  262. 486 or better.
  263.  
  264. To boot the hugesmp.s kernel, just enter hugesmp.s on the boot prompt:
  265.  
  266. boot: hugesmp.s
  267.  
  268. (actually, since the hugesmp.s kernel is the default, you could have just
  269. hit ENTER and the machine would go ahead and load the hugesmp.s kernel
  270. for you)
  271.  
  272. If you've got some non-standard hardware in your machine (or if hugesmp.s
  273. doesn't work, and you're beginning to suspect you need a different
  274. kernel), then you'll have to try huge.s. If, for some reason, that still
  275. will not boot and you know that your hardware should be supported by the
  276. 3.10.17 kernel, contact volkerdi at slackware dot com and I will see
  277. what I can do.
  278.  
  279.  
  280. These are the kernels shipped in Slackware:
  281.  
  282. hugesmp.s This is the default installation kernel. If possible,
  283. you can save a bit of RAM later (and some ugly warnings at
  284. boot time or when trying to load modules when the driver is
  285. already built-in) by switching to a generic kernel. In this
  286. case that would be gensmp.s, which is a similar kernel but
  287. without filesystems and many of the less common drive
  288. controllers built in. To support these (at the very least
  289. your root filesystem), an initrd (actually an initramfs)
  290. is required when a generic kernel is used. Previous
  291. versions of Slackware used an ext2 filesystem for this, but
  292. now a filesystem-less dynamic kernel-based directory
  293. structure is used. A big advantage of this is that the size
  294. usable by the initrd is only limited by the amount of RAM in
  295. the machine. A disadvantage is that the generic kernels no
  296. longer include *any* filesystems besides romfs, so old
  297. initrd.gz files are not usable (they would have needed new
  298. modules anyway), and it is trickier to get a custom binaries
  299. or modules or whatever into the installer for guru-install
  300. purposes. It's not impossible though -- think tar to/from a
  301. device such as a USB stick, or leveraging ROMFS.
  302.  
  303. gensmp.s The trimmed down, more modular version of hugesmp.s. This
  304. can be switched to, after setting up an initrd and
  305. reinstalling LILO. It is packaged as a .txz, and can be
  306. found on the installed system as:
  307. /boot/vmlinuz-generic-smp-2.6.33.4-smp
  308.  
  309. huge.s This is the 486-compatible single processor version of the
  310. hugesmp.s kernel. Try this if hugesmp.s does not work on
  311. your machine.
  312.  
  313. generic.s The trimmed down, more modular version of huge.s. Found on
  314. the system as:
  315. /boot/vmlinuz-generic-2.6.33.4
  316. This also requires using an initrd.
  317.  
  318. speakup.s This used to be a separate kernel patched with the Speakup
  319. voice synth software, but this is now part of the regular
  320. kernels.
  321.  
  322. For more information about speakup and its drivers check out:
  323. http://www.linux-speakup.org.
  324. To use this, you'll need to specify one of the supported
  325. synthesizers on the kernel's boot prompt:
  326.  
  327. speakup.s speakup.synth=synth
  328.  
  329. where 'synth' is one of the supported speech synthesizers:
  330. acntpc, acntsa, apollo, audptr, bns, decext, decpc,
  331. dectlk, dtlk, dummy, keypc, ltlk, soft, spkout, txprt.
  332.  
  333. A serial port may be specified with an option like this:
  334.  
  335. speakup.s speakup.synth=decext speakup.ser=1
  336.  
  337. Note that speakup serial ports are numbered starting with
  338. one (1, 2, 3) rather than the more typical 0, 1, 2 numbering
  339. usually seen on Linux.
  340.  
  341.  
  342. Note that if you use the huge (non-SMP kernel) and plan to compile any
  343. third party kernel modules, you may need to apply the kernel patch in
  344. /extra/linux-3.10... or, you could just cd to the kernel sources, run
  345. "make menuconfig", make sure that SMP (and the -smp suffix) are turned
  346. off, and recompile the kernel with "make". But, that's for later --
  347. after the install.
  348.  
  349.  
  350. Once you've entered your kernel choice and hit ENTER, the kernel and
  351. install program will load from the DVD or CD-ROM, and you'll arrive at
  352. the Linux login prompt. (You're running Linux now. Congratulations! :-)
  353.  
  354. To log into the system, enter the name of the superuser account and hit
  355. Enter:
  356.  
  357. root
  358.  
  359. Since there is no password on the install CD, you will be logged in right
  360. away.
  361.  
  362.  
  363. 3.3 Using Linux fdisk to create Linux partitions
  364.  
  365. At this point, you should have a large chunk of unpartitioned space on
  366. your hard drive that you'll be making into partitions for Slackware.
  367.  
  368. Now you're ready to create your root Linux partition. To do this, you'll
  369. use the Linux version of fdisk.
  370.  
  371. To need to partition a hard drive, you need to specify the
  372. name of the device when you start fdisk. For example:
  373.  
  374. fdisk /dev/sda (Repartition the first hard drive)
  375. fdisk /dev/sdb (Repartition the second hard drive)
  376.  
  377. NOTE: If you prefer, you may also try a newer menu-driven version
  378. of Linux fdisk called 'cfdisk'. Rumor has it that MOST people do
  379. prefer cfdisk, and "newer" has to be taken in context. cfdisk has
  380. many years of testing behind it.
  381.  
  382. Once you've started fdisk, it will display a command prompt. First look
  383. at your existing partition table with the 'p' command:
  384.  
  385. Command (m for help): p
  386.  
  387. Disk /dev/sda: 40.0 GB, 40020664320 bytes
  388. 255 heads, 63 sectors/track, 4865 cylinders
  389. Units = cylinders of 16065 * 512 = 8225280 bytes
  390.  
  391. Device Boot Start End Blocks Id System
  392. /dev/sda1 * 1 2423 19462716 c W95 FAT32 (LBA)
  393.  
  394.  
  395. Here we can see that there is one DOS partition on the drive already,
  396. starting on the first cylinder and extending to cylinder 2423. Since the
  397. drive has 4865 cylinders, the range 2424 - 4865 is free to accept a Linux
  398. installation.
  399.  
  400. If the FAT32 partition were using the entire drive, you would have no
  401. choice but to delete it entirely (this destroys the partition), or go back
  402. and use some kind of partition resizing tool like GNU parted or Partition
  403. Magic to create some free space for the installation. If you need to
  404. delete a partition, use the 'd' command. You'll be asked which partition
  405. number you want to delete -- check the partition size to make sure it's
  406. the right one.
  407.  
  408. Next, you'll want to use the 'n' command to create a primary partition.
  409. This will be your root Linux partition.
  410.  
  411. Command (m for help): n
  412. Command action
  413. e extended
  414. p primary partition (1-4)
  415.  
  416. You'll want to enter 'p' to make a primary partition.
  417.  
  418. Partition number (1-4): 2
  419.  
  420. Here, you enter "2" since DOS is already using the first primary
  421. partition. Fdisk will first ask you which cylinder the partition should
  422. start on. Fdisk knows where your last partition left off and will suggest
  423. the first available cylinder on the drive as the starting point for the
  424. new partition. Go ahead and accept this value. Then, fdisk will want to
  425. know what size to make the partition. You can specify this in a couple of
  426. ways, either by entering the ending cylinder number directly, or by
  427. entering a size. In this case, we'll enter the last cylinder. Here's what
  428. the screen looks like as these figures are entered:
  429.  
  430. First cylinder (2424-4865): 2424
  431. Last cylinder or +size or +sizeM or +sizeK (2424-4865): 4700
  432.  
  433. You have now created your primary Linux partition with a size of 18.7 GB.
  434. Next, you'll want to make a Linux swap partition. You do this the same
  435. way. First, enter another "n" to make a primary partition:
  436.  
  437. Command (m for help): n
  438. Command action
  439. e extended
  440. p primary partition (1-4)
  441.  
  442. Enter "p" to select a primary partition. Partition 1 is in use by DOS,
  443. and you've already used partition 2 for Linux, so you'll want to enter "3"
  444. for the new partition number:
  445.  
  446. Partition number (1-4): 3
  447.  
  448. Since this is the last partition we plan to make on this hard drive, we'll
  449. use the end cylinder this time. Here are the entries for this:
  450.  
  451. First cylinder (4701-4865): 4701
  452. Last cylinder or +size or +sizeM or +sizeK (4701-4865): 4865
  453.  
  454. Now we need to set the type of partition to 82, used for Linux swap. The
  455. reason we didn't need to set a partition type the last time is that unless
  456. otherwise specified Linux fdisk automatically sets the type of all new
  457. partitions to 83 (Linux). To set the partition type, use the "t" command:
  458.  
  459. Command (m for help): t
  460. Partition number (1-4): 3
  461. Hex code (type L to list codes): 82
  462.  
  463. Now you're ready to save the updated partition table information onto your
  464. hard drive. Use the "p" command again to check the results and be sure
  465. you're satisfied with them:
  466.  
  467. Command (m for help): p
  468.  
  469. Disk /dev/sda: 40.0 GB, 40020664320 bytes
  470. 255 heads, 63 sectors/track, 4865 cylinders
  471. Units = cylinders of 16065 * 512 = 8225280 bytes
  472.  
  473. Device Boot Start End Blocks Id System
  474. /dev/sda1 1 2423 19462716+ c W95 FAT32 (LBA)
  475. /dev/sda2 2424 4700 18720732 83 Linux
  476. /dev/sda3 4701 4865 1317332 82 Linux swap
  477.  
  478. This looks good, so we'll use the "w" command to write the data out to the
  479. drive's partition table. If you want to exit without updating the
  480. partition table (if you've made a mistake), then you can exit without
  481. changing anything by using the "q" command instead.
  482.  
  483. When you exit fdisk using the "w" command, fdisk recommends that you
  484. reboot the machine to be sure that the changes you've made take effect.
  485. Unless you've created extended partitions, you can go ahead and run setup
  486. without rebooting.
  487.  
  488. Note: Sometimes fdisk will give you a message like "This drive has more
  489. than 1024 cylinders" and warn about possible problems using partitions
  490. with DOS. This is because MS-DOS suffers from a limitation that only
  491. allows access to the first 1024 cylinders on a hard drive. At one time,
  492. LILO used the standard BIOS routines to read sectors, so this was a
  493. limitation of LILO, too. Luckily modern versions of LILO use the LBA32
  494. method of accessing sectors, so this limitation no longer applies. If you
  495. see the warning from fdisk, you can safely ignore it.
  496.  
  497.  
  498. 4.0 Installing the Slackware distribution
  499.  
  500. Now that you have one or more Linux partitions, you are now ready to begin
  501. installing software onto your hard drive. To start the Slackware install
  502. program, enter the command "setup" and hit enter:
  503.  
  504. # setup
  505.  
  506. The installer will start up with a full-color menu on your screen with the
  507. various options needed to install Slackware. In general, you'll want to
  508. start with the ADDSWAP option. Even if you've already created and
  509. activated a swap partition manually, you'll need to run this so Slackware
  510. adds the swap partition to your /etc/fstab file. If you don't add it,
  511. your system won't use the swap space when you reboot.
  512.  
  513. Installing a typical system involves running the following options from
  514. the setup menu in this order: ADDSWAP, TARGET, SOURCE, SELECT, INSTALL,
  515. and CONFIGURE. You may also start with KEYMAP if you have a non-US
  516. keyboard layout, or with TARGET if you don't want to use a swap partition.
  517.  
  518. For the rest of this section, we'll walk through a typical installation
  519. process.
  520.  
  521.  
  522. 4.1 The ADDSWAP option:
  523.  
  524. First, we select the ADDSWAP option. The system will scan for partitions
  525. marked as type "Linux swap" and will ask if you want to use them for swap
  526. space. Answer YES, and the system will format the partition and then make
  527. it active for swapping. Once it's finished, setup will display a message
  528. showing the line it will add to /etc/fstab to configure the swap partition
  529. at boot time. Hit enter to continue, and setup will go on to the TARGET
  530. section of the install.
  531.  
  532. NOTE: If you created a partition to use for swap space, but setup
  533. doesn't see it when it scans your drives, it's possible that the partition
  534. type hasn't been set in the partition table. Use the Linux "fdisk"
  535. program to list your partitions like this:
  536.  
  537. # fdisk -l
  538.  
  539. Disk /dev/sda: 40.0 GB, 40020664320 bytes
  540. 255 heads, 63 sectors/track, 4865 cylinders
  541. Units = cylinders of 16065 * 512 = 8225280 bytes
  542.  
  543. Device Boot Start End Blocks Id System
  544. /dev/sda1 1 2423 19462716+ c W95 FAT32 (LBA)
  545. /dev/sda2 2424 4700 18720732 83 Linux
  546. /dev/sda3 4701 4865 1317332 82 Linux
  547.  
  548. In this case, if /dev/sda3 is meant to be a Linux swap partition, you'll
  549. need to start fdisk on drive /dev/sda:
  550.  
  551. # fdisk /dev/sda
  552.  
  553. Command (m for help): t
  554. Partition number (1-4): 3
  555. Hex code (type L to list codes): 82
  556.  
  557. Command (m for help): w
  558.  
  559. This will change the third partition to type 82 (Linux swap) and write the
  560. partition table out to /dev/sda.
  561.  
  562. When you run setup again, the ADDSWAP option should detect the Linux swap
  563. partition.
  564.  
  565.  
  566. 4.2 The TARGET option:
  567.  
  568. The next option on the setup menu is TARGET. This lets you select which
  569. partition(s) you'd like to install Slackware on, and will format them
  570. using a Linux filesystem. Depending on which kernel you chose to boot
  571. with, your filesystem choices may include ext2 (the traditional Linux
  572. filesystem), ext3 (a journaling version of ext2), and Reiserfs (the first
  573. journaling filesystem written for Linux; it stores files in a balanced
  574. tree).
  575.  
  576. When you select the TARGET option, the system will scan for "Linux"
  577. partitions on your hard drives. If it doesn't find any, you'll need to
  578. make sure that you've created partitions using the fdisk program, and that
  579. the partitions are labeled as type 83 (Linux). This is the same process
  580. shown above. If you've created one or more partitions for Slackware using
  581. Linux's fdisk program then you shouldn't have any problems, since Linux
  582. fdisk (and cfdisk) sets all new partitions to type 83 (Linux) by default.
  583.  
  584. You will see a menu listing all the Linux partitions. Use the arrow keys
  585. to select the partition you'd like to use for your root (or primary) Linux
  586. partition and hit enter. The setup program will then ask if you'd like to
  587. format the partition, and what type of filesystem to use. If this is a
  588. new installation of Slackware, you'll need to do this. Otherwise, if you
  589. are installing software onto an existing Linux system, you don't need to
  590. format the partition. For example, the partition might be used as your
  591. /home and contains home directories that you want to keep. If you choose
  592. not to format a partition, you'll see "partition will not be reformatted"
  593. on the top of the screen as you confirm your choice, so that there can be
  594. no question about it.
  595.  
  596. There are a few options you need to know about when you format Linux
  597. partitions. First, you'll need to decide whether or not you'd like to
  598. check the partition for bad blocks when you do the format. This is
  599. usually not necessary unless you know the drive in question has problems.
  600. Checking takes quite a while longer than a normal format (and most IDE
  601. drives do self-checking anyway), so you'll probably want to just go ahead
  602. and use the "Format" menu option to format the drive without checking.
  603. If you have drive problems later on (and can't just replace the hard drive
  604. with a better one), then you might want to go back and try again using the
  605. "Check" option to map out the bad sectors on the drive.
  606.  
  607. You'll notice that the partition you just formatted is now listed as "in
  608. use." If you made some other partitions for Slackware, you'll need to go
  609. through the same process of formatting them, selecting whether or not to
  610. check for bad blocks, and setting a reasonable inode density. With these
  611. partitions there will be an additional step -- you'll need to select where
  612. you'd like to put the partition in your directory tree.
  613.  
  614. MS-DOS/Windows assigns a letter such as A:, B:, C:, etc, to each device.
  615. Unlike DOS, Linux makes your devices visible somewhere under the root
  616. directory (/). You might have /dev/sda1 for your root partition (/) and
  617. put /dev/sda2 somewhere underneath it, such as under your /home directory.
  618. When prompted for a mount location, just enter a directory such as /home,
  619. and hit enter. As you format each additional partition and place it in
  620. the filesystem tree, you'll be returned to the partition selection menu.
  621. When you've prepared all of your Linux partitions, you'll go on to the
  622. SOURCE option.
  623.  
  624.  
  625. 4.3 The SOURCE option:
  626.  
  627. The next menu option is SOURCE, where you select the source from which to
  628. install Slackware.
  629.  
  630. SOURCE displays a menu offering the choice of installation from CD-ROM, a
  631. hard drive partition, NFS, HTTP/FTP, or a directory (mounted manually).
  632. You'll want to make sure your Slackware CD-ROM is in your drive, and
  633. select the first option:
  634.  
  635. "Install from a Slackware CD-ROM"
  636.  
  637. Next, the system will ask you if you'd like to scan for your CD-ROM drive
  638. or pick manually from a list. (unless you're trying to show off to your
  639. friends, go ahead and let setup scan for the CD-ROM drive automatically).
  640. Setup will then try to access the Slackware CD-ROM. If this is
  641. successful, setup will tell you that it found and mounted a CD-ROM on a
  642. Linux device such as /dev/sr0. If the CD-ROM was successful found, you
  643. may skip ahead to the SELECT section below, otherwise read on for some
  644. CD-ROM troubleshooting tips.
  645.  
  646. If setup is not successful in accessing the CD-ROM drive, you'll need to
  647. figure out why before you can go on. The most common reason for this is
  648. that you used a kernel that doesn't support the CD-ROM drive. If that's
  649. the case, you need to restart the installation CD-ROM and specify a kernel
  650. that contains a driver to support your CD-ROM drive (if the drive is
  651. connected to a SCSI card, for example, you'll need to use a kernel with
  652. support for that card). You can also try switching to a different console
  653. with Alt-F2 and mounting the CD-ROM drive manually and then installing
  654. from a pre-mounted directory (if you prefer a hands-on approach).
  655.  
  656. If you have no idea which device an IDE CD-ROM drive is connected to, you
  657. should have the system scan for it. You also can look at the messages
  658. generated by the system as it boots -- you should see a message that
  659. Slackware detected your CD-ROM drive along with information about what
  660. type of drive it is. You can look at these messages by using the right
  661. shift key together with the PageUp and PageDown keys to scroll the screen
  662. up and down.
  663.  
  664. For the network options, you'll need to have a network card that's
  665. supported by one of the installer's modules, and preferably a DHCP server
  666. running to make the network setup easy. The network install options are
  667. to use as your source an NFS server, an FTP server, or an HTTP server
  668. (along with an optional port). If you use DHCP to set up, odds are
  669. you'll have working name resolution and won't need to enter an IP
  670. address to specify the server (but you can if you wish, of course).
  671.  
  672. The network installation feature is intended primarily to facilitate
  673. installing to many machines on a local network. Please don't use it to
  674. bog down the Slackware mirror sites.
  675.  
  676. Thanks to Eric Hameleers for finally bringing FTP/HTTP installtion
  677. support to the Slackware installer. :-)
  678.  
  679.  
  680. 4.4 The SELECT option:
  681.  
  682. The SELECT option lets you select software to install.
  683.  
  684. When you start the SELECT option, you'll see a menu where you can choose
  685. which categories of software you're interested in installing. The first
  686. series (called the A series) contains the base filesystem structure and
  687. binaries that are crucial for your system to boot and run properly. You
  688. must install the A series. Make sure that at least the selection for
  689. series A has an [X] next to it. Most of the other choices will also have
  690. an [X] next to them, and while you can use the cursor keys and the space
  691. bar to unselect items to save space (see the space requirements above for
  692. details), you're better off with a complete installation if you have the
  693. space for it.
  694.  
  695. Once you've selected the general categories of software you wish to
  696. install, hit enter and you'll go on to the INSTALL option.
  697.  
  698.  
  699. 4.5 The INSTALL option:
  700.  
  701. This option actually installs the selected packages to the hard drive.
  702.  
  703. The first question the INSTALL option will ask is what type of prompting
  704. you'd like to use during the installation process. A menu will show
  705. several options, including "full", "newbie", "menu", "expert", "custom",
  706. "tagpath", and "help". The help option gives detailed information on each
  707. of the choices.
  708.  
  709. Most people will want to use "full". Others might want "menu", "expert"
  710. or "newbie" mode. We'll cover each of these in detail now.
  711.  
  712. The first option to consider is "full". If you select this mode, then
  713. setup assumes you want to install all the packages in each selected series
  714. and installs them all without further prompting. This is fast and easy.
  715. Of course, depending on which software categories you've chosen, this can
  716. use a lot of drive space. If you use this option, you should be
  717. installing to a partition with at least 6GB free (and hopefully more like
  718. 20GB or so) to insure that you don't run out of drive space during the
  719. installation process. Because Linux allows you to split your installation
  720. across multiple partitions, the installer cannot know ahead of time
  721. whether the packages you've chosen to install will fit your partitioning
  722. scheme. Therefore, it is up to you to make sure that there is enough
  723. room.
  724.  
  725. The "newbie" mode (which was formerly known as "normal" mode) installs all
  726. of the required packages in each series. For each of the non-required
  727. packages (one by one) you'll get a menu where you can answer YES (install
  728. the package), NO (do not install the package), or SKIP (skip ahead to the
  729. next series). You'll also see a description of what the package does and
  730. how much space it will require to help you decide whether you need it or
  731. not. The "newbie" mode is verbose, requires input after each package, and
  732. is VERY tedious. It certainly takes a lot longer to install using newbie
  733. mode, and (in spite of the name), it is easier to make mistakes in newbie
  734. mode than by simply doing a full installation. Still, using it is a good
  735. way to get a basic education about what software goes into the system
  736. since you actually get a chance to read the package descriptions. With a
  737. full installation most of the package descriptions will fly by too quickly
  738. to read.
  739.  
  740. If you can decide which packages you want from less information, the
  741. "menu" or "expert" options are a good choice, and go much faster than a
  742. "newbie" mode installation. These options display a menu before
  743. installing each series and let you toggle items on or off with the
  744. spacebar. In this Slackware release, the "menu" and "expect" install
  745. modes act the same, and both options are kept only for consistency.
  746. The "expert" mode lets you toggle packages individually, allowing the user
  747. to make good or bad decisions, like turning off crucial packages or
  748. installing a package that's part of a larger set of software without
  749. installing the other parts. If you know exactly what you need, the
  750. "expert" mode offers the maximum amount of flexibility. If you don't
  751. know what you need, using the "full" mode is strongly suggested.
  752.  
  753. The "custom" and "tagpath" options are only used if you've created
  754. "tagfiles" for installation. In the first directory of each disk set is a
  755. file called "tagfile" containing a list of all the packages in that
  756. series, as well as a flag marking whether the package should be installed
  757. automatically, skipped, or the user should be prompted to decide. This is
  758. useful for situations where you need to install large numbers of machines
  759. (such as in a computer lab), but most users will not need to create
  760. tagfiles. If you are interested in using them, look at one of the
  761. tagfiles with an editor.
  762.  
  763. If you're new to Slackware, and you have enough drive space, you'll
  764. probably want to select the "full" option as the easiest way to install.
  765. Otherwise, the "menu" option is another good choice for most beginners.
  766. If you think you need (or would just like to see) the extra information
  767. offered by the "newbie" mode, go ahead and use that. Don't say you
  768. weren't warned about the extra time it requires, though, especially
  769. when installing the fragments that make up modular X. Trust us, you'll
  770. be better off selecting "full".
  771.  
  772. Once you have selected a prompting mode, the system begins the
  773. installation process. If you've chosen "menu" or "expert" mode, you'll
  774. see a menu of software to choose from right away -- use the arrow keys and
  775. spacebar to pick what you need, and then hit enter to install it. If
  776. you've chosen the "newbie" mode, the installation will begin immediately,
  777. continuing until it finds optional packages. You'll get a selection menu
  778. for each of these. If you selected "full", now it's time to sit back and
  779. watch the packages install.
  780.  
  781. If you've selected too much software, it's possible that your hard drive
  782. may run out of space during installation. If this happens, you'll know it
  783. because you'll see error messages on the screen as setup tries to install
  784. the packages. In such a case, your only choice is to reinstall selecting
  785. less software. You can avoid this problem by choosing a reasonable amount
  786. of software to begin with, and installing more software later once your
  787. system is running. Installing software on a running Slackware system is as
  788. easy as it is during the initial installation -- just type the following
  789. command to mount the Slackware CD-ROM:
  790.  
  791. mount /dev/cdrom /mnt/cdrom
  792.  
  793. Then go to the directory with the packages you want to install, and use
  794. the install-packages script:
  795.  
  796. cd /mnt/cdrom/slackware/xap
  797. sh install-packages
  798.  
  799. Other options for installing packages later on include "installpkg" and
  800. "pkgtool". For more information about these, see the man pages ("man
  801. installpkg", "man pkgtool").
  802.  
  803. Once you have installed the software on your system, you'll go on to the
  804. CONFIGURE option.
  805.  
  806.  
  807. 4.6 The CONFIGURE option:
  808.  
  809. The setup's CONFIGURE option does the basic configuration your system
  810. needs, such as setting up your mouse, setting your timezone, and more.
  811.  
  812. The CONFIGURE option will first ensure that you've installed a usable
  813. Linux kernel on your hard drive. The installation program should
  814. automatically install the kernel used to do the initial installation.
  815. If you installed using the speakup.s kernel from CD-ROM, the menu will
  816. prompt you to re-insert your installation disc and hit enter, and then
  817. setup will copy the kernel from the disc to your hard drive.
  818.  
  819. NOTE: If you install a kernel on your system that doesn't boot correctly,
  820. you can still boot your system with the CD-ROM. To do this, you need to
  821. enter some information on the boot prompt. For example, if your root
  822. partition is on /dev/hda1, you'd enter this to boot your system:
  823.  
  824. huge.s root=/dev/hda1 initrd= ro
  825.  
  826. The "initrd=" option tells the kernel not to run the /init script on the
  827. installer image in RAM, and the "ro" option makes the root partition
  828. initially load as read-only so Linux can safely check the filesystem.
  829.  
  830. Once you've installed a kernel, you'll be asked if you want to make a
  831. USB bootstick for your new system. This is a very good idea if you
  832. happen to have a spare USB flash stick that you don't mind having
  833. COMPLETELY ERASED. :-), so if you wish to make one, insert a USB
  834. flash memory stick when prompted and use the "Create" option to create
  835. a USB bootstick for your system.
  836.  
  837. Next you'll be asked what type of mouse you have. Pick the mouse type from
  838. the menu (or hit cancel if you don't have a mouse), and setup will create a
  839. /dev/mouse link. Most computers use a PS/2 mouse, which is the first choice.
  840.  
  841. After this, other installation scripts will run depending on which
  842. packages you've installed. For instance, if you installed the network-*
  843. packages you'll be asked if you want to configure your network.
  844.  
  845.  
  846. 4.7 LILO
  847.  
  848. LILO is the Linux Loader, a program that allows you to boot Linux (and
  849. other operating systems) directly from your hard drive. If you installed
  850. the LILO package, you now have an opportunity to set it up.
  851.  
  852. Installing LILO can be dangerous. If you make a mistake it's possible to
  853. make your hard drive unbootable. If you're new to Linux, it might be a
  854. good idea to skip LILO installation and use the bootdisk to start your
  855. system at first. You can install LILO later using the 'liloconfig'
  856. command after you've had a chance to read the information about it in
  857. /usr/doc/lilo-*. If you do decide to go ahead and install LILO, be sure
  858. you have a way to boot all the operating systems on your machine in case
  859. something goes wrong. If you can't boot Windows again, use the DOS command
  860. "FDISK /MBR" to remove LILO from your master boot record. (You can use
  861. a Windows Startup Disk for this)
  862.  
  863. The easiest way to set your machine up with LILO is to pick the "simple"
  864. choice on the LILO installation menu. This will examine your system and
  865. try to set up LILO to be able to boot Windows (DOS) and Linux partitions
  866. that it finds. If it locates the OS/2 Boot Manager, it will ask if you'd
  867. like to configure the Linux partition so that you can add it to the Boot
  868. Manager menu. (NOTE: If you use a disk overlay program for large IDE hard
  869. drives such as EZ-DRIVE, please see the warning below before installing
  870. LILO)
  871.  
  872. The "expert" option gives you much more control over the configuration
  873. of LILO. If you decide to use the "expert" option, here's how you do
  874. it. LILO uses a configuration file called /etc/lilo.conf to hold the
  875. information about your bootable partitions -- the "expert" LILO
  876. installation lets you direct the construction of this file. To create
  877. the file, first select BEGIN to enter the basic information about
  878. where to install LILO. The first menu will ask if you have extra
  879. parameters you'd like passed to the Linux kernel at boot time. If you
  880. need any extra parameters enter them here.
  881.  
  882. Then you'll be asked if you wish to use the framebuffer console. The
  883. 1024x768x256 console setting is a nice one to use in most cases, but you
  884. may need to experiment to find the nicest setting for your card. Some
  885. look terrible at modes larger than 800x600 because of the default refresh
  886. rates, but at least ATI cards are known to look great at 1024x768x256.
  887. If you want to use the framebuffer console, select a mode here.
  888.  
  889. Next, decide where you want LILO installed. Usually you'll want to
  890. install LILO on the boot drive's MBR (master boot record). If you use a
  891. different boot manager (like the one that comes with OS/2) then you'll
  892. want to install LILO on your root Linux partition and then add that
  893. partition to the boot manager menu using its configuration tool. Under
  894. OS/2, this is the fdisk program.
  895.  
  896. NOTE: If you use the EZ-DRIVE utility (a diskmanager program supplied
  897. with some large IDE drives to make them usable with DOS) then do not
  898. install LILO to the MBR. If you do, you may disable EZ-DRIVE and render
  899. your disk unusable with DOS. Instead, install LILO to the superblock of
  900. your root Linux partition, and use fdisk to make the partition bootable.
  901. (With MS-DOS fdisk, this is called setting the "active" partition)
  902.  
  903. The next menu lets you set a delay before the system boots into the
  904. default operating system. If you're using LILO to boot more than one
  905. operating system (such as DOS and Linux) then you'll need to set a delay
  906. so you can pick which OS you'd like to boot. If you press the SHIFT key
  907. during the delay, LILO will display a prompt where you can type a label
  908. (typically Windows or Linux) to select which OS to boot. If you set the
  909. delay to 'Forever', the system will display a prompt at boot time and wait
  910. for you to enter a choice.
  911.  
  912. Next, you need to add entries for each operating system that LILO can
  913. boot. The first entry you make will be the machine's default operating
  914. system. You can add either a DOS, Linux, or Windows partition first.
  915. For example, let's say you select "Linux". The system will display your
  916. Linux partitions and ask which one of them you'd like to boot. Enter the
  917. name (like /dev/hda1) of your root Linux partition. Then, you'll be
  918. prompted to enter a label. This is the name you will enter at the boot
  919. time LILO prompt to select which partition you want to boot. A good
  920. choice for this is "Linux".
  921.  
  922. Adding a DOS or Windows partition is similar. To add a Windows partition
  923. to the LILO configuration file, select the Windows option. The system will
  924. display your FAT/NTFS partitions and ask which one of them you'd like to
  925. boot with LILO. Enter the name of your primary Windows partition. Then
  926. enter a label for the partition, like "Windows". Once you've added all of
  927. your bootable partitions, install LILO by selecting the "Install" option.
  928.  
  929.  
  930. 4.8 Networking
  931.  
  932. Another configuration menu allows you to configure your machine's
  933. networking setup. First, enter a hostname for your machine. The default
  934. hostname after installation is "darkstar," but you can enter any name you
  935. like. Next, you'll be asked to provide a domain name. If you're running a
  936. stand-alone machine (possibly using a dialup link to an Internet Service
  937. Provider) then you can pick any name you like. The default domain name is
  938. "example.net". If you are going to add the machine to a local network,
  939. you'll need to use the same domain name as the rest of the machines on
  940. your network. If you're not sure what this is, contact your network
  941. administrator for help. Once you've specified the hostname and domain
  942. name, you'll be asked which type of setup you would like: "static IP",
  943. "DHCP", or "loopback".
  944.  
  945. Loopback
  946. --------
  947.  
  948. This is the simplest type of setup, defining only a mechanism for the
  949. machine to contact itself. If you do not have an Ethernet card, use this
  950. selection. This is also the correct selection if you'll be using a PCMCIA
  951. (laptop) Ethernet card and want to set up your networking in
  952. /etc/pcmcia/network.opts. (you could also configure a PCMCIA card using
  953. the "static IP" or "DHCP" options, but in that case will not be able to
  954. "hotplug" the card) Finally, this is the right option to use if you have
  955. a modem, and will be connecting via dialout and PPP. You'll select
  956. loopback now, and then set up your phone connection later using pppsetup
  957. or kppp.
  958.  
  959. Static IP
  960. ---------
  961.  
  962. If your machine has an Ethernet card with a static IP address assigned to
  963. it, you can use this option to set it up. You'll be prompted to enter
  964. your machine's IP address, netmask, the gateway IP address, and the
  965. nameserver IP address. If you don't know what numbers you should be
  966. using, ask the person in charge of the network to help. After entering
  967. your information, you'll be asked if you want to probe for your network
  968. card. This is a good idea, so say yes. Confirm that the settings are
  969. correct, and your networking will be configured to use a static IP
  970. address.
  971.  
  972. DHCP
  973. ----
  974.  
  975. DHCP stands for Dynamic Host Configuration Protocol, and is a system where
  976. your machine contacts a server to obtain its IP and DNS information.
  977. This is the usual way to get an IP address with broadband connections like
  978. cable modems (although some more expensive business-class broadband
  979. connections may assign static IP addresses). It is very easy to set up a
  980. DHCP connection -- just select the option. Some providers will give you a
  981. DHCP hostname (Cox is one that does) that you'll also need to enter in
  982. order to identify yourself to the network. If you don't have a DHCP
  983. hostname, just leave it blank and hit ENTER. After entering your
  984. information, you'll be asked if you want to probe for your network card.
  985. This is a good idea, so say yes. Confirm that the settings are correct,
  986. and your networking will be configured to use DHCP.
  987.  
  988. Once you've completed all the configuration menus, you can exit setup and
  989. reboot your machine. Simply press ctrl-alt-delete and the kernel will
  990. kill any programs that are running, unmount your filesystems, and restart
  991. the machine.
  992.  
  993.  
  994. 5. Booting the installed Slackware system
  995.  
  996. If you've installed LILO, make sure you don't have a disk in your floppy
  997. drive -- when your machine reboots it should start LILO. Otherwise, insert
  998. the bootdisk made for your system during the configuration process and use
  999. it to boot. Also, make sure to remove the CD-ROM to avoid booting it, or
  1000. disable your machine's CD-ROM booting feature in the BIOS settings.
  1001.  
  1002. The kernel will go through the startup process, detecting your hardware,
  1003. checking your partitions and starting various processes. Eventually you'll
  1004. be given a login prompt:
  1005.  
  1006. darkstar login:
  1007.  
  1008. Log into the new system as "root".
  1009.  
  1010. Welcome to Linux 2.6.33.4.
  1011.  
  1012. darkstar login: root
  1013. Last login: Tue May 18 15:36:23 2010 on tty3.
  1014.  
  1015. Linux 2.6.33.4.
  1016. You have new mail.
  1017.  
  1018. darkstar: ~#
  1019.  
  1020.  
  1021. 6. Post-installation configuration
  1022.  
  1023. Once the system is running, most of the work is complete. However, there
  1024. are still a few programs you'll need to configure. We'll cover the most
  1025. important of these in this section.
  1026.  
  1027. 6.1 /etc/rc.d/rc.modules
  1028.  
  1029. This file contains a list of Linux kernel modules. A kernel module is
  1030. like a device driver under DOS. You can think of the /etc/rc.d/rc.modules
  1031. file as similar to DOS's CONFIG.SYS. The file specifies which modules the
  1032. system needs to load to support the machine's hardware. After booting
  1033. your machine, you may find that some of your hardware isn't detected
  1034. (usually an Ethernet card). To provide the support, you'll need to load
  1035. the correct kernel module. Note that modern Linux kernels include a
  1036. feature that allows the kernel to load its own modules, called udev.
  1037. This will load many modules automatically without any need to edit
  1038. rc.modules, and when using udev it might be better to tell it how to
  1039. load the modules you want automatically rather than loading them at boot
  1040. time with rc.modules. This is an advanced topic, and outside the scope of
  1041. this document. If you're interested in this, "man udev" is a good
  1042. place to start reading. In any case, it's best to not edit rc.modules
  1043. unless you find that the modules you want to use are not being loaded
  1044. automatically by udev. You can see a list of the modules that were loaded
  1045. with the "lsmod" command. Likewise, in the majority of cases "alsaconf"
  1046. is not required to configure sound. Rather, the "alsamixer" tool is used
  1047. to unmute the Master and PCM channels and turn up the volume, and the
  1048. "alsactl store" is used to save the sound defaults.
  1049.  
  1050. There's a lot more information out there about kernel modules, including
  1051. lists of module names and the cards they support, as well as extra options
  1052. you can can add to the module lines to configure the hardware in different
  1053. ways. The kernel's documentation in /usr/src/linux/Documentation has a
  1054. lot of good information, as does the information shipped with udev (found
  1055. under /usr/doc/udev-*).
  1056.  
  1057.  
  1058. 6.2 Configuring the X Window System
  1059.  
  1060. Configuring X can be a complex task. The reason for this is the vast
  1061. numbers of video cards available for the PC architecture, most of which
  1062. use different programming interfaces. Luckily, X has come a long way
  1063. since the early days of X386, where monitor modelines had to be tediously
  1064. calculated. With most hardware, X can now be run with NO configuration
  1065. file or additional driver! But you still might want to make a
  1066. configuration file if you'll be using a third party video driver (the
  1067. installer for that may offer to make it for you), or if you just want to
  1068. have greater control over the details of the X configuration.
  1069.  
  1070. To try X without a configuration file, just type "startx" at a command
  1071. line. If you're satisfied with the result, then you're done. If you
  1072. would like X to start automatically at boot, see the /etc/inittab file
  1073. once you've tested "startx" to be sure that X is working.
  1074.  
  1075. If this doesn't work with your card, or if you'd like to take advantage of
  1076. the high-performance features of your video card such as hardware
  1077. acceleration or 3-D hardware rendering, then you'll need to reconfigure X.
  1078.  
  1079. To configure X, you'll need to make an /etc/X11/xorg.conf file. This file
  1080. contains lots of details about your video hardware, mouse, and monitor.
  1081. It's a very complex configuration file, but fortunately there are several
  1082. programs to help create one for you. We'll mention a few of them here:
  1083.  
  1084. Xorg -configure
  1085. ---------------
  1086.  
  1087. Modern versions of X provide a simple way to create an initial xorg.conf
  1088. file that often will work without any additional configuration, or, at the
  1089. very least, provide a good base from which to customize the file. To run
  1090. this command, enter the following in a root terminal:
  1091.  
  1092. # Xorg -configure
  1093.  
  1094. The X server probes for available hardware and creates an initial
  1095. xorg.file located in the /root directory. You can then use this initial
  1096. file to test the configuration by entering the following:
  1097.  
  1098. # Xorg -config /root/xorg.conf.new
  1099.  
  1100. This will load the initial xorg.conf.new file and run the X server. If
  1101. you see the default black and gray checkered background with a mouse
  1102. cursor appear, then the configuration was successful. To exit the X
  1103. server, just press Ctrl+Alt+Backspace simultaneously. Once back at the
  1104. command line, you can copy this xorg.conf.new file to /etc/X11/xorg.conf
  1105. and begin making any manual edits necessary to customize your setup.
  1106.  
  1107. xorgsetup
  1108. ---------
  1109.  
  1110. This is a simple menu driven frontend that's similar in feel to the
  1111. Slackware installer. It simply tells the X server to take a look at the
  1112. card, and then set up the best initial configuration file it can make
  1113. based on the information it gathers. The generated /etc/X11/xorg.conf
  1114. file should be a good starting point for most systems (and should work
  1115. without modification).
  1116.  
  1117.  
  1118. 6.3 Hardware acceleration with X
  1119.  
  1120. If you've used xorgsetup or X -configure to configure for your card, and
  1121. it's one that can take advantage of X's direct rendering support,
  1122. you'll certainly want to enable this. Check your /etc/X11/xorg.conf and
  1123. make sure that the glx module is loaded:
  1124.  
  1125. Load "glx"
  1126.  
  1127. This line will probably already be in place.
  1128.  
  1129.  
  1130. 6.4 User Accounts
  1131.  
  1132. You should make a user account for yourself. Using "root" as your
  1133. everyday account is dangerous, and is considered bad form (at the very
  1134. least) since you can accidentally damage your system if you mistype a
  1135. command. If you're logged in as a normal user, the effects of bad
  1136. commands will be much more limited. Normally you'll only log in as root
  1137. to perform system administration tasks, such as setting or changing the
  1138. root password, installing, configuring, or removing system software, and
  1139. creating or deleting user accounts.
  1140.  
  1141. To make an account for yourself, use the 'adduser' program. To start it,
  1142. type 'adduser' at a prompt and follow the instructions. Going with the
  1143. default selections for user ID, group ID, and shell should be just fine
  1144. for most users. You'll want to add your user to the cdrom, audio, video
  1145. plugdev (plugable devices like USB cameras and flash memory) and scanner
  1146. groups if you have a computer with multimedia peripherals and want to be
  1147. able to access these. Add these group names, comma separated, at the
  1148. following prompt:
  1149.  
  1150. Additional groups (comma separated) []:
  1151.  
  1152.  
  1153. Passwords and security
  1154. ----------------------
  1155.  
  1156. When choosing passwords for a Linux system that is connected to a network
  1157. you should pick a strong password. However, passwords only help protect a
  1158. system from remote trespassing. It's easy to gain access to a system if
  1159. someone has physical access to the console.
  1160.  
  1161. If you forget the root password, you can use the install disc to mount
  1162. your root partition and edit the files containing the password
  1163. information. If you have a bootable optical drive, you can use the first
  1164. installation CD-ROM or the DVD as a rescue disk.
  1165.  
  1166. At the prompt, you can manually mount the root Linux partition from your
  1167. hard drive ("fdisk -l" will give you a list) and remove the root password.
  1168. For example, if your root linux partition is /dev/hda2, here are the
  1169. commands to use after logging into the install disc as "root":
  1170.  
  1171. mount /dev/hda2 /mnt
  1172. cd /mnt/etc
  1173.  
  1174. Next, you'll need to edit the "shadow" file to remove root's password.
  1175. Editors which might be available include "vi", "emacs", "pico", and "nano".
  1176. "vi" and "emacs" might be more of an adventure than you need unless you've
  1177. used them before. The "pico" and "nano" editors are easy for beginners to
  1178. use.
  1179.  
  1180. pico shadow
  1181.  
  1182. At the top of the file, you'll see a line starting with root. Right after
  1183. root, you'll notice the encrypted password information between two colons.
  1184. Here's how root's line in /etc/shadow might look:
  1185.  
  1186. root:EnCl6vi6y2KjU:10266:0:::::
  1187.  
  1188. To remove root's password, you use the editor to erase the scrambled text
  1189. between the two colons, leaving a line that looks like this:
  1190.  
  1191. root::10266:0:::::
  1192.  
  1193. Save the file and reboot the machine, and you'll be able to log in as root
  1194. without a password. The first thing you should do is set a new password
  1195. for root, especially if your machine is connected to a network.
  1196.  
  1197.  
  1198. Here are some pointers on avoiding weak passwords:
  1199.  
  1200. 1. Never use your name (or anyone's name), birthdate, license plate,
  1201. or anything relating to yourself as a password. Someone trying
  1202. to break into your machine might be able to look these things up.
  1203.  
  1204. 2. Don't use a password that is any variation of your login name.
  1205.  
  1206. 3. Do not use words from the dictionary (especially not "password" :)
  1207. or syllables of two different words concatenated together as your
  1208. password. There are automated programs floating around on the net
  1209. that can try them all in a short time.
  1210.  
  1211. 4. Do not use a number (like 123456) or a password shorter than six
  1212. characters.
  1213.  
  1214.  
  1215. The strongest passwords are a mix of letters, numbers, and symbols.
  1216. Here are some examples of strong passwords (but don't use these ;-):
  1217.  
  1218. *^5g!:1? ()lsp@@9 i8#6#1*x ++c$!jke *2zt/mn1
  1219.  
  1220. In practice, any password containing one or two words, a number (or two),
  1221. and a symbol (or two) should be quite secure.
  1222.  
  1223.  
  1224. 7. For more information
  1225.  
  1226. For more information, visit our web site at http://www.slackware.com
  1227.  
  1228. To shop for fine Slackware products (and help keep the project funded),
  1229. please visit http://store.slackware.com. :-)
  1230.  
  1231.  
  1232. Email: info@slackware.com (Information or general inquiries)
  1233. FTP: ftp://ftp.slackware.com (Updates)
  1234. WWW: http://www.slackware.com (News)
  1235. Security issues: security@slackware.com
  1236. General Hotline: volkerdi@slackware.com
  1237.  
  1238.  
  1239. 8. Trademarks
  1240.  
  1241. Slackware is a registered trademark of Slackware Linux, Inc.
  1242. Linux is a registered trademark of Linus Torvalds.
  1243. All trademarks are property of their respective owners.
  1244.  
  1245. http://ftp.slackware.com/pub/slackware/slackware-current/Mozilla/5.0
  1246. http://ftp.slackware.com/
  1247.  
  1248.  
  1249. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1250.  
  1251.  
  1252. Installing Slackware on Logical volumes
  1253. =======================================
  1254.  
  1255.  
  1256. Introduction
  1257. ------------
  1258.  
  1259. For a long time, it has been common for other distros to support
  1260. installation to Logical Volumes. In Slackware, the installer has never
  1261. supported this, but the gurus usually would find a way to create logical
  1262. volumes and install or migrate their Slackware onto those. Having your
  1263. Slackware installed fully on LVM was near impossible until Slackware 12.0.
  1264. Slackware 14.1 has improved support for LVM built into the installer.
  1265.  
  1266.  
  1267. Preparing Logical Volumes (LV)
  1268. ------------------------------
  1269.  
  1270. * Existing LV
  1271. The Slackware installer will recognize and activate any pre-existing
  1272. Logical Volumes on your hard drive(s). These Logical Volumes will be
  1273. selectable targets for the creation of the filesystems (like /, /usr, /home,
  1274. /var)
  1275.  
  1276. * New LV
  1277. When you need to create the LV, you need to do this before starting the
  1278. 'setup' program. You may have to run (c)fdisk first to create the partition
  1279. you want to use for setting up the logical volumes. For any partition you
  1280. create and that you want to use for LVM, you should set the partition type
  1281. to '8e' (Linux LVM).
  1282.  
  1283. In the next example, I will assume we use a single 10 GB partition
  1284. '/dev/sda1' for our Volume Group (VG). With LVM, it is possible to use
  1285. multiple physical volumes (i.e. partitions, whole disks) for a VG, but that is
  1286. left as an exercise for the reader. You can always add extra physical volumes
  1287. to your VG later. We will create a VG called 'myvg' and on that VG create two
  1288. LV's called 'root' and 'home'. The first is going to contain the root partition
  1289. ('/') and the second will become our '/home' partition.
  1290.  
  1291. After booting your computer from the Slackware CD/DVD/USB, and logging in
  1292. as root, you run the following sequence of commands to create the Physical
  1293. Volume (PV), the Volume Group (VG) within that PV and two LV's of size 6GB
  1294. (root) and 3GB (home) inside the VG:
  1295.  
  1296. # pvcreate /dev/sda1
  1297.  
  1298. # vgcreate myvg /dev/sda1
  1299.  
  1300. # lvcreate -L 6G -n root myvg
  1301.  
  1302. # lvcreate -L 3G -n home myvg
  1303.  
  1304. ========================================================================
  1305. NOTE: if you want, you can just allocate all remaining space inside the
  1306. VG to a Logical Volume. Suppose we want to allocate all available
  1307. space to our 'home' LV, then this will the command to use instead
  1308. of the previous one (note the use of '-l' instead of '-L'):
  1309.  
  1310. # lvcreate -l 100%FREE -n home myvg
  1311. ========================================================================
  1312.  
  1313. The device nodes for the logical volumes are created, and the volumes
  1314. will be activated automatically when running lvcreate.
  1315.  
  1316. This is all we need to do before running 'setup'.
  1317.  
  1318.  
  1319. Using LVM during setup
  1320. ----------------------
  1321.  
  1322. In setup, when you choose "TARGET" in the main menu, you will notice that
  1323. the LV's are available in the Linux partition selection. Our two LV's "root"
  1324. and "home" are visible as "/dev/myvg/root" and "/dev/myvg/home". Select the
  1325. first for your root ('/') filesystem, and the other for your /home filesystem.
  1326. Create any filesystem you like on them. My favorite fstype still is ext3,
  1327. but you can choose ext4, xfs or jfs for stability and speed.
  1328.  
  1329. Setup will proceed as usual, but when you get to the point where you are
  1330. presented with the lilo configuration dialog, it is almost time to perform
  1331. one final manual tweak. Proceed with configuring your lilo as usual, and
  1332. select '/dev/myvg/root' as your root filesystem to boot. When you install
  1333. lilo, it will probably not complain, but be aware that having your root
  1334. filesystem on a Logical Volume requires an initial ramdisk (initrd). The
  1335. Slackware installer will not create it for you, and this requires some
  1336. manual intervention after the setup program has finished and you've been
  1337. returned to the command prompt. For now, you can continue with the Slackware
  1338. setup as usual, but at the end, do not reboot just yet!
  1339.  
  1340. At the end of the setup program it will prompt you to select "EXIT" and
  1341. press 'Ctrl-Alt-Del' to reboot the computer. Exit the menu but DO NOT
  1342. reboot just yet! At this point, we are going to create our initrd image.
  1343. Fortunately, the Slackware installer has done some of the work for us.
  1344. It will have created the LVM device nodes which lilo needs in order to
  1345. install successfully. The installer will have mounted the /sys and /proc
  1346. filesystems as well. Inside a 'chroot' we will create an initrd image
  1347. and configure lilo to use it with the generic kernel. Be aware that
  1348. Slackware's 'huge' kernels are too big to work with an initrd image using
  1349. the lilo bootloader. Lilo will complain that there is too little space
  1350. left in the 15M-16M 'memory hole'.
  1351. We are going to 'chroot' into our fresh installation:
  1352.  
  1353. # chroot /mnt
  1354.  
  1355. Next, while we are in the chroot, create the initrd with LVM support -
  1356. in the example command line I assume that the root filesystem is 'ext3',
  1357. we used the LV '/dev/myvg/root' as the root device, and are running the
  1358. Slackware 14.1 default SMP kernel '3.10.17-smp':
  1359.  
  1360. # mkinitrd -c -k 3.10.17-smp -m ext3 -f ext3 -r /dev/myvg/root -L
  1361.  
  1362. The resulting initrd image will be written to the file '/boot/initrd.gz'
  1363. by default. We still need to tell lilo about this initrd, so open the
  1364. configuration file '/etc/lilo.conf' in an editor such as vi or pico - it
  1365. should already have been generated by the 'liloconfig' part of setup. Look
  1366. for the "Linux bootable partition config" and add a line for the initrd.
  1367. Additionally, we change the filename of the kernel to be used. The default
  1368. filename added by 'liloconfig' is '/boot/vmlinuz' which is a symbolic link to
  1369. the huge SMP kernel. Remember that we need a 'generic' kernel with the initrd.
  1370. The end result should look somewhat like this:
  1371.  
  1372. image = /boot/vmlinuz-generic-smp-3.10.17-smp
  1373. initrd = /boot/initrd.gz
  1374. root = /dev/myvg/root
  1375. label = linux
  1376. read-only
  1377.  
  1378. Double-check that the label you are using ('linux' in the above example)
  1379. is unique in the /etc/lilo.conf file. If you are satisfied that everything
  1380. looks OK, write the changes, exit the editor and (re-) run lilo while in
  1381. the chroot. Lilo will issue a couple of warnings concerning a difference in
  1382. what /proc/partitions reports and what lilo thinks are available partitions,
  1383. but it is safe to ignore these.
  1384.  
  1385. =====================================================================
  1386. An alternative method of creating the commandline for mkinitrd is
  1387. to use the '/usr/share/mkinitrd/mkinitrd_command_generator.sh' script
  1388. which is part of the mkinitrd package. This script will analyze your
  1389. Slackware installation and show you a useable 'mkinitrd' commandline:
  1390.  
  1391. # /usr/share/mkinitrd/mkinitrd_command_generator.sh -r
  1392.  
  1393. The above command would emit a commandline (almost) exactly as I
  1394. showed earlier in this README. If you are satisfied that it is the
  1395. correct command for you, then there is no need to type it manually;
  1396. just enclose the above line in "$()" which will actually run the command
  1397. and create your initrd:
  1398.  
  1399. # $( /usr/share/mkinitrd/mkinitrd_command_generator.sh -r )
  1400.  
  1401. All that is left then is to update /etc/lilo.conf and run 'lilo'.
  1402. =====================================================================
  1403.  
  1404. You're done in the chroot now. Exit the chroot by running the command
  1405. 'exit' and return the original console prompt (not that this looks any
  1406. different from the prompt inside the 'chroot' environment!).
  1407.  
  1408. This completes the installation of Slackware. Good luck with your fresh
  1409. 'Slackware with a root filesystem-on-LVM' !
  1410.  
  1411.  
  1412. A word about using a Logical Volume for SWAP
  1413. --------------------------------------------
  1414.  
  1415. The setup program is able to detect a Logical Volume and use it as a swap
  1416. partition, on the condition that you have manually formatted the LV as
  1417. swap before you start 'setup'. That way, you will be able to select it as a
  1418. usable swap partition in the ADDSWAP section. The setup program will inspect
  1419. all your logical volumes for a swap header. Here is how you create the LV,
  1420. assuming you already created the Volume Group 'myvg' earlier - see above -
  1421. and left enough unallocated space in that VG:
  1422.  
  1423. # lvcreate -L 1G -n swap myvg
  1424.  
  1425. This command creates a 1 GB large Logical Volume called 'swap' (but any
  1426. name will do) in the 'myvg' Volume Group. Next, format the volume for
  1427. use as swap partition:
  1428.  
  1429. # mkswap /dev/myvg/swap
  1430.  
  1431. This is enough to get it recognized by the setup program. Have fun!
  1432.  
  1433.  
  1434. ========================================================
  1435. Author:
  1436. Eric Hameleers <alien@slackware.com> 13-oct-2013
  1437. Wiki URLs:
  1438. http://www.slackware.com/~alien/dokuwiki/doku.php?id=slackware:setup
  1439. Documentation:
  1440. /usr/doc/Linux-HOWTOs/LVM-HOWTO
  1441.  
  1442. http://ftp.slackware.com/pub/slackware/slackware-current/Mozilla/5.0
  1443. http://ftp.slackware.com/
  1444.  
  1445.  
  1446. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1447.  
  1448.  
  1449. Installing Slackware on encrypted volumes
  1450. =========================================
  1451.  
  1452.  
  1453. Contents:
  1454.  
  1455. * Introduction
  1456. * Using cryptsetup during Slackware installation
  1457. * Encrypting your '/home' partition
  1458. * Encrypted swap
  1459. * Encrypted root filesystem
  1460. * Combining LUKS and LVM
  1461. * Hibernation (suspend-to-disk)
  1462. * Additional passphrases, keyfiles
  1463. * A note on custom kernels
  1464. * USB keyboards and LUKS
  1465. * A mkinitrd helper script
  1466.  
  1467.  
  1468. Introduction
  1469. ------------
  1470.  
  1471. Increasingly common in modern Linux distributions is the ability to
  1472. install onto an encrypted partition (or drive, or volume). Especially for
  1473. people with a laptop who are traveling a lot, it adds a lot to the security
  1474. of your data if access to that data is denied to the potential thief of
  1475. your computer.
  1476.  
  1477. Starting with release 12.0, Slackware has support for LVM built into the
  1478. installer. With a little more effort, the installer offers the opportunity to
  1479. use transparent encryption on the partitions/volumes/disks where you install
  1480. Slackware. You can combine the use of LVM and encryption to minimize the
  1481. number of times you need to enter an unlock passphrase. If you want to know
  1482. more about setting up and using LVM during the installation, read the file
  1483. 'README_LVM.TXT'.
  1484.  
  1485. Slackware uses device-mapper and cryptsetup to achieve transparent
  1486. encryption of your data partitions and your swap. Cryptsetup uses a
  1487. concept called LUKS (Linux Unified Key Setup) which enables you to change
  1488. your unlock password for the encrypted volume without having to re-encrypt
  1489. all of your data. You can even assign multiple passphrases to an encrypted
  1490. volume, so that other people besides you are able to unlock the encryption
  1491. without the need to know _your_ passphrase.
  1492.  
  1493. When preparing a partition for transparent encryption with cryptsetup,
  1494. the program will ask you for a password. This password is used to encrypt
  1495. another randomly generated password and this particular password is used
  1496. to actually encrypt the data inside the mapped volume. Cryptsetup will
  1497. create a mapped device and make this block device available under the
  1498. '/dev/mapper' directory. Any data read from or written to this mapped device
  1499. will automatically be decrypted from / encrypted to the actual partition.
  1500.  
  1501. A big NOTE finally. When you encrypt your root filesystem, you will have
  1502. to make sure that there will be at least one (small) partition which is
  1503. left unencrypted. This partition must contain the kernel(s) you want to boot
  1504. from, and the initrd image that is needed with encrypted volumes. You need
  1505. to install LILO either to the MBR - or if that is not possible, into the
  1506. root sector of this small unencrypted partition. You will probably guess
  1507. why we can not use an encrypted partition for this...
  1508.  
  1509.  
  1510. Using cryptsetup during Slackware installation
  1511. ----------------------------------------------
  1512.  
  1513. We are going to enable encryption on some or all of our partitions or
  1514. volumes before installing Slackware onto them. The first section to follow
  1515. deals with encrypting a single partition which is not the root partition.
  1516. Typically, people have a need to encrypt their home directories and that is
  1517. where that section will focus on. Next is a section on encrypting your
  1518. swap partition in addition to your /home partition. The swap partition
  1519. contains valuable information for a data thief, even after you power off
  1520. your computer. By encrypting the swap partition we deny the potential thief
  1521. access to this data. The section following that will show you how to get
  1522. a fully encrypted system, by encrypting the root ('/') filesystem as well.
  1523. This is a little harder to do, but probably worth the effort.
  1524.  
  1525. To make it more interesting, _and_ easier to use, we will devote a final
  1526. section to using a combination of LVM and disk encryption. As an example,
  1527. we will create a single big encrypted partition, and inside that encrypted
  1528. 'container' we create several Logical Volumes which we will use as our root
  1529. (/), /home and swap partitions. The advantages of this approach are, that you
  1530. will need only a single passphrase to unlock your computer, and you will not
  1531. have to maintain an '/etc/crypttab' file containing information about encrypted
  1532. volumes that need to be unlocked during boot-up. Additionally, we will be
  1533. rewarded with a swap partition that we can use for suspend-to-disk and that
  1534. will remain encrypted after shutdown (so that for instance a potential data
  1535. thief will not be able to get to your valuable data even if you hibernated
  1536. your laptop).
  1537.  
  1538. If you choose this last option to get a fully encrypted Slackware, it is
  1539. advisable to read the 'README_LVM.TXT' file to make yourself more familiar
  1540. with the process of creating and using Logical Volumes during installation
  1541. of Slackware. And then, skip right through to the section of this document
  1542. called "Combining LUKS and LVM".
  1543.  
  1544.  
  1545. Encrypting your '/home' partition
  1546. ---------------------------------
  1547.  
  1548. After the computer boots up from the install CD/DVD (or USB flash disk,
  1549. or PXE) and you find yourself at the '#' prompt, the first thing to do is
  1550. use 'fdisk' or 'cfdisk' to create any partitions you need for your Slackware.
  1551. Next, use 'cryptsetup' to prepare the partitions you intend to be
  1552. encrypted. Note: this section of the README concerns itself with setting
  1553. up encrypted *data* partitions. If you want to know how to configure an
  1554. encrypted *swap* partition, skip to the section called "Encrypted swap".
  1555.  
  1556. Suppose, you want to encrypt the partition called '/dev/sdx2' and use it
  1557. as your '/home' filesystem. (Please replace '/dev/sdx2' with the name of YOUR
  1558. PARTITION in the next series of examples). Several of the commands shown below
  1559. will irrevocably destroy any data that you currently have on the partition. It
  1560. is a good idea to double check the output from 'fdisk -l' before you start.
  1561.  
  1562. * To begin with, we are going to fill the partition with random data. This
  1563. will make it a lot harder for any forensics expert to determine where your
  1564. encrypted data resides on that partition after we're finished installing
  1565. Slackware onto it. The process will take a long time - depending on the
  1566. size of your partition it may take hours or more. if you're not _too_
  1567. concerned with the possibility of an FBI agent confiscating your computer,
  1568. you can skip this command:
  1569.  
  1570. # dd if=/dev/urandom of=/dev/sdx2
  1571.  
  1572. * Prepare the partition for encryption. You will be asked twice to enter
  1573. a passphrase. Note that a passphrase is not limited to a single word. The
  1574. passphrase may contain spaces. We will use a key size of 256 bits. The
  1575. default cipher is 'aes', with mode 'cbc-essiv:sha256' which is safe enough.
  1576.  
  1577. # cryptsetup -s 256 -y luksFormat /dev/sdx2
  1578.  
  1579. You can dump information about the encrypted partition to your console by
  1580. running the following command:
  1581.  
  1582. # cryptsetup luksDump /dev/sdx2
  1583.  
  1584. * Now we will 'open' the encrypted partition and let the devicemapper create
  1585. a mapped block device. We will use the mapped device which behaves just like
  1586. an ordinary disk partition when we get to the TARGET selection in 'setup'. The
  1587. mapped device nodes will be created in the directory '/dev/mapper'. The command
  1588. will ask you for the passphrase which you entered during the "luksFormat"
  1589. operation. The last argument that the command takes is the name of the mapped
  1590. device. We will call our mapped device 'crypthome' (any name will do). It
  1591. will be available for use as the block device '/dev/mapper/crypthome'.
  1592.  
  1593. # cryptsetup luksOpen /dev/sdx2 crypthome
  1594.  
  1595. * We've now finished our preparations, and it is time to start the 'setup'
  1596. program and install Slackware. This setup does not differ at all from the
  1597. setup you have become used to. The only notable difference lies in the
  1598. names of the devices you will select for your target partitions. Be sure
  1599. to read until the end of the story though, because we will have to do some
  1600. postprocessing in order to make your encrypted partitions available after
  1601. reboot (setup can not yet do all of this automatically).
  1602.  
  1603. * In setup, under "ADDSWAP", proceed as usual and configure a normal
  1604. unencrypted swap partition, even if you want to have your swap encrypted.
  1605. We will take care of swap encryption after the installation of Slackware
  1606. finishes.
  1607.  
  1608. * In setup, when you choose "TARGET" in the main menu, you will notice that
  1609. the mapped device is available in the 'Linux partition' selection as
  1610. "/dev/mapper/crypthome". Select the partition you designated for your
  1611. root ('/') filesystem, and next select "/dev/mapper/crypthome" for your
  1612. '/home' filesystem. Create any filesystem you like on them. My favorite
  1613. fstype still is ext3, but you can choose xfs or jfs for stability and speed.
  1614.  
  1615. NOTE: The underlying partition will *also* be visible in the target selection
  1616. menu. Be very careful NOT to select this device ('/dev/sdx2' in our
  1617. example) for any other filesystem you wish to create, or you will
  1618. destroy the data on the encrypted partition.
  1619.  
  1620. * At the end of the Slackware installation when you select "Exit", don't
  1621. reboot just yet! We are going to create a configuration file for
  1622. the cryptsetup program, called '/etc/crypttab'. This file contains the
  1623. information cryptsetup needs for unlocking your encrypted volume and mapping
  1624. it to the correct device name. The file '/etc/crypttab' contains lines of the
  1625. format: "mappedname devicename password options". Since we are still inside
  1626. the installer, the root filesystem of our fresh Slackware installation is
  1627. still mounted under '/mnt'. For our example where we encrypted '/dev/sdx2'
  1628. and mapped the unlocked device to '/dev/mapper/crypthome', we need this
  1629. single line in '/etc/crypttab':
  1630.  
  1631. crypthome /dev/sdx2
  1632.  
  1633. So, we need to run the command:
  1634.  
  1635. # echo "crypthome /dev/sdx2" > /mnt/etc/crypttab
  1636.  
  1637. in order to create the file with the required content (I am assuming here
  1638. that the file did not yet exist... the above command will overwrite the
  1639. data in the file should it have existed). You can of course also just
  1640. start the 'vi' editor and add the above line. When the password is not
  1641. listed in the crypttab file (potentially very unsafe of course) cryptsetup
  1642. will ask you for the password when your computer boots.
  1643.  
  1644.  
  1645. Encrypted swap
  1646. --------------
  1647.  
  1648. In the previous chapter we have installed Slackware using an encrypted
  1649. /home partition, but left the swap partition unencrypted. We are going
  1650. to take care of that 'omission' right now, because we do not want to give
  1651. a potential data thief access to any sensitive data which landed on your
  1652. disk because of the kernel's memory swapping process.
  1653.  
  1654. It really is very simple and straight-forward. It is also independent of
  1655. whether or not you are using encryption for any other (data) partition.
  1656. Add the following line to the 'crypttab' file on your fresh installation
  1657. of Slackware - for the sake of this example I am assuming that the swap
  1658. partition you chose is '/dev/sdx3':
  1659.  
  1660. cryptswap /dev/sdx3 none swap
  1661.  
  1662. You can use the 'vi' editor to add this line to '/mnt/etc/crypttab'.
  1663. You can also choose to run the following command which adds that line to
  1664. the end of the file:
  1665.  
  1666. # echo "cryptswap /dev/sdx3 none swap" >> /mnt/etc/crypttab
  1667.  
  1668. We need to edit the 'fstab' file of your Slackware installation so that
  1669. the correct device will be used for the swap after your computer reboots
  1670. (the device '/dev/sdx3' will no longer be useful, but '/dev/mapper/cryptswap
  1671. will'). The line in '/mnt/etc/fstab' for your swap will look like this at
  1672. first:
  1673.  
  1674. /dev/sdx3 swap swap defaults 0 0
  1675.  
  1676. and you will have to change it so that it becomes like this:
  1677.  
  1678. /dev/mapper/cryptswap swap swap defaults 0 0
  1679.  
  1680. These two edits are sufficient. The above instructions assume that you
  1681. edited the 'crypttab' file at the end of a Slackware installation, but in
  1682. fact you can do this at any time. The Slackware boot-up process will
  1683. take care of the rest. At shutdown of your Slackware, the encrypted swap
  1684. partition will be reformatted as a normal unencrypted swap, so that any
  1685. other OS-es you might be running in a multi-boot configuration will have
  1686. no problems in using this swap partition as well.
  1687.  
  1688. NOTE: the swap partition is encrypted with a new randomly generated key every
  1689. time your computer boots.
  1690. There is no need to ever enter a passphrase!
  1691.  
  1692. NOTE: having an encrypted swap like this causes a re-format of the swap
  1693. partition on avery boot-up and shutdown. This is perfectly OK as long
  1694. as you do not change the order of your hard disks. If you add a disk,
  1695. or move this disk to another computer, the device name may change (for
  1696. instance from sda to sdb) and if you forget to modify '/etc/crypttab'
  1697. your system may end up formatting the wrong partition!
  1698. For this reason alone, it is recommended that you implement disk
  1699. encryption including swap using the "Combining LUKS and LVM" method
  1700. described in the chapter with the same name!
  1701.  
  1702.  
  1703. Encrypted root filesystem
  1704. -------------------------
  1705.  
  1706. You can go one step further than merely encrypting your '/home'
  1707. filesystem's partition. You can choose to encrypt _all_ of your Slackware
  1708. partitions, including the root partition. In that case you will have to
  1709. perform some additional post-install configuration before you reboot your
  1710. Slackware box.
  1711.  
  1712. NOTE: the method described here will result in having several independently
  1713. encrypted partitions. This may require you to enter multiple
  1714. passphrases in order to unlock all of these partitions. If you want to
  1715. unlock your complete system using a single passphrase, and if you do
  1716. not shy back from using LVM, then the better alternative is to follow
  1717. the instructions in the "Combining LUKS and LVM" chapter which follows
  1718. next. If you think that LVM adds one layer of complexity too much,
  1719. then just read on and implement the solution described right here.
  1720.  
  1721. * Be sure to create a small partition which you leave *unencrypted*. Tell
  1722. the installer to mount it under '/boot'. The kernel and the initrd (with
  1723. the cryptsetup and additional required kernel modules) will go there. We are
  1724. going to assume that Slackware is the only OS on the computer so that you
  1725. can tell lilo to install the bootloader in the MBR (which is the default
  1726. option). Lilo is able to boot a Windows if you already had that installed on
  1727. your computer, so even in the dual-boot situation it should be safe to use
  1728. the MBR. With other Linux distributions already present on the computer,
  1729. things may be a little more difficult - you will have to install lilo to
  1730. the /boot partition then.
  1731.  
  1732. * Perform a Slackware install just like I described above, creating
  1733. additional encrypted partitions and mapping them to appropriate names -
  1734. for this example I assume that you map the encrypted root partition
  1735. '/dev/sdx1' to 'cryptroot'. When the LILO configuration pops up, tell lilo
  1736. that your root partition is '/dev/mapper/cryptroot'. Lilo will try to
  1737. install and fail, and will tell you so. It will however have written a
  1738. 'lilo.conf' file which we can edit in a follow-up action. Proceed with
  1739. the installation and at the end, exit the setup program but do _not_
  1740. reboot just yet.
  1741.  
  1742. * After you are returned to the command prompt, perform a 'chroot' into the
  1743. new installation. All the filesystems are still mounted, and the Slackware
  1744. installer will already have mounted the /sys and /proc filesystems for use
  1745. in the 'chroot'. We only need to run the following command:
  1746.  
  1747. # chroot /mnt
  1748.  
  1749. * Next, now that we are in the chroot, create the initrd with LVM (if you
  1750. used Logical Volumes) and CRYPT support - or else your Slackware computer
  1751. will not be able to proceed past the initial stage of booting the kernel.
  1752. The initial ramdisk (initrd) contains a small filesystem with the tools
  1753. needed to unlock the root filesystem, so that the kernel can start the init
  1754. program. In the example command line below which creates the 'initrd.gz'
  1755. image I assume that the root filesystem is 'ext3', we used the mapped device
  1756. 'cryptroot' for the root filesystem on the real partition '/dev/sdx1',
  1757. and are running the Slackware 14.1 default SMP kernel '3.14.10-smp'
  1758. and we did not use Logical Volumes (more about that in the next section):
  1759.  
  1760. # mkinitrd -c -k 3.14.10-smp -m ext3 -f ext3 -r cryptroot -C /dev/sdx1
  1761.  
  1762. * The resulting initrd image will be written to the file '/boot/initrd.gz'
  1763. by default. We still need to tell lilo about this initrd. Open the
  1764. configuration file '/etc/lilo.conf' in an editor such as vi or pico -
  1765. it should already have been generated by the 'liloconfig' part of setup.
  1766. Look for the "Linux bootable partition config" and add a line for the initrd.
  1767. We also need to change the kernel file to a generic kernel, because lilo
  1768. is unable to combine the 'huge' kernels in Slackware 14.0 with an initrd
  1769. image - it will complain about "The initial RAM disk is too big to fit
  1770. between the kernel and the 15M-16M memory hole" if you try with a 'huge'
  1771. kernel. We can live with that, since the 'huge' kernels are not meant
  1772. for day-to-day use anyway. They are meant to install Slackware on a wide
  1773. range of computers and that is why they are 'huge'. The linux part of
  1774. '/etc/lilo.conf' should end up looking somewhat like this:
  1775.  
  1776. image = /boot/vmlinuz-generic-smp-3.14.10-smp
  1777. initrd = /boot/initrd.gz
  1778. root = /dev/mapper/cryptroot
  1779. label = linux
  1780. read-only
  1781.  
  1782. If you add the above section as an extra instead of editing what's already
  1783. present, make sure that the label you use ('linux' in the example above)
  1784. is unique in the configuration file.
  1785.  
  1786. * If you have another OS on your computer and can not install lilo to the
  1787. MBR, you will have selected "Install to superblock (Root)" instead. In
  1788. that case, we have one additional change to make, and that is almost at the
  1789. top of the file. Look up the line that says "boot = /dev/mapper/cryptroot"
  1790. which is the device for your root partition and which was the reason for
  1791. lilo failing to install. Change the boot device to the name of the small
  1792. *unencrypted* partition you've created at the beginning and which is
  1793. mounted under '/boot'. Assuming the name of that partition is '/dev/sdx4',
  1794. the "boot =" line must become like this:
  1795.  
  1796. boot = /dev/sdx4
  1797.  
  1798. We are done. Write the changes, exit the editor and run the command 'lilo'.
  1799. Lilo will issue a couple of warnings concerning a difference in what
  1800. '/proc/partitions' reports and what lilo thinks are the available partitions,
  1801. but it is safe to ignore these.
  1802. Reboot now, and you will be presented with a "Enter passphrase: "
  1803. prompt. After entering the passphrase which unlocks your root filesystem,
  1804. the system will boot into Slackware. If there are other encrypted partitions,
  1805. you will be prompted for their respective passphrases, too.
  1806.  
  1807.  
  1808. Combining LUKS and LVM
  1809. ----------------------
  1810.  
  1811. Until now, we have been occupying ourselves with encrypting separate
  1812. partitions. This is all fully functional, but there are a few drawbacks.
  1813. One, you will need to enter a passphrase for every partition you have encrypted
  1814. (except for the swap which Slackware encrypts with a random passphrase
  1815. on every boot). Two, the method used for encrypting the swap partition
  1816. prohibits the use of the swap as a hibernation partition. And since the
  1817. initrd of Slackware 14.0 supports hibernation, it would be a shame not to be
  1818. able to use this feature on your laptop (which, because of it's portability,
  1819. is the primary target for full disk encryption anyway).
  1820.  
  1821. This section of the README_CRYPT.TXT will deal with these drawbacks and
  1822. offer you full disk encryption (including swap) that needs only a single
  1823. passphrase to unlock and allows for hibernation (suspend-to-disk).
  1824.  
  1825. We are assuming that Slackware will be the only Operating System on your
  1826. computer. In case you already have an OS installed (such as MS Windows), the
  1827. procedure may be a little different because you can not always install lilo to
  1828. the MBR. After booting from the Slackware installation medium, we will
  1829. create a small unencrypted partition that will contain the Linux kernels and
  1830. the initrd image(s). The rest of the disk's free space will be dedicated to
  1831. a single partition which we are going to encrypt. On top of the encrypted
  1832. volume, we are going to create several Logical Volumes, and these LV's
  1833. are going to be formatted as our Slackware partitions ('/', '/home' and
  1834. 'swap'). These are the steps in more detail:
  1835.  
  1836. * Use (c)fdisk to create your partitions. For the sake of this example, I
  1837. am going to assume that /dev/sdx1 is a 100 MB large partition and /dev/sdx2
  1838. is the large partition that eats up the remainder of your disk's free space.
  1839.  
  1840. * First, create a LUKS-encrypted volume on top of /dev/sdx2 after you
  1841. have optionally filled the partition with random data (read the section
  1842. "Encrypting your '/home' partition" for more information about why you
  1843. would want to fill your partition with random data first):
  1844.  
  1845. # dd if=/dev/urandom of=/dev/sdx2
  1846.  
  1847. * Prepare the partition for encryption. You will be asked twice to enter
  1848. a passphrase. Note that a passphrase is not limited to a single word. The
  1849. passphrase may contain spaces. We will use a key size of 256 bits. The
  1850. default cipher is 'aes', with mode 'cbc-essiv:sha256' which is safe enough.
  1851.  
  1852. # cryptsetup -s 256 -y luksFormat /dev/sdx2
  1853.  
  1854. * Open the encrypted partition so that we can start using the mapped device
  1855. which exposes the partition as an unencrypted block device. The command
  1856. will ask you for the passphrase which you entered during the "luksFormat"
  1857. operation. The last argument that the command takes is the name of the mapped
  1858. device. We will call our mapped device 'slackluks' because I am not feeling
  1859. original today. The mapped device which we will be using for unencrypted
  1860. operations will therefore be '/dev/mapper/slackluks'.
  1861.  
  1862. # cryptsetup luksOpen /dev/sdx2 slackluks
  1863.  
  1864. * The LVM part is next. Create a Physical Volume (PV) on device
  1865. '/dev/mapper/slackluks', a Volume Group (VG) called 'cryptvg' - any name will
  1866. do - on the PV, and three Logical Volumes (LV's) in the VG, one for your
  1867. root partition (7 GB in size), one for the /home partition (10 GB in size)
  1868. and a third which we will use for swap (1 GB in size). You will probably
  1869. use different sizes depending on your environment and wishes, but keep the
  1870. sum of the LV sizes less than the total size of the Physical Volume:
  1871.  
  1872. # pvcreate /dev/mapper/slackluks
  1873.  
  1874. # vgcreate cryptvg /dev/mapper/slackluks
  1875.  
  1876. # lvcreate -L 7G -n root cryptvg
  1877.  
  1878. # lvcreate -L 10G -n home cryptvg
  1879.  
  1880. # lvcreate -L 1G -n swap cryptvg
  1881.  
  1882. * Run 'mkswap' so that the 'setup' program will identify the 'swap'
  1883. LV as a valid swap partition:
  1884.  
  1885. # mkswap /dev/cryptvg/swap
  1886.  
  1887. * With the system properly prepared, you can launch 'setup'. The 'setup'
  1888. program will identify the LV swap volume and activate it. When appointing
  1889. the partitions to use for your filesystems, select '/dev/cryptvg/root' for the
  1890. root partition, next select '/dev/cryptvg/home' to be used for your /home .
  1891. And lastly, assign the partition /dev/sdx1 to a /boot filesystem. This
  1892. '/boot' filesystem will be the only unencrypted part of your computer.
  1893.  
  1894. You will notice that there are several more devices to select from but
  1895. *don't* touch these! The devices such as /dev/mapper/* are the underlying
  1896. device names for the encrypted and LVM volumes. If you choose to touch any
  1897. of these, you will destroy the data on the /dev/cryptvg/* volumes which you
  1898. are using.
  1899. After partitioning, we end up with a filesystem configuration like this:
  1900.  
  1901. /dev/cryptvg/root /
  1902. /dev/cryptvg/home /home
  1903. /dev/sdx1 /boot
  1904.  
  1905. * When installation of the packages has finished, the system configuration will
  1906. start, and one of the dialogs will be for 'liloconfig'. The assumption is that
  1907. you are installing Slackware as the only OS on your computer. This means that
  1908. you must install lilo to the MBR. Even if you have another OS like MS Windows
  1909. installed already, Slackware's lilo bootloader will be able to boot Windows
  1910. if you install lilo to the MBR. Choose "expert lilo configuration" with the
  1911. option "Install to Master Boot Record (MBR)". Select '/dev/cryptvg/root' as
  1912. the root partition to boot. Add any Windows partition to lilo if you want to
  1913. dual-boot Windows. Finally, when liloconfig installs the bootloader, you may
  1914. see an error message stating that the "installation failed". Ignore this,
  1915. because we will have to add an initrd to '/etc/lilo.conf' anyway and re-run
  1916. lilo. We will do this after the Slackware installation has come to it's end.
  1917.  
  1918. * Let the installation complete, and after you select "EXIT" you will be
  1919. returned to the command prompt. DO NOT reboot just yet! This is the moment
  1920. where we fix our bootloader. To do so, we will 'chroot' (change root) into
  1921. our freshly installed Slackware filesystem. The setup program has done all
  1922. the preparations already, such as re-mounting /sys and /proc below /mnt and
  1923. generating LVM device nodes in /mnt . Enter the 'chroot' using the command:
  1924.  
  1925. # chroot /mnt
  1926.  
  1927. * In the chroot, you create an initrd image with LVM and CRYPT support -
  1928. or else your Slackware computer will not be able to proceed past the initial
  1929. stage of booting the kernel. The initial ramdisk (initrd) contains a small
  1930. filesystem with the tools needed to unlock the root filesystem, so that
  1931. the kernel can start the init program. In the example command line below
  1932. which creates the 'initrd.gz' image I assume that you formatted the root
  1933. filesystem as 'ext3', and will be running the Slackware 14.0 default SMP
  1934. kernel '3.14.10-smp' :
  1935.  
  1936. # mkinitrd -c -k 3.14.10-smp -m ext3 -f ext3 -r /dev/cryptvg/root -C /dev/sdx2 -L
  1937.  
  1938. NOTE: if you use a non-US keyboard and need to enter a passphrase during boot,
  1939. this may be problematic if the keyboard mapping is US while Slackware
  1940. runs from the initrd filesystem. In this case, add support for your
  1941. keyboard to the initrd image using this additional parameter to the
  1942. 'mkinitrd' command above: "-l <language>". The string <language> is the
  1943. same as the one you select in the installer when your keyboard is
  1944. non-US. Example for a dutch keyboard: "-l nl".
  1945.  
  1946. * The resulting initrd image will be written to the file '/boot/initrd.gz'
  1947. by default. We still need to tell lilo about this initrd, so open the
  1948. configuration file '/etc/lilo.conf' in an editor such as vi or pico -
  1949. it should already have been generated by the 'liloconfig' part of setup.
  1950. Look for the "Linux bootable partition config" and add a line for the initrd.
  1951. We also need to change the kernel file to a generic kernel, because lilo
  1952. is unable to combine the 'huge' kernels in Slackware 14.0 with an initrd
  1953. image - it will complain about "The initial RAM disk is too big to fit
  1954. between the kernel and the 15M-16M memory hole" if you try a 'huge'
  1955. kernel. We can live with that, since the 'huge' kernels are not meant
  1956. for day-to-day use anyway. They are meant to install Slackware on a wide
  1957. range of computers and that is why they are 'huge'. The linux part of
  1958. '/etc/lilo.conf' should end up looking somewhat like this:
  1959.  
  1960. image = /boot/vmlinuz-generic-smp-3.14.10-smp
  1961. initrd = /boot/initrd.gz
  1962. root = /dev/cryptvg/root
  1963. label = linux
  1964. read-only
  1965.  
  1966. If you add the above section as an extra instead of editing what's
  1967. already present, make sure that the label you use ('linux' in the example
  1968. above) is unique in the configuration file.
  1969.  
  1970. We are done. Save your changes, exit the editor and run the command
  1971. 'lilo'. Lilo will issue a couple of warnings concerning a difference in
  1972. what '/proc/partitions' reports and what lilo thinks are the available
  1973. partitions, but it is safe to ignore these. Reboot now, and you will be
  1974. presented with a "Enter passphrase: " prompt. After entering the passphrase
  1975. which unlocks your encrypted partition, the system will boot into Slackware.
  1976. You will be able to work as usual, and when you shut the machine down (or
  1977. suspend to disk using the swap partition) all your data (including swap)
  1978. will be encrypted when stored on disk.
  1979.  
  1980. As you may have noticed, there was no need to create a file '/etc/crypttab'
  1981. this time. Also, there is only a single passphrase to enter. Additionally,
  1982. the swap is encrypted by default which is a big plus if you intend to use a
  1983. laptop and carry it around with you in a hibernated state. All considered,
  1984. this is the most elegant way of encrypting your Slackware computer if you
  1985. do not mind using LVM.
  1986.  
  1987.  
  1988. Additional passphrases, keyfiles
  1989. --------------------------------
  1990.  
  1991. The cryptsetup program assigns 7 'key slots' to any partition or volume
  1992. it encrypts. Each of those seven slots can contain a key to unlock the
  1993. partition's data. The key can be a passphrase, but the content of a
  1994. *keyfile* is another option. You can then pass the name of a file as a
  1995. parameter to cryptsetup in order to unlock an encrypted volume so that
  1996. you won't have to type a passphrase. This creates the possibility to
  1997. use a keyfile on a removable USB flash disk for unlocking your Slackware
  1998. computer. Slackware supports keyfiles: if the file can be found on the file
  1999. system, it will be used and you won't have to type a passphrase.
  2000.  
  2001. A keyfile on a FAT formatted USB stick can be used as well. This scenario
  2002. requires you to use the "-K" parameter to mkinitrd to specify the USB stick's
  2003. FAT-label or UUID, as well as the full path to the keyfile. An example:
  2004.  
  2005. # mkinitrd -c -k 3.14.10-smp -m ext3 -f ext3 -r /dev/cryptvg/root -C /dev/sdx2 -L -K LABEL=TRAVELSTICK:/keys/alien.luks
  2006.  
  2007. The mkinitrd of Slackware 13.1 introduced this support for USB sticks as
  2008. unlocking mechanism. Alternatively, after the root filesystem is unlocked
  2009. and mounted, it is completely safe to have a keyfile for _additional_
  2010. encrypted filesystems stored in for instance the '/root' directory.
  2011. That way, you still have only one passphrase to type.
  2012.  
  2013.  
  2014. Hibernation (suspend-to-disk)
  2015. -----------------------------
  2016.  
  2017. I will touch briefly on the subject of enabling 'suspend-to-disk'
  2018. because it is not documented properly anywhere else. Configuring your
  2019. Slackware computer for hibernation can be done at any time, it is not
  2020. required to do this during installation of Slackware. Suppose you want
  2021. to use the swap partition '/dev/cryptvg/swap' for hibernation, then you
  2022. must perform the following two steps:
  2023. (1) add "resume=/dev/cryptvg/swap" to the 'append =' line in your
  2024. '/etc/lilo.conf' file. The 'append' line may end up looking like this:
  2025. append = "vt.default_utf8=0 resume=/dev/cryptvg/swap"
  2026. (2) add "-h /dev/cryptvg/swap" as an extra parameter to your mkinitrd command
  2027. to create an initrd with support for resuming from a swap partition.
  2028. Do not forget to run 'lilo' after creating the new initrd.gz file!
  2029.  
  2030.  
  2031. A note on custom kernels
  2032. ------------------------
  2033.  
  2034. If you want to compile your own custom kernel to work with LUKS encrypted
  2035. partitions, you need to enable at least the following two options in your
  2036. kernel configuration:
  2037.  
  2038. Multiple devices driver support (RAID and LVM) --->
  2039. <*> Device mapper support
  2040. <*> Crypt target support
  2041.  
  2042. This is equivalent to the following options in your .config file:
  2043.  
  2044. CONFIG_BLK_DEV_DM=y
  2045. CONFIG_DM_CRYPT=y
  2046.  
  2047. Do not compile these as module! They are required in your kernel.
  2048.  
  2049.  
  2050. USB keyboards and LUKS
  2051. ----------------------
  2052.  
  2053. If you have set up an encrypted root partition, you will need to have
  2054. access to your keyboard in order to type the passphrase. This may require
  2055. you to add the 'uhci-hcd' and 'usbhid' modules to your initrd image if you
  2056. have a USB keyboard. Also note that if you are using a non-US keyboard,
  2057. you can use the '-l' parameter to the 'mkinitrd' command in order to add
  2058. support for this keyboard to your initrd.
  2059.  
  2060.  
  2061. A mkinitrd helper script
  2062. ------------------------
  2063.  
  2064. The mkinitrd package in Slackware 14.0 (and on) ships with a script called
  2065. 'mkinitrd_command_generator.sh'. If you run this script, it will analyze
  2066. your Slackware configuration and make a smart suggestion about the 'mkinitrd'
  2067. command you have to type in order to create an initrd.gz with all the bells
  2068. & whistles. The script will recognize your kernel version, root partition
  2069. and filesystem, it will find out if you are using LUKS and/or LVM and will
  2070. determine what kernel modules your initrd needs to mount the root filesystem.
  2071. The following command will save you the headache of figuring this out all
  2072. by yourself:
  2073.  
  2074. # /usr/share/mkinitrd/mkinitrd_command_generator.sh -r
  2075.  
  2076. It should emit a string like this (your system will probably give different
  2077. parameter values):
  2078.  
  2079. mkinitrd -c -k 3.14.10-smp -m ext3 -f ext3 -r /dev/cryptvg/root -C /dev/sdx2 -L
  2080.  
  2081. You can copy and paste this output to your command prompt, and add any other
  2082. parameters you need such as "-h" to indicate a hibernation partition or
  2083. "-l" to indicate you are using a non-US keyboard layout. You can even run
  2084. the script in full interactive mode by using the "-i" parameter, and it will
  2085. guide you through the process of generating a mkinitrd commandline.
  2086.  
  2087.  
  2088. Desktop Environments
  2089. --------------------
  2090.  
  2091. You probably will not want your encrypted volume to appear on the desktop
  2092. of e.g. KDE or Xfce as a mountable device, so something like this should
  2093. prevent that from occurring:
  2094.  
  2095. # cat /etc/udev/rules.d/99-ignore-luksdevs-on-desktop.rules
  2096. KERNEL=="sdx2", ENV{UDISKS_IGNORE}="1"
  2097.  
  2098.  
  2099. ==============================================================================
  2100.  
  2101. Good luck with your fresh Slackware installion on encrypted partition(s)!
  2102.  
  2103. ==============================================================================
  2104. Author:
  2105. Eric Hameleers <alien@slackware.com> 18-sep-2012
  2106. URLs:
  2107. http://www.slackware.com/~alien/dokuwiki/doku.php?id=slackware:setup
  2108.  
  2109. http://ftp.slackware.com/pub/slackware/slackware-current/Mozilla/5.0
  2110. http://ftp.slackware.com/
Add Comment
Please, Sign In to add comment