[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
slackbook:booting [2012/09/05 05:01 (UTC)] – [LILO] updated formatting and text to original alignment mfillpotslackbook:booting [2012/09/12 20:42 (UTC)] (current) – [Sources] Bullet Points sycamorex
Line 33: Line 33:
  
  
-<code>+<code bash>
 darkstar:~# ls -1 /boot/vmlinuz* darkstar:~# ls -1 /boot/vmlinuz*
 /boot/vmlinuz-huge-2.6.29.4 /boot/vmlinuz-huge-2.6.29.4
Line 109: Line 109:
  
  
-<code>+<code bash>
 darkstar:~# mkinitrd --help darkstar:~# mkinitrd --help
 mkinitrd creates an initial ramdisk (actually an initramfs cpio+gzip mkinitrd creates an initial ramdisk (actually an initramfs cpio+gzip
Line 132: Line 132:
  
  
-<code>+<code bash
 darkstar:~# mount darkstar:~# mount
 /dev/sda1 on / type ext4 (rw,barrier=1,data=ordered) /dev/sda1 on / type ext4 (rw,barrier=1,data=ordered)
Line 149: Line 149:
  
  
-<code>+<code bash>
 darkstar:~# mkinitrd -f ext4 -r /dev/sda1 darkstar:~# mkinitrd -f ext4 -r /dev/sda1
 </code> </code>
Line 170: Line 170:
  
  
-<code>+<code bash>
 darkstar:~# >/prompt>cat /etc/mkinitrd.conf.sample darkstar:~# >/prompt>cat /etc/mkinitrd.conf.sample
 # See "man mkinitrd.conf" for details on the syntax of this file # See "man mkinitrd.conf" for details on the syntax of this file
Line 209: Line 209:
  
  
-<code>+<code bash>
 darkstar:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh darkstar:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh
 mkinitrd -c -k 2.6.33.4 -f ext3 -r /dev/sda3 -m \ mkinitrd -c -k 2.6.33.4 -f ext3 -r /dev/sda3 -m \
Line 230: Line 230:
 installer, but you can run it at any time from a terminal. installer, but you can run it at any time from a terminal.
  
-{{ :slackware:setup_lilo_cl.png?550 |}}+{{ :slackbook:setup-lilo.png?550 |}}
  
 **//liloconfig//** has two modes of operation: **//liloconfig//** has two modes of operation:
Line 268: Line 268:
  
  
-<code>+<file>
 # LILO configuration file # LILO configuration file
  
Line 284: Line 284:
 vga = 773 vga = 773
 .... many more lines ommitted .... .... many more lines ommitted ....
-</code>+</file>
  
  
Line 327: Line 327:
  
  
-<code>+<file>
 # LILO configuration file # LILO configuration file
 ... global section ommitted .... ... global section ommitted ....
Line 342: Line 342:
   table = /dev/sda   table = /dev/sda
 # Windows bootable partition config ends # Windows bootable partition config ends
-</code>+</file>
  
  
Line 364: Line 364:
  
  
-<code>+<code bash>
 darkstar:~# lilo darkstar:~# lilo
 Warning: LBA32 addressing assumed Warning: LBA32 addressing assumed
Line 379: Line 379:
 ===== Dual Booting ====== ===== Dual Booting ======
  
-A bootloader (like LILO) is a very flexible thing, since it exists only to determine which hard drive, partition, or even a specific kernel on a partition to boot. This inherently suggests a choice when booting, so the idea of having more than one operating system on a computer comes very naturally to a LILO or GRUB user.+A bootloader (like LILO) is a very flexible thing, since it exists 
 +only to determine which hard drive, partition, or even a specific 
 +kernel on a partition to boot. This inherently suggests a choice 
 +when booting, so the idea of having more than one operating system 
 +on a computer comes very naturally to a LILO or GRUB user.
  
-People "dual boot" for a number of reasons; some people want to have a stable Slackware install on one partition or drive and a development sandbox on another, other people might want to have Slackware on one and another Linux or BSD distribution on another, and still other people may have Slackware on one partition and a proprietary operating system (for work or for that one application that Linux simply cannot offer) on the other. 
  
-Dual booting should not be taken lightly, however, since it usually means that you'll now have two different operating systems attempting to manage the bootloader. If you dual boot, the likelihood of one OS over-writing or updating the bootloader entries without your direct intervention is great; if this happensyou'll have to modify GRUB or LILO manually so you can get into each OS.+People //"dual boot"// for a number of reasons; some people want 
 +to have a stable Slackware install on one partition or drive and a 
 +development sandbox on anotherother people might want to have 
 +Slackware on one and another Linux or BSD distribution on another, 
 +and still other people may have Slackware on one partition and a 
 +proprietary operating system (for work or for that one application 
 +that Linux simply cannot offer) on the other.
  
-There are two ways to dual (or multi) boot; you can put each operating system on its own hard drive (common on a desktop, with their luxury of having more than one drive bay) or each operating system on its own partition (common on a laptop where only one physical drive is present). 
  
 +Dual booting should not be taken lightly, however, since it usually
 +means that you'll now have two different operating systems
 +attempting to manage the bootloader. If you dual boot, the
 +likelihood of one OS over-writing or updating the bootloader entries
 +without your direct intervention is great; if this happens, you'll
 +have to modify GRUB or LILO manually so you can get into each OS.
 +
 +There are two ways to dual (or multi) boot; you can put each
 +operating system on its own hard drive (common on a desktop, with
 +their luxury of having more than one drive bay) or each operating
 +system on its own partition (common on a laptop where only one
 +physical drive is present).
 ==== Dual Booting with Partitions ==== ==== Dual Booting with Partitions ====
  
-In order to set up a dual-boot system with each operating system on its own partition, you must first create partitions. This is easiest if done prior to installing the first operating system, in which case it's a simple case of pre-planning and carving up your hard drive as you feel necessary. See the section called “[[slackbook:install#Partitioning|Partitioning]]” for information on using the fdisk or cfdisk partitioning applications.+In order to set up a dual-boot system with each operating system on 
 +its own partition, you must first create partitions. This is easiest 
 +if done prior to installing the first operating system, in which 
 +case it's a simple case of pre-planning and carving up your hard 
 +drive as you feel necessary. See [[slackbook:install#partitioning|the section called “Partitioning]] for 
 +information on using the **//fdisk//** or 
 +**//cfdisk//** partitioning applications. 
  
 <note important> <note important>
-If you're dual booting two Linux distributions, it is inadvisable to attempt to share a /home directory between the systems. While it is technically possible, doing so will increase the chance of your personal configurations from becoming mauled by competing desktop environments or versions. +If you're dual booting two Linux distributions, it is inadvisable 
-</note>+to attempt to share a /home directory between the 
 +systems. While it is technically possible, doing so will increase 
 +the chance of your personal configurations from becoming mauled by 
 +competing desktop environments or versions.
  
 It is, however, safe to use a common swap partition. It is, however, safe to use a common swap partition.
 +</note>
  
 You should partition your drive into at least three parts: You should partition your drive into at least three parts:
Line 402: Line 433:
   * One partition for swap   * One partition for swap
  
-First, install Slackware Linux onto the first partition of the hard drive as described in [[slackbook:install]|Chapter 2, Installation]].+First, install Slackware Linux onto the first partition of the hard 
 +drive as described in [[slackbook:install]|Chapter 2, Installation]].
  
-After Slackware has been installed, booted, and you've confirmed that everything works as expected, then reboot to the installer for the second OS. This OS will invariably offer to utilize the entire drive; you obviously do not want to do that, so constrain it to only the second partition. Furthermore, the OS will attempt to install a boot loader to the beginning of the hard drive, overwriting LILO. 
  
-You have a few possible courses of action with regards to the boot loader:+After Slackware has been installed, booted, and you've confirmed 
 +that everything works as expected, then reboot to the installer for 
 +the second OS. This OS will invariably offer to utilize the entire 
 +drive; you obviously do **not** want to do that, so 
 +constrain it to only the second partition. Furthermore, the OS will 
 +attempt to install a boot loader to the beginning of the hard drive, 
 +overwriting LILO. 
 + 
 + 
 +You have a few possible courses of action with regards to the boot 
 +loader:
  
 **Possible Boot Loader Scenarios** **Possible Boot Loader Scenarios**
  
-**If the secondary OS is Linux, disallow it from installing a boot manager.** +**If the secondary OS is Linux, disallow it from installing a boot 
-If you're dual booting to another Linux distribution, the installer of that distribution usually asks if you want a boot loader installed. You're certainly free to not install a boot manager for it at all, and manually manage both Slackware and the other distribution with LILO.+manager.** \\ 
 +If you're dual booting to another Linux distribution, the 
 +installer of that distribution usually asks if you want a boot 
 +loader installed. You're certainly free to not install a boot 
 +manager for it at all, and manually manage both Slackware and 
 +the other distribution with LILO.
  
-Depending on the distribution, you might be editing LILO more frequently than you would if you were only running Slackware; some distributions are notorious for frequent kernel updates, meaning that you'll need to edit LILO to reflect the new configuration after such an update. But if you didn't want to edit configuration files every now and again, you probably wouldn't have chosen Slackware.+ 
 +Depending on the distribution, you might be editing LILO more 
 +frequently than you would if you were only running Slackware; 
 +some distributions are notorious for frequent kernel updates, 
 +meaning that you'll need to edit LILO to reflect the new 
 +configuration after such an update. But if you didn't want to 
 +edit configuration files every now and again, you probably 
 +wouldn't have chosen Slackware. 
  
 **If the secondary OS is Linux, let it overwrite LILO with GRUB.** **If the secondary OS is Linux, let it overwrite LILO with GRUB.**
  
-If you're dual booting to another Linux distribution, you are perfectly capable of just using GRUB rather than LILO, or install Slackware last and use LILO for both. Both LILO and GRUB have very good auto-detection features, so whichever one gets installed last should pick up the other distribution's presence and make an entry for it.+If you're dual booting to another Linux distribution, you are 
 +perfectly capable of just using GRUB rather than LILO, or 
 +install Slackware last and use LILO for both. Both LILO and GRUB 
 +have very good auto-detection features, so whichever one gets 
 +installed last should pick up the other distribution's presence 
 +and make an entry for it.
  
-Since other distributions often attempt to auto-update their GRUB menus, there is always the chance that during an update something will become maligned and you suddenly find you can't boot into Slackware. If this happens, don't panic; just boot into the other Linux partition and manually edit GRUB so that it points to the correct partition, kernel, and initrd (if applicable) for Slackware in its menu. 
  
-**Allow the secondary OS to overwrite LILO and go back later to manually re-install and re-configure LILO.**+Since other distributions often attempt to auto-update their 
 +GRUB menus, there is always the chance that during an update 
 +something will become maligned and you suddenly find you can'
 +boot into Slackware. If this happens, don't panic; just boot 
 +into the other Linux partition and manually edit GRUB so that it 
 +points to the correct partition, kernel, and initrd (if 
 +applicable) for Slackware in its menu.
  
-This is not a bad choice, especially when Windows is the secondary OS, but potential pitfalls are that when Windows updates itself, it may attempt to overwrite the MBR (master boot record) again, and you'll have to re-install LILO manually again.+**Allow the secondary OS to overwrite LILO and go back later to 
 +manually re-install and re-configure LILO. **
  
-To re-establish LILO after another OS has erased it, you can boot from your Slackware install media and enter the setup stage. Do not re-partition your drive or re-install Slackware; skip immediately to the section called “[[slackbook:install#the_setup_program|Configure]]”.+This is not a bad choice, especially when Windows is the 
 +secondary OS, but potential pitfalls are that when Windows 
 +updates itself, it may attempt to overwrite the MBR (master boot record) 
 +againand you'll have to re-install LILO manually again.
  
-Even when using the "simple" option to install, LILO should detect both operating systems and automatically configure a sensible menu for you. If it fails, then add the entries yourself.+ 
 +To re-establish LILO after another OS has erased it, you can 
 +boot from your Slackware install media and enter the setup 
 +stage. Do <emphasis>not</emphasis> re-partition your drive or 
 +re-install Slackware; skip immediately to [[slackbook:install#the_setup_program|Configure]].  
 + 
 + 
 +Even when using the //"simple"// option to install, LILO 
 +should detect both operating systems and automatically configure 
 +a sensible menu for you. If it fails, then add the entries 
 +yourself.
 ==== Dual Booting from Hard Drives ==== ==== Dual Booting from Hard Drives ====
  
-Dual booting between different physical hard drives is often easier than with partitions since the computer's BIOS or EFI almost invariably has a boot device chooser that allows you to interrupt the boot process immediately after POST and choose what drive should get priority.+Dual booting between different physical hard drives is often 
 +easier than with partitions since the computer's BIOS or EFI 
 +almost invariably has a boot device chooser that allows you to 
 +interrupt the boot process immediately after POST and choose what 
 +drive should get priority. 
 + 
 + 
 +The snag key to enter the boot picker is different for each brand 
 +of motherboard; consult the motherboard's manual or read the 
 +splash screen to find out what your computer requires. Typical 
 +keys are <key>'F1'</key>, <key>'F12'</key>, 
 +<key>'DEL'</key>. For Apple computers, it is always the 
 +<key>'Option'</key> (Alt) key. 
 + 
 + 
 +If you manage the boot priority via BIOS or EFI, then each boot 
 +loader on each hard drive is only aware of its own drive and will 
 +never interfere with one another. This is rather contrary to what 
 +a boot loader is designed to do but can be a useful workaround 
 +when dealing with proprietary operating systems which insist upon 
 +being the only OS on the system, to the detriment of the user'
 +preference. 
  
-The snag key to enter the boot picker is different for each brand of motherboard; consult the motherboard's manual or read the splash screen to find out what your computer requires. Typical keys are **F1, F12DEL**For Apple computers, it is always the **Option** (Alt) key.+If you don't have the luxury of having multiple internal hard 
 +drives and don't feel comfortable juggling another partition and 
 +OS on your computer, you might also consider using a bootable USB thumbdrive or even a 
 +virtual machine to give you access to another OSBoth of these 
 +options is outside the scope of this book, but they've commonplace 
 +and might be the right choice for you, depending on your needs.
  
-If you manage the boot priority via BIOS or EFI, then each boot loader on each hard drive is only aware of its own drive and will never interfere with one another. This is rather contrary to what a boot loader is designed to do but can be a useful workaround when dealing with proprietary operating systems which insist upon being the only OS on the system, to the detriment of the user's preference. 
  
-If you don't have the luxury of having multiple internal hard drives and don't feel comfortable juggling another partition and OS on your computer, you might also consider using a bootable USB thumbdrive or even a virtual machine to give you access to another OS. Both of these options is outside the scope of this book, but they've commonplace and might be the right choice for you, depending on your needs.+====== Chapter Navigation ====== 
 +**Previous Chapter: [[slackbook:install|Installation]]**
  
 +**Next Chapter: [[slackbook:shell|Basic Shell Commands]]**
 ====== Sources ====== ====== Sources ======
 <!-- If you copy information from another source, then specify that source --> <!-- If you copy information from another source, then specify that source -->
- * Original source: [[http://www.slackbook.org/beta/#ch_boot]] +  * Original source: [[http://www.slackbook.org/beta]] \\
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-<!-- * Originally written by [[wiki:user:xxx | User X]] -->+  * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson
 <!-- * Contrbutions by [[wiki:user:yyy | User Y]] --> <!-- * Contrbutions by [[wiki:user:yyy | User Y]] -->
  
 slackbook:booting ()