18 August 2009

Installing a SEAGATE FreeAgent USB disk drive on Linux is easy

After my sucess in July 2008 of installing a USB disk drive on Linux I did it again today. This time I needed to partition the USB disk drive.

The steps were:

Plug the USB disk drive onto a Windows XP (home) PC. The USB disk drive was a Seagate FreeAgent Desk external 500GB drive USB 2.0. The PC only had USB 1 ports but it worked fine.

I then copied the files from the disk (about 90MBytes) to my PC.

Then I used the Windows Disk Manager (Settings->Control Panel->Administrative Tools->Computer Management->Storage->Disk Management) to partition the disk into 4 partitions. The first was around 90MBytes for the NTFS. The next three were deined in a logical partition. They were set as FAT32 or NTFS - at this point it does not really matter what the file system is as they will be changed in Linux.

I then unpluged the USB cable from the PC and plugged it into a USB port on my Linux machine. Then on the Linux machine:


  1. As root (su command)

    1. /sbin/fdisk /dev/sda

      1. p (to show and verify the partions)
      2. Changed the three logical partitions (partitions 5, 6 and 7) to have an id of 83 - Linux partition
      3. w (to write table to disk and exit)

    2. /sbin/blockdev --rereadpt /dev/sda
    3. /sbin/mkfs.ext2 /dev/sda5 (being a 24 GByte partition, this took several minutes)
    4. /sbin/mkfs.ext2 /dev/sda6 (being a 3 GByte partition, this took a few minutes)
    5. /sbin/mkfs.ext2 /dev/sda7 (being a 355 GBytes disk, this took around 2 1/2 hours)
    6. mkdir /backups
    7. mkdir /backups/p1
    8. mkdir /backups/p2
    9. mkdir /backups/p3
    10. mount /dev/sda5 /backups/p1
    11. mount /dev/sda6 /backups/p2
    12. mount /dev/sda7 /backups/p3




It really was as easy as that. Considering that the version of Linux (Red Hat Linux release 7.2 Enigma ) was over 7 years old and it was running on a Pentium processor (not even a Pentium 2), that is very impressive

No comments: