Hits: 5276
Today a simple trick.
It is sometimes needed for us, amigans, to access the internal hard drive (or compact flash) that fits normaly inside our beloved Amiga 1200.
Many articles around the internet speak about accessing it from Win-UAE under Windows, but I did not find many of them speaking about accessing it under Ubuntu.
Fortunately for us, linux include FFS support natively in the kernel. Anyway, it is not automatic, and we have some steps to follow to mount it.
I assume you know how to disconnect the drive from inside your A1200, and how to connect it to your ubuntu box. I will only speak about terminal commands there.
Contents
Know the physical device the HD mounts on :
First, run this command WITHOUT the drive connected :ls -la /dev/sd*
you should get something like this.
jess@hades:~$ ls -la /dev/sd*
now, connect the amiga hd/cf to your computer and let’s launch the same command.
brw-rw-- – 1 root disk 8, 0 Apr 11 14:16 /dev/sda
brw-rw-- – 1 root disk 8, 1 Apr 11 14:16 /dev/sda1
brw-rw-- – 1 root disk 8, 2 Apr 11 14:16 /dev/sda2
brw-rw-- – 1 root disk 8, 3 Apr 11 14:16 /dev/sda3
brw-rw-- – 1 root disk 8, 16 Apr 11 14:16 /dev/sdb
brw-rw-- – 1 root disk 8, 17 Apr 11 14:16 /dev/sdb1
brw-rw-- – 1 root disk 8, 18 Apr 11 14:16 /dev/sdb2
brw-rw-- – 1 root disk 8, 21 Apr 11 14:16 /dev/sdb5
brw-rw-- – 1 root disk 8, 22 Apr 11 14:16 /dev/sdb6
brw-rw-- – 1 root disk 8, 32 Apr 11 14:16 /dev/sdc
brw-rw-- – 1 root disk 8, 33 Apr 11 14:16 /dev/sdc1
brw-rw-- – 1 root disk 8, 34 Apr 11 14:16 /dev/sdc2
brw-rw-- – 1 root disk 8, 48 May 2 15:56 /dev/sdd
brw-rw-- – 1 root disk 8, 64 Apr 11 14:16 /dev/sde
brw-rw-- – 1 root disk 8, 80 Apr 16 14:21 /dev/sdf
brw-rw-- – 1 root disk 8, 96 Apr 11 14:16 /dev/sdg
brw-rw-- – 1 root disk 8, 112 Apr 11 14:16 /dev/sdh
jess@hades:~$ ls -la /dev/sd*
brw-rw-- – 1 root disk 8, 0 Apr 11 14:16 /dev/sda
brw-rw-- – 1 root disk 8, 1 Apr 11 14:16 /dev/sda1
brw-rw-- – 1 root disk 8, 2 Apr 11 14:16 /dev/sda2
brw-rw-- – 1 root disk 8, 3 Apr 11 14:16 /dev/sda3
brw-rw-- – 1 root disk 8, 16 Apr 11 14:16 /dev/sdb
brw-rw-- – 1 root disk 8, 17 Apr 11 14:16 /dev/sdb1
brw-rw-- – 1 root disk 8, 18 Apr 11 14:16 /dev/sdb2
brw-rw-- – 1 root disk 8, 21 Apr 11 14:16 /dev/sdb5
brw-rw-- – 1 root disk 8, 22 Apr 11 14:16 /dev/sdb6
brw-rw-- – 1 root disk 8, 32 Apr 11 14:16 /dev/sdc
brw-rw-- – 1 root disk 8, 33 Apr 11 14:16 /dev/sdc1
brw-rw-- – 1 root disk 8, 34 Apr 11 14:16 /dev/sdc2
brw-rw-- – 1 root disk 8, 48 May 2 15:57 /dev/sdd
brw-rw-- – 1 root disk 8, 49 May 2 15:57 /dev/sdd1
brw-rw-- – 1 root disk 8, 50 May 2 15:57 /dev/sdd2
brw-rw-- – 1 root disk 8, 51 May 2 15:57 /dev/sdd3
brw-rw-- – 1 root disk 8, 64 Apr 11 14:16 /dev/sde
brw-rw-- – 1 root disk 8, 80 Apr 16 14:21 /dev/sdf
brw-rw-- – 1 root disk 8, 96 Apr 11 14:16 /dev/sdg
brw-rw-- – 1 root disk 8, 112 Apr 11 14:16 /dev/sdh
Normally, your ubuntu see some more devices. I’ve bolded them. This is where your volumes are recognized.
Getting more informations on the volume :
Disk /dev/sdd: 7994 MB, 7994327040 bytesjess@hades:~$ sudo fdisk -l /dev/sdd
This does not give us many informations, but at least we can see it is certainly FFS (512 bytes sector size), and that is seems healthy, as it is simply recognized by the system.
[sudo] password for jess:
246 heads, 62 sectors/track, 1023 cylinders, total 15613920 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdd doesn't contain a valid partition table
Mount the amiga hard drive :
We now know how to see which devices the amiga hd is, so now it is time for mounting it. Automount does not work (at least there with my Ubuntu 12.04LTS server light install). The filesystem FFS, for ubuntu, is known as “AFFS”. Here I’ll just mount the volume inside the common /mnt directory. The command should then be, for sdd1 partition (most commonly the SYS: partition of your amiga) :sudo mount -t affs /dev/sdd1 /mnt
So let’s mount :
jess@hades:~$ sudo mount -t affs /dev/sdd1 /mnt
mount: warning: /mnt seems to be mounted read-only.
get into it and list the files:
jess@hades:~$ cd /mnt
jess@hades:/mnt$ ls
C Games Programs T.info
C.info Games.info Programs.info Tools
Classes Icons Rexxc Tools.info
Classes.info Icons.info Rexxc.info Trashcan
Demos L S Trashcan.info
Demos.info Libs S.info Utilities
Devs Libs.info StartupSequenceBCK.abs Utilities.info
Devs.info L.info Storage WBGames
Disk.info Locale Storage.info WBGames.info
ENV Locale.info System WBStartup
Expansion MyFiles System.info WBStartup.info
Expansion.info MyFiles.info T WBStartupM
Fonts Prefs Temp
Fonts.info Prefs.info Temp.info
Isn’t it pretty great ?
Remount it in R/W :
jess@hades:/$cd /
jess@hades:/$ sudo mount -o remount,rw /dev/sdd1 /mnt
Maybe there could be a better way to do this, but when I try the “-o rw” in the mount command, it still mount it as read only.
Geting back to your Amiga :
When I got back to my amiga, linking back my CF to my system and booting up, it didn’t see my files, but the filesystem was 700Mb in use, about the size I’ve copied to it…
Using disksalv with “salvage” mode. I got the files, but it took hours.
Did I umount badly the volume under linux ?
I’ll search the solution later…
Usefull ressources :
– technical information on the FFS implementation in linux : http://home.elka.pw.edu.pl/~mszyprow/programy/asfs/asfs.txt
– just a page with a “yes, you can do it” : http://www.tldp.org/FAQ/Linux-FAQ/partitions.html#can-linux-access-amiga-file-systems
– the wikipedia speaking about SFS file system : http://en.wikipedia.org/wiki/Smart_File_System
– some informations on “how you mount an unknown filesystem” in ubuntu : http://askubuntu.com/questions/95391/how-do-i-mount-an-sd-card
– a very nice article which does different things, with a kernel that does not support FFS : http://gareth.halfacree.co.uk/2013/03/mounting-amiga-ffs-hard-drives-under-linux