76
CIS 191 – Lesson 5 Lesson Module Status • Slides – draft • Properties - done • Flash cards – 9 • No-stress quiz – done • Web Calendar summary – done • Web book pages – done • Commands – done • Skills pacing - done • Lab – done • Supplies – blank floppies, rescue-cd.iso, rescue-floppy.iso, grub.flp, grub-setup.flp • Class PC's – OpenSUSE ISO, Duke, 191- trouble

CIS 191 – Lesson 5

  • Upload
    dick

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

CIS 191 – Lesson 5. Lesson Module Status Slides – draft Properties - done Flash cards – 9 No-stress quiz – done Web Calendar summary – done Web book pages – done Commands – done Skills pacing - done Lab – done - PowerPoint PPT Presentation

Citation preview

Page 1: CIS 191 – Lesson 5

CIS 191 – Lesson 5

Lesson Module Status• Slides – draft• Properties - done• Flash cards – 9• No-stress quiz – done• Web Calendar summary – done • Web book pages – done• Commands – done• Skills pacing - done• Lab – done• Supplies – blank floppies, rescue-cd.iso, rescue-floppy.iso, grub.flp, grub-setup.flp• Class PC's – OpenSUSE ISO, Duke, 191-trouble

Page 2: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Quiz

Please close your books, turn off your monitor, take out a blank piece of paper and answer the following questions:

•On Red Hat systems, what command is used to manage services by runlevel (show and configure services to stop or start)?

• How can you view kernel startup messages?

• What does the line id:5:initdefault: do in /etc/inittab?

Page 3: CIS 191 – Lesson 5

CIS 191 – Lesson 5

Objectives Agenda

• Install OpenSUSE• Practice key skills• Troubleshooting boot and root issues

• Quiz

• Questions from last week

• Housekeeping

• OpenSUSE install

• Skills: Boot time GRUB changes

• Skills: VM boot order

• Skills: Loopback mounts

• Skills: Boot disk diagnostics

• Troubleshooting

• Wrap up

= hands on exercise for topic

Installation and Troubleshooting

Page 4: CIS 191 – Lesson 5

CIS 191A

Lesson 1

VMware ServerUbuntu 8.04

Lesson 2

PartitioningMake file systemsRH9

Lesson 3

BootingDual bootFedora 8/DOS

Lesson 6

RPM, apt-getTarballsCustom Distro

Lesson 5

TroubleshootingOpenSUSE

Lesson 5

RootingCentOS

Lesson 7

X windowsDebian InstallReview

Final

Course Skills Pacing

Page 5: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Housekeeping

Page 6: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Housekeeping

1. Questions on previous material or labs?

2. Return graded material

3. Review Grades web page

4. Review Extra Credit page

5. Lab 2 and 3 due today

Page 7: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Test 1

02 xxx03 xx06 xx07 xxx08 xxx09 x10 xxxxx 11 xxxxxxxx12 xx13 xxxxxx 14 xxxxxxxxxxx 15 xxxxxx

10. What command is used to make special files? mknod

11. What file shows what gets mounted automatically at boot time?

/etc/fstab

13. What command could you use to backup the MBR of the first SCSI drive?

dd if=/dev/sda of=mbr bs=512 count=1

14. What command can be used to show superblock information?

dumpe2fs -h or tune2fs -l plus device (e.g. /dev/sda2)

15. In an ext2 or ext3 file system, where are the filenames stored?

directories

Scoring: Extra credit is applied first to offset any incorrect answers

Page 8: CIS 191 – Lesson 5

CIS 191 - Lesson 4

OpenSUSE 11Install

Page 9: CIS 191 – Lesson 5

CIS 191 - Lesson 4

Exercise: openSUSE 11 installation

1. Follow Howto on website:

http://simms-teach.com/howtos/110-openSUSE-11-install.pdf

• Name this system "opensuse11" (both VM and hostname)

• For the root and CIS191 account, use password on whiteboard.

title openSUSE 11.0 - 2.6.25.5-1.1root (hd0,1)kernel /boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/sda2 resume=/dev/sda1 splash=silent showopts vga=0x317initrd /boot/initrd-2.6.25.5-1.1-pae

Boot Sector

swap

MBR

Boot Sector

/

Boot Sector

home

/dev

/sda

2*

/dev

/sda

3

/dev

/sda

1

/dev/sda

Page 10: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Boot Sector

swap

MBR

Boot Sector

/

Boot Sector

home

/dev

/sda

2*

/dev

/sda

3

/dev

/sda

