Hard drive

2005-05-24 update: I got a new external harddrive and put it in the portable enclosure. I had to reboot for the drive to be attached correctly, but in the process I discovered that the bios supports booting from an external USB drive! So this is cool -- you could have a machine that has nothing on it and just drives the hard drive.

To format it, just use qtparted -- right-click on /dev/sda and select "Create a new partition table". I added these partitions, building up from four primary partitions:

  • Boot partition
    • 250MB for /boot
  • Windows
    • 10GB WinXP
  • Linux
    • 10GB for primary /
  • Extended
    • Linux
      • 01GB for /home
      • 10GB for secondary /
      • 01GB swap
    • Windows
      • 10GB FAT32 partition for WinXP user files
    • Storage
      • 10GB for user files
      • 14GB for storage
      • 14GB unformatted
  • Total  80GB
Here's how to see the geometry and the partitions: fdisk -l -u /dev/sda

See guide.

  • I set ide0=ata66 in lilo to get the 100MHz bus and DMA5
  • I added "hdparm -c 1 -m 16 -S 242 -k 1 /dev/hda" to /etc/init.d/bootmisc.sh
Large hard drives in Linux -- Andries Brower's guide

Copying over the current root directory (cf. instructions)
  • mkdir /spare/bin
    cd /bin
    tar -cSpf - . | tar -xvSpf - -C /spare/bin
  • I did this to each of the following directories individually:
    • /bin, /dev (maybe shouldn't have), /etc, /lib, /root, /sbin, /usr, /var
  • that leaves /proc, /sys, /tmp, and /mnt
  • /mnt I did manually (creating directories)
  • /boot is on its own partition, /dev/sda1
  • /home is on its own partition, /dev/sda5
  • Then I copied /vx to the new /vx on /dev/sda9
I also modiefied /etc/fstab to reflect the /sda location of the partitions, in preparation for booting off the external drive. I changed lilo and it seemed to work. To boot from /sda, I'll have to change something in the BIOS setup. It would be a test before swapping in the new drive.

In the meantime, I chrooted into the partition. df doesn't work (it still shows the internal drive), but fdisk -l -u /dev/sda does, and so does du.

Now, what about the Windows partition? Can that also be copied over? Using what? dd? Try these instructions:

dd if=/dev/hda1 of=/dev/sda2 bs=4096
That's clearly the idea! That should copy the filesystem and the files in one go. So that's how you do it. Note that the external file system is not mounted.  I got this receipt:
1279167+1 records in
1279167+1 records out
5239471104 bytes transferred in 14543.317644 seconds (360267 bytes/sec)
Afterwards, you need to expand the file system -- you should be able to do this with qtparted, but you could also do it by booting into Windows? Try qtparted -- just resize the partition. Afterwards run scandisk within WinXP.

2005-05-20 update: I'm buying a new drive, a Toshiba Super Slimline MK8026GAX -- Toshiba Customer Support (949) 457-0777 -- so we'll see if I can transfer everything to it. This drive has 16MB cache, runs at 5400rpms, and has twice the storage.  See formatting instructions.

hdparm gives part number IC25N040ATCS04-0, which is a Travelstar 40GN. It registers as UDMA(33), but a google suggests it supports UDMA(100). On the 2.6 kernel, I can pass ide0=ata66 and get this:

hda: 78140160 sectors (40007 MB) w/1768KiB Cache, CHS=4864/255/63, UDMA(100)
So it has a 2MB cache.  Here's hdparm -tT /dev/hda:
Timing cached reads:   1164 MB in  2.00 seconds = 581.51 MB/sec
Timing buffered disk reads:   60 MB in  3.05 seconds =  19.68 MB/sec

Twice as fast buffer cache reads as on UDMA(33) under the 2.4 kernel --

sigillo's hda:
Timing buffer-cache reads: 128 MB in 0.44 seconds =290.91 MB/sec
Timing buffered disk reads: 64 MB in 3.22 seconds = 19.88 MB/sec

spello's hda3:
Timing buffer-cache reads: 128 MB in 0.82 seconds =156.10 MB/sec
Timing buffered disk reads: 64 MB in 3.34 seconds = 19.16 MB/sec

spello's hde1:
Timing buffer-cache reads: 128 MB in 0.83 seconds =154.22 MB/sec
Timing buffered disk reads: 64 MB in 1.66 seconds = 38.55 MB/sec

So I guess the buffer is larger, but the disk reads not as fast as the on the Promise 133 cards.

Disk information:

Model=IC25N040ATCS04-0, FwRev=CA4OA71A, SerialNo=CSH405DCLW5UVB
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=DualPortCache, BuffSize=1768kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 *udma2 udma3 udma4 udma5
AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3: 2 3 4 5

See guide.

  • I set ide0=ata66 in lilo to get the 100MHz bus and DMA5
  • I added "hdparm -c 1 -m 16 -S 242 -k 1 /dev/hda" to /etc/init.d/bootmisc.sh
Nice results:

hda: 78140160 sectors (40008 MB) w/1768KiB Cache, CHS=77520/16/63, UDMA(100)

root@sigillo:/fuma/iso# hdparm -i /dev/hda

/dev/hda:

 Model=IC25N040ATCS04-0, FwRev=CA4OA71A, SerialNo=CSH405DCLW5UVB
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=DualPortCache, BuffSize=1768kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=78140160
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: mode=0x80 (128) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:  2 3 4 5

root@sigillo:# hdparm -tT /dev/hda

/dev/hda:
 Timing buffer-cache reads:   128 MB in  0.45 seconds =283.23 MB/sec
 Timing buffered disk reads:  64 MB in  3.23 seconds = 19.79 MB/sec
In March 2004, I get this result:
/dev/hda:
 Timing buffer-cache reads:   1092 MB in  2.00 seconds = 545.27 MB/sec
 Timing buffered disk reads:   54 MB in  3.01 seconds =  17.95 MB/sec
Could this be due to a kernel improvement?  In April 2005 I get this:
/dev/hda:
 Timing cached reads:   1152 MB in  2.00 seconds = 575.51 MB/sec
 Timing buffered disk reads:   60 MB in  3.05 seconds =  19.68 MB/sec

root@sigillo:# hdparm /dev/hda

/dev/hda:
 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  1 (on)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 11984/16/63, sectors = 78140160, start = 0


Installing a new hard drive

Disassembling a VPR widescreen is doable but difficult. Be careful not to lose any screws... there are quite a few to remove (23 by my count, including hard drive screws).

To remove the HD:

  1. Disconnect power and remove the battery.
  2. Remove 13 screws from the bottom of the laptop. Do not remove the four screws securing the two panels for memory and network.
  3. Remove the keyboard. There are three clips at the top of the keyboard (right above the function keys) that can be pushed back to release the keyboard. Be gentle. Lift the keyboard up and you will see a ribbon cable tying the keyboard to the motherboard. Disconnect the ribbon cable from the motherboard by (gently) pulling out the two little white tabs on either side of the ribbon cable socket. The ribbon cable should now slide out of the socket with almost no effort. 
  4. Using the same technique as above, disconnect a small ribbon cable that connects the motherboard to the LED's and power switch. the connector is located (roughly) below where the "PG UP" key would be with the keyboard installed.
  5. Disconnect the two connectors for the LCD. They would be located beneath the "F7" and "F8" keys if the keyboard was installed.
  6. Disconnect a small connector located to the right of the where the space key would be.
  7. Remove two screws located under the keyboard securing the top part of the case to the base. The screws are located to the right of the space key and under the Windows symbol key. The top part of the case should now be loose.
  8. This part is a little tricky. Lift the top part of the case an inch or so from the bottom and look inside. You will see another ribbon cable connecting the touchpad to the motherboard. Disconnect the ribbon cable from the motherboard by pullling out the white tabs on the socket and sliding out the ribbon cable. You should now be able to lift the top part of the laptop off. If you feel any resistance, check and double check to see of any wires or screws are still connected.
  9. You will now see the hard drive enclosure on the left side under where your left palm rest would be. Gently disconnect the ribbon cable connecting the HD to the motherboard.
  10. There are four screws securing the HD enclosure to the case. Remove the screws and you will be able to lift the enclosure from the laptop.
  11. Remove the four screws holding the HD to the enclosure. You should now be able to slide the hard drive out.
  12. Remove the ribbon cable from the hard drive. Be VERY careful. It is easy to bend the pins on the hard drive as one side of the connector will try to come out before the other. Take it slow and be careful.
  13. You should now be able to install the hard drive in a USB enclosure and connect it to another computer for file retrieval.
  14. The installation process is essentially the reverse of the above instructions. Ensure all connectors are securely reseated and make sure that all the little white tabs on the ribbon cable sockets are pushed in.

Source

See also how to eliminate the buzzing sound from your screen.


 

 

top
Debate
Evolution
CogSci

Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles


CogWeb