2005-11-03

Spiral Rebuild

It's time to upgrade Spiral, my FreeBSD server, from version 4.10 to 5.4 (the latest STABLE release)

An initial install of FreeBSD is pretty easy, so I've skipped that part...

Mitch/Graphicgreen gave me a new 9GB SCSI hard disk. I took the Adaptec SCSI controller out of wounded (also being rebuilt), put it into Spiral, and attached the new SCSI drive and SCSI CD-ROM

FreeBSD 5.4 was installed on the new SCSI drive, so that I would not have to clear any existing data. After having made that much progress - getting the SCSI hardware installed and boot-worthy with FreeBSD 5.4 running - the goal is now to restore all of the services that Spiral provided me:

  • 250 GigaBytes of storage available on my network, accessible to computers running Microsoft Windows, for housing my digitized movie and music collection, among other things.
  • What I call a "Persistent Remote Desktop" - computers running UNIX-like operating systems like Linux and FreeBSD do not need to be rebooted often, unlike Microsoft Windows. So, I run XWindows on Spiral, which I can connect to from anywhere with an internet connection. In essence, I can access my desktop from virtually anywhere, with all my files, email, messaging, and much more, always at my finger-tips.
  • Apache web-server.

Anyhow! I need to mount the old file-systems on the IDE hard disks, which contain the data from when FreeBSD 4.10 was operating. They should mount with every boot, since it will take me a while to restore all the services and data.

The IDE hard disk detection at boot-time:

1) ad0 19456MB <SAMSUNG SV2042H/PK100-16> [39549/16/63] at ata0-master UDMA100
2) ad2 238475MB <WDC WD2500JB-00GVA0/08.02D08> [484521/16/63] at ata1-master UDMA100

The first disk is the
20GB disk that houses the system and user files.

The second is a 250GB
data-drive, which was made accessible to the network via Samba.

FreeBSD Disklabel Editor output for disk ad0:

Part

Mount

Size (MB)

ad0s1a

<none>

128

ad0s1b

swap

496

ad0s1e

<none>

256

ad0s1f

<none>

256

ad0s1g

<none>

18325

ad0s1g must contain the user data, since it is the largest. I made a directory /mnt/spiral1g to mount /dev/ad0s1g with the command “mount /dev/ad0s1g /mnt/spiral1g”. I could now use “ls” to list the files in there. The “home” directory (user-data) and other good stuff was inside.

I followed the same process to mount the other partitions.

ad0s1a contains kernel files, so it must have been “/” aka “root”.

ad0s1b gave me an “incorrect super block” error when I tried to mount it. I know, I know, it's “swap”...

ad0s1e contains “cron”, “mail”, and other system-stuff.

ad0s1g must have been “/tmp”, since it contains lots of jibberish that is typical for that directory/partition/file-system.

Now I can “ee /etc/fstab” and have the old file-systems mounted automatically.

After a reboot, the four mountable partitions are all hooked up with their respective /mnt/ mount-points.

A quick check with disklabel on /dev/ad2 shows only one partition: ad2s1e

I added it to /etc/fstab, mounting on /liberty, just like it used to. mkdir /liberty; reboot

The 250GB data-drive and all of the file-systems (other than swap, of course) mount automatically and are accessible for me to restore what I need from Spiral's days of FreeBSD 4.10.

Reference:

Frequently Asked Questions for FreeBSD 4.X, 5.X, and 6.X - Chapter 9 Disks, Filesystems, and Boot Loaders

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home