Installing Linux (Chapter 8) Note packet # 4 CSN 115 Operating Systems Ken Mead Genesee Community College Objectives Learn about the hardware components of your computer system Configure hard disk space to hold a new Linux installation Install Linux Automate installation of multiple systems (advanced possible final project).
Before you Install Install operating system yourself Plan your installation to: Make effective use of hardware Prevent problems from occurring during installation Before installing Gather information about computer Determine best way to organize Linux on computer Architecture Linux was originally developed for Intel-based systems (called x86 systems) Most modern PC's use 64 bit Intel/AMD architecture (x86-64 or amd64). Most Linux distributions default to this architecture. Other processor types on which Linux can run: (depends on distribution) PowerPC, ARM, Itanium ia32, ia64, IBM S/390, Xbox, mobile, etc.
Hardware Compatibility Most current hardware is "Plug and Play" the hardware is automatically discovered and configured by the operating system. Older hardware may have to be set up manually (via onboard jumpers or through system BIOS). Not all hardware is compatible with Linux yet (some wireless cards, display devices, and scanners in particular). Newer hardware lag time before drivers are included in kernel. Common OS Terms Common terms that you'll see in the context of Operating Systems: OS (Operating System) Bits and Bytes Megabytes (MB) and Gigabytes (GB) Random Access Memory (RAM) Read-Only Memory (ROM) Basic Input/Output System (BIOS) Complementary metal oxide semiconductor (CMOS) Motherboard
Common OS Terms Continued from last page: Interrupt request (IRQ) Direct memory access (DMA) channel I/O port Binary numbers Hexadecimal numbers IDE, IDE controller SCSI/SATA (drives, controller) Disk Partition USB Boot Loader, Boot Device Bits and Bytes Bit a zero or one (0, 1)... or an on/off "switch" Byte a collection of 8 bits Kilobyte - Megabyte - Gigabyte - - 1024 Gygabytes (or approx trillion bytes)
BIOS/CMOS BIOS (Basic Input-Output System) is a program burned into a ROM chip that helps initially load the operating system. You can access BIOS at boot time. CMOS (Complementary Metal Oxide Semiconductor pronounced see-moss) is a battery-powered memory device that permanently saves current computer hardware and system configuration. BIOS reads from CMOS to get the system running. Motherboard the system circuit board that houses many critical devices (CPU, RAM, network) and provides connectors for peripherals (Hard Drives, DVD/CD ) IRQ, I/O Ports, and DMAs IRQ Interrupt Request Line. Hardware lines over which devices can send interrupt signals to the CPU. DMA Direct Memory Access. A technique for transferring data from main memory to a device without passing it through the CPU. I/O (Input/Output) address addresses assigned to every I/O port on your computer, including USB, Firewire, Ethernet, VGA, and DVI ports, as well as any other ports your computer might have. For older hardware, some of these may need to be set up manually via BIOS, hardware jumpers, and/or the operating system. Very rare these days.
Windows I/O Addressing Example Same with Linux /proc/ioports
Binary and Hex Binary Numbers (base 2) consist of 0's and 1's. 0, 1, 10, 11, 100, 101,,,, Binary is the way computers naturally "think". Hexadecimal numbers are base 16 (base 2 x 2 x 2 x 2). The digits are: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F After F, the digits repeat like this: 10, 11, 12,..., 19, 1A, 1B, 1C, 1D, 1E, 1F,,,...,,,,,,, What is the last 2 digit hex number? The first 3-digit? What comes after 39F? What about BFF? IDE (aka PATA) IDE/SATA/SCSI old disk drive technology, many found in CD-Rom connectors. Limited to 4 devices. Devices look like /dev/hda, /dev/hdb... SATA Serial ATA more flexible and faster than IDE (PATA). Devices look like /dev/sda, /dev/sdb... SCSI Small Computer System Interface Very fast, most used on servers, tricky to set up and maintain. Devices look like /dev/sda, /dev/sdb... Partition a part of a physical drive.
Table 2-6: Linux Names for IDE Drives First partition on /dev/hda is /dev/hda1, second is /dev/hda2 Same convention used on SATA/SCSI (/dev/sda1, /dev/sda2,...) Names for SATA/SCSI drives Device Names: First SCSI/SATA drive: /dev/sda Second: /dev/sdb Third: /dev/sdc and so on... USB flash device usually shows up as the "next" SATA/SCSI device. Normally, these are automatically mounted when inserted.
Boot Loaders A boot loader is a small program accessed by BIOS that starts the process of loading the operating system. The boot loader on a PC is usually found in the MBR (Master Boot Record) at the beginning (first 512 bytes) of the physical disk. Linux boot loader is called "grub" (new version is grub2). Many boot loaders will allow different operating systems to boot on different disk devices. Chain Loading redirect one boot loader to another. Single boot system Deciding How to Install only one OS on the system Most common, easiest to set up. Dual/Multi boot system Multiple OS's share the system You need free, unpartitioned space (or an unused partition) on your storage device Virtual Machine system Software allows one OS acts as the "host", another runs inside the host as a guest. VMWare, VirtualBox, VirtualPC... Live CD System OS runs directly from CD
Multi Boot Systems Advantages: Disadvantages: Virtual Machine Systems Advantages: Disadvantages:
Wubi wubi allows you to install Ubuntu while running windows, same with mint4win. No need to re-partition hard drives Automatically updates Windows boot loader Easiest way to create a dual boot system. Disadvantages: Not as flexible as other dual boot systems (options are Windows and Ubuntu only). Slightly slower than regular dual boot. Boot loader Creating a Multi-Boot System Select operating system each time computer booted Basic options for a dual-boot system: Store each operating system on separate physical hard disk Store multiple operating systems on single hard disk but on different partitions. In wubi's case, store the Ubuntu OS and data inside a folder in Windows.
Configuring Disk Space Usually, we install Linux in dedicated partition on hard disk Each hard disk can have only four main partitions Called primary partitions Numbered 1 through 4 Logical partitions Exist within physical extended partition Numbered beginning with 5 Only required partition is the / (root) partition. Swap Partition recommended - for more efficient operation - should be twice the size of RAM. Using fdisk to view partition info Up to 4 primary partitions (hda1 hda4). One of the primary partitions may be an Extended partition (hda2 below). The remainder are logical partitions (hda5 +)
Partitions and Mount Points From the previous page, we saw a few linux partitions. All Linux Installations need a root (/) partition. In this case shown above, it's hda9. In this installation, also a /boot partition (hda7) and a swap partition (hda10). You can "mount" other partitions on linux, provided the filesystem type is supported. You can change partition size by using "gparted" or third party windows based programs (e.g. Partition Magic). Filesystems recognized by Linux Ext2, ext3 second/ third extended filesystem ext3 = ext2 + journalling Older Linux standard filesystem. ext4 - new for Fedora 11+ and Ubuntu 9.04 + Similar to ext3 with some added features iso9660 / UDF - CD, DVD file formats vfat / NTFS - USB, windows standard filesystems Swap - not a filesystem, but scratchpad area for memory many others!
Preparing the Hard Disk Disk partitioning utility May be needed to free up space for a multi-boot system Products that you may use to make existing partitions smaller: Windows Server and Windows 10 built right in. gparted * Repartition at your own peril back up data first! You should plan on freeing up at least 10 Gigs of hard drive space for your install (of course, more is better!) Installing at Home Highly recommended, if you install at home, use either: Virtual Machine Setup windows is your host and Linux is the guest. Wubi or Mint4Win (probably won't work if you currently run Windows 8). Reason most dangerous part of the process is the freeing of partitioned space. Neither of the above needs to mess with partitions.