Dryad

From Oh Mad Lab
Jump to navigation Jump to search

Dryad - Mom's Desktop

Specifications

Brand Model Description Link Price
AMD Athlon II X2 / ADX250OCGMBOX Athlon II X2 250, Regor, 64Bit, 0.85V - 1.4V, 65W, 3.0GHz, 2x1MB L2 Cache, Socket AM3 Dual-Core Manufacture
Purchased
$58.99
ASRock K10N78M-PRO AMD AM3/AM2+/AM2, D-Sub+DVI, FSB:2600MHz HT (5200 MT/s)
North Bridge:NVIDIA GeForce 8200, LAN: Realtek 8211CL, Audio:Realtek ALC662
Manufacture
Purchased
$51.99
G.SKILL F2-8500CL5D-4GBPK 2x2GB 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500), CL5, 5-5-5-15, 2.0v-2.1v Manufacture
Purchased
$89.99
Western Digital Caviar Blue / WD10EALS 1TB 7200 RPM 32MB Cache SATA 3.0Gb/s
Firmware: ??
P/N:??
Date Code: ??
Manufacture
Purchased
$69.99
LOGISYS Computer CS305BK Black Steel ATX Mid Tower Enhanced SOHO Computer Case 480W Power Supply Manufacture
Purchased
$32.99

BIOS Configuration

  • Default BIOS options / Nothing changed

Boot Up Errors

  • I installed AMD64 Debian 5.0.7 / Lenny with a desktop environment
    • 3 partitions:
      • sda1 boot primary ext3 @ 500105.25MB
      • sda2 primary @ 488680.34MB
      • sda3 logical swap @ 11417.69MB


Error 1

  • I was seeing the following error at boot up:
 Your BIOS doesn't leave a aperture memory hole
 Please enable the IOMMU option in the BIOS setup
 This costs you 64 MB of RAM
  • To fix the above message, I added "iommu=noagp,noaperture" to the kernel line. Based on some research and a bunch of googling, it appears this issue is somewhat related to the fact that I don't have an AGP card. Either way, the two values for the iommu kernel parameter mean the following:
 noagp = Don't initialize the AGP driver and use full aperture.
 noaperture = Ask the IOMMU not to touch the aperture for AGP.

Error 2

  • I was also seeing the following error at boot up:
 PCI: Not using MMCONFIG.
  • To fix the above message, I added "pci=nommconf" to the kernel line. Based on some research I understand that the "pci=nommconf" parameter tells the kernel to ignore mmconfig when identifying PCI devices, thus it will use other methods to identify PCI devices such as the BIOS or direct querying. With that said, I checked the all the pci devices with "lspci -v" and they all appear to be detected properly with the "pci-nommconf" parameter.

Error 1 & 2 Solution

  • Tweaks to fix the above boot errors is as follows:
 vim /boot/grub/menu.lst
kernel          /boot/vmlinuz-2.6.26-2-amd64 root=UUID=481003fb-06a2-4036-a11a-7179dc79a13a ro quiet iommu=noagp,noaperture pci=nommconf

Initial Configuration

  • I installed the following packages:
 aptitude install ssh binutils killall gcc make build-essential linux-headers-`uname -r` 
  • Configured sshd to deny remote root login
 vim /etc/ssh/sshd_config
  • Find and change "PermitRootLogin yes" to "PermitRootLogin no", as such:
 PermitRootLogin no

Installed Latest Nvidia Drivers

  • I went nvidia's website and downloaded the latest 64 bit driver for linux. Here is the link I used for version 260.19.21. I suggest searching for your exact card as I'm sure there's been updates.
  • Make a folder in the share folder:
mkdir -p /share/nvidia
  • Copy the folder to the share folder:
mv ~/Desktop/NVIDIA-Linux-x86_64-260.19.21.run /share/nvidia
  • Ran the script from a console as it didn't like doing it with X loaded:
CTRL+ALT+F1
  • Log in as root
