Peter

Apr 102007

You can tell the kernel to reboot a Linux system without access to a filesystem (e.g. a frozen RAID controller) or the usual commands.

First saw this at:
http://blog.air4web.com/linux-force-reboot.html

Force hard reboot (no shutdown runlevel, no sync):

echo 1 > /proc/sys/kernel/sysrq ; echo b > /proc/sysrq-trigger

Force shutdown:

echo 1 > /proc/sys/kernel/sysrq ; echo o > /proc/sysrq-trigger
Nov 252006

Installing Type1 fonts:

cd /usr/share/fonts/Type1
cp *.{afm,pfb} .
/usr/local/bin/type1inst
/etc/rc.d/init.d/xfs reload

From the type1inst README:

type1inst lives on the Linux archive sunsite.unc.edu in
/pub/Linux/X11/xutils. Updates will be placed there as required.

Monospaced Fonts in Adobe Font Folio:

Courier                               *really nice*
  Adobe Type Basics Fonts/{cob,cobo,com,coo}*

Letter Gothic
  Adobe Font Folio Fonts/Letter Gothic/*

Lucida Sans Typewriter                *really nice*
  Adobe Font Folio Fonts/Lucida Sans Typewriter/*

Lucida Typewriter             *really nice*
  Adobe Font Folio Fonts/Lucida Typewriter/*

OCR
  Adobe Font Folio Fonts/OCRA, OCRB, MICR/

Orator
  Adobe Font Folio Fonts/Orator/

Prestige Elite
  Adobe Font Folio Fonts/Prestige Elite/

See http://tldp.org/HOWTO/Bootdisk-HOWTO/cd-roms.html

  • Copy the floppy files to $SRCDIR:

    mount -t vfat -o ro /dev/fd0 /mnt/floppy
    cd $SRCDIR
    cp -p /mnt/floppy/* .
    
  • Copy the floppy image with:

    dd if=/dev/fd0 of=boot/boot.img bs=10k count=144
    
  • Create CD image with:

    mkisofs -r -b boot/boot.img -c boot/boot.catalog -o ../bootcd.iso .
    
  • Burn CD

Mar 082006

Excellent step-by-step for FC4 is at: http://wilsonet.com/mythtv/fcmyth.php

Test System:

  • Dell Dimension GX260 Desktop
  • P4 2.2 GHz, 1 GB DDR 266, 80 GB Seagate Barracuda IV ATA disk
  • HP L1506 1024×768 LCD monitor

IMPORTANT: Set these video settings in BIOS:

AGP Aperture: 32 MB
Video Memory Size:
  8 MB

to get better than VGA resolution (!)

OS Installation

Install FC4 per wilsonet.com step-by-step page above.

Boot installation CD with:

boot: linux jfs resolution=1024x768

Install type: Custom

Manually partition:

Partition   Mount Point   Size (MB)   Format
/dev/hda1   /boot         102         ext3
/dev/hda3   swap          1028        swap
/dev/hda2   /             10237       ext3
/dev/hda5   /video        64950       jfs   (rest of disk)

Other Settings:

  • IP: creampuff.stardust.org 192.168.5.3
  • No firewall, SELinux: Disabled
  • Packages per wilsonet.com, including Development tools, X devel, KDE devel

Initial Setup

Create system user peterp at prompts

/usr/sbin/useradd mythtv # creates w/ uid 501, gid 501

Set up local yum repository and copy over /etc/hosts file to resolve yum hostname

/etc/yum.repos.d/fedora.repo:

[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
baseurl=http://yum/fedora/$releasever/$basearch/base/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

fedora-updates.repo and fedora-extras.repo use /$basearch/{updates,extras}/
in the baseurl (copy them from original files too)

Update all with:

# yum update yum              [ accept importing GPG key ]
# yum upgrade                 [ update 280 and install 9 packages ]

Then reboot.

MythTV

Note: version 19 had major video rebuffering problems, try version 18.1

X Setup

Tricky X setup for i845 motherboard chipset:

In /etc/X11/xorg.conf:

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "LCD Panel 800x600"
        HorizSync    31.5 - 37.9
        VertRefresh  40.0 - 70.0
        Option      "dpms"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "i810"
        VendorName  "Videocard vendor"
        BoardName   "i810 driver"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "800x600" "640x480"
        EndSubSection
EndSection
Sep 122005

hotplug and automount

from the gtkpod README:

You need to install the following external packages:

Write rules for udev to recognize your iPod automatically
(mind the spaces within "iPod…"):

/etc/udev/rules.d/10-ipod.rules:

#
# udev rules for ipod
#
BUS="scsi", SYSFS{model}="iPod            ", KERNEL="sd?2", NAME="%k", SYMLINK="ipod"

This will map /dev/sd?2 to /dev/ipod everytime you plug in your iPod.

Set up autofs to automatically mount the iPod when you access it
and unmount it after 2 seconds of inactivity.
In /etc/auto.master add:

# automount for removable devices:
/var/autofs/removable   /etc/auto.removable     --timeout=2,user,sync,nodev,nosuid,gid=peterp,umask=007

Adjust the gid, umask (and uid) values to whatever you need — in this
example all users in the group "peterp" have read/write access.

In /etc/auto.removable add:

ipod            -fstype=vfat            :/dev/ipod

Then simply add a link from /mnt/ipod:

ln -s /var/autofs/removable/ipod /mnt/ipod

Now accessing the /mnt/ipod link will automount the iPod drive.

gnupod

I used these FC3 packages for gtkpod and faad2 (for libmp4v2):

Make a backup of the iPod iTunesDB:

cp /mnt/ipod/iPod_Control/iTunes/iTunesDB ~/.gtkpod/iTunesDB.orig.bak

Under Linux:

  • Making ISO image:

    % mkisofs -R -o cdroot.iso $CDROOT
    
  • Burning ISO image:

    % cdrecord -v speed=1 dev=/dev/cdwriter -data cdroot.iso
    
  • Checking out ISO image:

    # mount -o loop -t iso9660 -r cdroot.iso /mnt
    

References: http://ntp.isc.org/bin/view/Main/WebHome

Stratum 2 servers, 2005/05/30:

host                          rtt     hops?   ttl     notify  rtt2    rank
----                          ---     -----   ---     ------  ----    ----
ntp.dayww.net                 57      18       46     y
clock.develooper.com          47      18       46     N
eschelon.no-such-agency.net   17      14       50     y       14.6    #2
ntp1.mainecoon.com            24       9      246     y       21.8    #3
ntp1.sf-bay.org               13      13       51     y       12.8
ntp2.mainecoon.com            22       9       55     y       22.0    (#7)
ntp2.sf-bay.org               27      18       46     y       27.2    (#6)
ntp.ucsd.edu                  30      17       47     y       26.8    #5
reloj.kjsl.com                15      13      242     y       12.5    #1
time.berkeley.netdot.net      22      11       53     y       20.8    #4
ntp1.linuxmedialabs.com       58      21       43     N
rolex.usg.edu                 82      20      235     y
ntp-1.cso.uiuc.edu            80      21      234     N
harbor.ecn.purdue.edu         72      22      233     N
ntp1.kansas.net               58      13       51     N
cuckoo.nevada.edu             34      16      239     y       31.9
tick.cs.unlv.edu              35      19      236     y       32.6
ntppub.tamu.edu               64      20       44     N
chrono.cis.sac.accd.edu       67      18       46     N
Feb 152005

magic(5) style files are used to associate magic file signatures with mime types for KDE applications. These are located in:

KDEBASE/share/config/magic/*.magic

Look in /usr/share/templates for .desktop files that define the contents
of the:

Create New -> ...

desktop menus.

Update in 2006: Note that this has all become much easier with developments in hal and friends.

USB hotplug setup for flash memory storage devices, e.g. Photosmart 370 printer:

/etc/hotplug/usb.agent looks in usb.usermap to find entries for a device.

  1. Add to usb.usermap:

    usb-storage          0x0003      0x03F0   0x1302    0x00    ...
    # ^                    ^           ^        ^
    #driver               flags       vendorid productid
    #                     [0x3==vendor&product]
    

    In hotplug.functions load_drivers(), if the driver is usb-storage, it runs
    /usr/sbin/updfstab to add an fstab entry for the new device.

  2. To support updfstab, add to /etc/updfstab.conf:

    device photoprinter {
        symlink true
        partition 1
        match   hd Photosmart
    }
    

    where:

    photoprinter

    is the device name

    symlink true

    makes a link /dev/photoprinter -> /dev/sd?1

    match hd

    "Photosmart" is a string to match in the hw description

    updfstab will add an fstab entry for the device with noauto,owner,kudzu
    so the device owner can mount/unmount.

    updfstab then runs {{{/sbin/pam_console_apply}}} to update device permissions for the console user.

  3. Change /etc/security/console.perms:

    <flash>=/mnt/flash* \
            /dev/photoprinter
    
    <console>  0600 <flash>      0660 root.disk
    

    to add /dev/photoprinter to <flash> devices and set permissions.

Note that pam_console_apply will follow the /dev/photoprinter symlink
when setting permissions, so the console user (now the owner) can
mount and unmount the device.

© 2012 blog.pletcher.net Suffusion WordPress theme by Sayontan Sinha