1

/dev/sda

title openSUSE 11.0 - 2.6.25.5-1.1root (hd0,1)kernel /boot/vmlinuz-2.6.25.5-1.1-pae root=/dev/sda2 resume=/dev/sda1 splash=silent showopts vga=0x317initrd /boot/initrd-2.6.25.5-1.1-pae

title My Linux root to 2nd driveroot (hd0,1)kernel /boot/vmlinuz-2.6.25.5-1.1-pae ro root=/dev/sdb1initrd /boot/initrd-2.6.25.5-1.1-pae

Boot Sector

/

MBR

/dev

/sdb

1

/dev/sdb

New drive added with custom root file system

Extra Credit LabSee Lab X2on Calendar

Adds a new drive and root file

system to the OpenSUSE VM.

GRUB is configured to root to the new root file system

Page 11: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Skills

Page 12: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Lesson 5New Skills

• Boot time GRUB edits (review)

• Changing BIOS boot order on a VM (review)

• Mounting CD ISO and floppy Image files on loopback devices

(new)

• Making a diagnostics boot diskette (new)

Page 13: CIS 191 – Lesson 5

Boot timeGRUB edits

Page 14: CIS 191 – Lesson 5

CIS 191 - Lesson 5

GRUB boot editsFedora 9

Press any key to get boot menu

Page 15: CIS 191 – Lesson 5

CIS 191 - Lesson 5

GRUB boot editsFedora 9

Move up and down using arrow keys. Press e to edit selection.

Page 16: CIS 191 – Lesson 5

CIS 191 - Lesson 5

GRUB boot editsFedora 9

Move up and down using arrow keys. Press e to edit selection.

Page 17: CIS 191 – Lesson 5

CIS 191 - Lesson 5

GRUB boot editsFedora 9

Make changes by moving the cursor and replacing or inserting characters.

Page 18: CIS 191 – Lesson 5

CIS 191 - Lesson 5

GRUB boot editsFedora 9

For this example we replace UUID specification of the / partition with /dev/sda5, remove the rhgb and quiet options and add single to boot up in single user mode. Hit Enter when finished.

Page 19: CIS 191 – Lesson 5

CIS 191 - Lesson 3

GRUB boot editsFedora 9

Now press b to boot up using the changes

Page 20: CIS 191 – Lesson 5

CIS 191 - Lesson 5

GRUB boot editsFedora 9

The system now boots into single user mode.

NOTE: The GRUB changes are temporary. /boot/grub/grub.conf must be edited to make changes permanent

NOTE: The single option on the kernel line is very handy when troubleshooting boot problems.

Page 21: CIS 191 – Lesson 5

BIOS bootorder

Page 22: CIS 191 – Lesson 5

CIS 191 - Lesson 3

BIOS Boot OrderVMware BIOS

1) Click inside the VM so it has the focus

2) Tap F2 repeatedly to enter BIOS configuration.

Note: You don't get much time for this so have your finger over the F2 key!

Page 23: CIS 191 – Lesson 5

CIS 191 - Lesson 3

BIOS Boot OrderVMware BIOS

Right arrow over to the Boot menu.

Page 24: CIS 191 – Lesson 5

CIS 191 - Lesson 3

BIOS Boot OrderVMware BIOS

Re-order to suit your needs. This VM will look first on a floppy, then a CD, then the hard drive and then try network boot.

Page 25: CIS 191 – Lesson 5

CIS 191 - Lesson 3

BIOS Boot OrderVMware BIOS

A + means the group can be expanded (use Enter)

Noter: VMware BIOS does not support USB pen drive boots.

Page 26: CIS 191 – Lesson 5

CIS 191 - Lesson 3

BIOS Boot OrderVMware BIOS

If you have multiple hard drives, they can be searched in order as well

Page 27: CIS 191 – Lesson 5

CIS 191 - Lesson 3

BIOS Boot OrderVMware BIOS

Save any changes you make.

Page 28: CIS 191 – Lesson 5

loopbackmounts

Page 29: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Lesson 5Mounting CD ISO and floppy Image files on loopback devices

Desired: Be able to directly mount an CD ISO image file. Avoids having to burn downloaded ISO's on to CD's , then loading the new CD into computer, and then finally mounting /dev/cd0.

Solution: Use loopback devices.

Page 30: CIS 191 – Lesson 5

/boot

/dev

/

/bin /etc /mnt

cdrom/

/dev/boot /home

cis191/

grub/

lost+found/

lost+found/

floppy/

/lib

/dev/sdb1