cd /share/nvidia
/etc/init.d/gdm stop
sh NVIDIA-Linux-x86_64-260.19.21.run
  • It prompt asking about installing 32-bit compatibility and I felt generous so I said yeah, go for it
  • It also complained about my compiler being newer than what the kernel was compiled for, but I didn't care much
  • Reboot for ease of finalizing the install:
reboot
  • Once you login, you should now see the nvidia setup menu item under System->Preferences and you can tweak as desired
  • I had to turn off vsync as it seemed to be affecting ET's brightness setting by making the screen go darker

Backup for Windows (partimage)

  • Installed rsync and partimage
su
aptitude install rsync partimage
  • Copied Windows Backup Files
mkdir -p /share/backup/windows
  • Restored backups from Muse
cd /share/backup/windows
partimage
  • Chose sda2, tab, then typed "windows_xp_clean.000" for the "Image file to create/use".
  • Tab and selected "Restore partition from an image file"
  • F5 to continue, the rest is fairly self explanatory and not worth mentioning here

Windows Dual Boot

  • Fixed Windows parition
    • Used cfdisk to mark sda2 as boot and type 07 = NTFS
  • Add Windows to Grub
    • Boot into previously installed Linux
    • Open a terminal window, su, and use vim to edit /boot/grub/menu.lst to add the following lines of text:
title Windows
rootnoverify (hd0,1)
makeactive
chainloader +1
  • Save and reboot again and you now have Linux and Windows all happy together

NOTE: To my surprise Windows was NOT happy at all and it just sat there after grub not wanting to boot! Unfortunately Windows stores the starting sector and as I moved to a bigger drive, I obviously didn't know about Windows being so picky. To fix this issue, either you have to match the previous drive layout up to the Windows partition (yeah, like that was going to happen) or go in and get a little dirty by manually changing the address Windows previously saved to the new location (this is what I opted to do).

Fix Windows Starting Sector

  • Install hexedit
aptitude install hexedit
  • Fist, find the new sector containing the Window partition:
fdisk -lu /dev/sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00063fd1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   976768064   488384001   83  Linux
/dev/sda2   *   976768065  1931221844   477226890    7  HPFS/NTFS
/dev/sda3      1931221845  1953520064    11149110    5  Extended
/dev/sda5      1931221908  1953520064    11149078+  82  Linux swap / Solaris
  • From this we see Windows it now at: 976768065 and using gcalctool we know that's 3A384C41 in hex
  • Let's go fix it, shall we:
hexedit /dev/sda2
00000000   EB 52 90 4E  54 46 53 20  20 20 20 00  02 08 00 00  .R.NTFS    .....
00000010   00 00 00 00  00 F8 00 00  3F 00 FF 00  82 0E 3C 33  ........?.....<3
  • See the second line containing "82 0E 3C 33"? Well, that's the old location of 0x333C0E82 which is 859573890 as you can see from the fdisk -lu /dev/sda dump from the previous computer:
Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00087e51

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63   840038849   420019393+  83  Linux
/dev/sda2       840038850   859573889     9767520    5  Extended
/dev/sda3   *   859573890  1054908224    97667167+   7  HPFS/NTFS
/dev/sda5       840038913   859573889     9767488+  82  Linux swap / Solaris
  • In hexedit, go to the "82 0E 3C 33" and write the new address 3A384C41 as "41 4C 38 3A"
  • Press CRTL+X and answer Y to save and exit
  • Reboot again and magic shall occur, well okay... maybe not, but Windows will now boot

Final Touches

Fixed Partition

  • I had to boot back into Linux and use gparted to shrink the partition down, then back into Windows for it to run chkdsk automatically at boot, then back to Linux used gparted again to resize back to what it was set to, and once again into Windows in order for chkdsk to realize the size of the partition grew.

Mem86+

aptitude install memtest86+
cat /usr/share/doc/memtest86+/examples/grub-menu.lst >> /boot/grub/menu.lst
  • Clean up the memtest86+ entry
vim /boot/grub/menu.lst
  • I ran memtest86+ all night and it passed with flying colors