/dev/sda1

/dev/sda5

Mounting File SystemsLike pinning the tail on the donkey

mount /dev/sdb1 /mnt

/lib

/bin

CIS 191 - Lesson 5

Page 31: CIS 191 – Lesson 5

/

/bin /etc /mnt

bin/

/dev/boot /home

cis191/

grub/

lost+found/

lost+found/boot/

dev/

/lib

/dev/sda1

/dev/sda5

Mounting File SystemsLike pinning the tail on the donkey

/dev/sda6

mount /dev/sdb1 /mnt

lib/

CIS 191 - Lesson 5

Page 32: CIS 191 – Lesson 5

/

/bin /etc /mnt

cdrom/

/dev/boot /home

cis191/

grub/

lost+found/

lost+found/

floppy/

/lib

/dev/sda1

/dev/sda5

Mounting Image FilesLike pinning the tail on the donkey

mount –o loop Desktop/rescue-cd.iso /mnt

rescue-cd.iso

CIS 191 - Lesson 5

Page 33: CIS 191 – Lesson 5

/

/bin /etc /mnt

/images

/dev/boot /home

/rsimms

/grub

/lost+found

/lost+found

/isolinux

TRANS.TBL

/lib

/dev/sda1

/dev/sda5

Mounting Image FilesLike pinning the tail on the donkey

/dev/loop0

mount –o loop Desktop/rescue-cd.iso /mnt

CIS 191 - Lesson 5

Page 34: CIS 191 – Lesson 5

HWDiags

Page 35: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Diagnostics boot disketteChecking out your system prior to installing Linux

• Check RAM quantity

• Check drive sizes

• Inspect other hardware resources as necessary

Page 36: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Diagnostics boot disk

BIOS code

Floppy with boot code for DOS

Boot order with floppy drive at top

When DOS loads, autoexec.bat run diagnostics program

Page 37: CIS 191 – Lesson 5

CIS 191 - Lesson 5

DiagnosticsDIAG, the diagnostic program

Page 38: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationRAM Requirements & Configuration Issues

• The more RAM the better

• Graphics (X Windows) runs best with a minimum of 64MB

RAM

• Swap space size should be 1.5 to 2 times RAM – up to

256 MB. At 256MB RAM and above, swap space should

equal RAM

Page 39: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Exercise: Mounting ISOs using Loopbacks

1. Follow Howto on website:

http://simms-teach.com/howtos/124-mount-iso-on-loopback.pdf

Page 40: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Exercise: Boot Floppy Diagnostics

1. Follow Howto on website:

http://simms-teach.com/howtos/123-diag-floppy.pdf

Page 41: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Troubleshooting

Page 42: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Booting the System

1. Power On Self Test (POST) – loads the BIOS.

2. BIOS loads the Master Boot Record.

3. MBR read its partition table to determine which

partition to boot into.

4. MBR loads the boot program in the active partition.

5. Boot program presents user with boot prompt menu.

6. Based upon user selection, boot program loads

desired kernel along with and supplied boot options

7. Kernel uncompresses and loads into memory.

8. Kernel detects hardware and initializes its data.

fdisk

boot order

grub.conf

grub.conf

Page 43: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Rooting the System

1. Kernel mounts the root file system2. Kernel creates and starts the init process3. init reads /etc/inittab for its instructions4. init performs system initialization:

• presents some kind of welcome banner• allows for and interactive startup• set up keyboard mapping, system fonts, plug and play

devices, …• checks for dirty file systems, can clean them if

necessary• checks disk quotas and swap space• mounts all file systems

5. Chooses which runlevel to come up in and executes those scripts via rc script

6. daemons load7. getty processes are spawned on terminal devices

/etc/inittab

grub.conf

/etc/rc.d

Page 44: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Preparing for trouble

• Record your partition and mount information (output from fdisk –l and mount)

• Make a copy of your MBR. For example:dd if=/dev/sda of=mbr bs=512 count=1

• Create a bootable rescue floppy with GRUB installed that roots to your / partition on your Linux system.

• Record grub.conf

• Record MBR xxd output

• Record /etc/inittab

Page 45: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Rescue boot devices

• Put pristine GRUB stage1 and stage2 files• Add GRUB config files for more control• Add a kernel for more options• Make vender rescue disk• Add a kernel and small root file system with tools• Use small Linux distribution like Knoppix

Page 46: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Making rescue floppyRH9 example

Boot Sector

/dev

/fd0

Method I The "simplest rescue diskette"

cd /usr/share/grub/i386-redhatcat stage1 stage2 > /dev/fd0

Note: this will allow you to boot directly into GRUB. At boot time you would manually enter (use tab completes!):grubgrub> root (hd0,0)grub> kernel /vmlinuz-2.4.20-6 ro root=/dev/sda2grub> initrd /initrd-2.4.20-6.imggrub> boot

Method IIgrubgrub> root (hd0,0)grub> setup (fd0)grub> quit

Boot Sector

/boot

MBR

Boot Sector

/

Boot Sector

swap

/dev

/sda

2

/dev

/sda

3

/dev

/sda

1

Page 47: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Making rescue floppyInstalling boot code into floppy boot sector

Boot Sector

/dev

/fd0

Method III (RH9) mkbootdisk --device /dev/fd0 $(uname –r)

Method IVPut grub files to floppy and setup boot sector to use them. See Howto on "Trouble"

Boot Sector

/boot

MBR

Boot Sector

/

Boot Sector

swap

/dev

/sda

2

/dev

/sda

3

/dev

/sda

1

Page 48: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Startup Troubleshooting

How to make lots of trouble:

http://simms-teach.com/howtos/116-rh9-trouble.pdf

Page 49: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 50: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 51: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 52: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 53: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 54: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 55: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 56: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 57: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 58: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 59: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 60: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 61: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 62: CIS 191 – Lesson 5

CIS 191 - Lesson 5

The faces of trouble

Page 63: CIS 191 – Lesson 5

CIS 191 - Lesson 5

For the command/file collection

Task Command or file

The simplest boot floppy. cd /usr/share/grub/i386-redhat/cat stage1 stage2 > /dev/fd0

After booting into grub, manually enter appropriate grub commands you would normally see in grub.cong

Make RH9 emergency boot disk mkbootdisk --device /dev/fd0 $(uname –r)

Mount CD ISO or floppy disk images on loopbacks

mount –o loop Desktop/rescue-cd.iso /mntmount –o loop Desktop/rescue-floppy.img /mnt

Backup MBR to file named mbr dd if=/dev/sda of=mbr bs=512 count=1

Make rescue floppy for specific system

grub> root (hd0,0) (location of /boot)> setup (fd0)> quit

Page 64: CIS 191 – Lesson 5

CIS 191 – Lesson 5

Next Class

Assignment: Check Calendar Page on web site to see what is due next week.

Quiz questions for next class:

How do you edit GRUB boot options at startup?

How do you make a simple rescue floppy if your boot files are in /dev/sda2?

What happens on boot with a conventional MBR and no active partition?

Page 65: CIS 191 – Lesson 5

CIS 191 – Lesson 5

Backup

Page 66: CIS 191 – Lesson 5

CIS 191 - Lesson 5

Installation

Page 67: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationGathering System Documentation

1. Hardware documentation

2. Linux Diagnostics

www.linuxgazette.com/issue37/tag/10.html

3. Windows System Information

4. Hardware Diagnostics

ftp://ftp.microsoft.com/softlib/msfiles/msdzip.exe

Page 68: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationRole of BIOS and Device Detection

• Firmware or Read Only Memory (ROM)

• Basic Input Output System (BIOS)

• Plug and Play

Page 69: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationPeripheral Devices

CD-ROM Controllers

• CD-ROM is a special type of mass storage

• 12+ types of sound card CD-ROM drivers

• ATAPI IDE CD-ROM drive interface

The Video Adapter

• The video controller

• Video memory

• The graphic mode

Page 70: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationThe Monitor

• Monitor Refresh Rates

• Monitor Limits

o The size of the display

o The dot pitch of the phosphor units in mm

o The maximum raster-scan sweep rate

• Changing Graphics Modes

• Is it possible to break your monitor?

Page 71: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationDevice Support Issues

• Printers

• Video Adapters

• Modems

Page 72: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationHard Disk Partitioning

• Primary vs. Extended Partitions

Page 73: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationHard Disk Partitioning Strategies

• Automatic Partitioning

• Manual Partitioning

• Swap Partition Configuration

Page 74: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationMultiple Operating System Booting

• MS-Windows and Linux sharing a hard Drive

• Emulation instead of Coexistence

Page 75: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationNetwork Configuration

• Internet Protocol (IP) Address

• Network Mask

• Gateway

• Domain Name Service

Page 76: CIS 191 – Lesson 5

CIS 191 - Lesson 5

InstallationInstallation Media Choices

• Local Device Installation

• Network Access Installation