Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
system_tools:microsd [2019/11/11 03:34]
muaddib [Overview]
system_tools:microsd [2020/03/15 19:54] (current)
muaddib [4) Prepare and run MountLists for the SD card]
Line 5: Line 5:
 ===== Overview ===== ===== Overview =====
  
-''Jason Mac Mullan'' kindly develops and maintains the SAGA SDCard Driver to be used with the ''MicroSD slot'' of the ''Vampire'' boards. This device can be used as an additional disk for use with your ''AmigaOS 3.x'' setup.+''Jason Mac Mullan'' kindly develops and maintains the SAGA SD driver to be used with the ''MicroSD slot'' of the ''Vampire'' boards. This device can be used as an additional disk for use with your ''AmigaOS 3.x'' setup.
  
   * The driver is still in a ''beta'' stage. Always **BACK UP** your data before using such a piece of software, until you are sure that everything works as expected.   * The driver is still in a ''beta'' stage. Always **BACK UP** your data before using such a piece of software, until you are sure that everything works as expected.
  
 <callout type="info" icon="true"> <callout type="info" icon="true">
-It is possible to insert standard-size SD cards into the ''MicroSD slot'' using a simple adapter (explained [[vampire:microsd|here]]). Therefore, for brevity, the "Micro" prefix will be omitted, and only "SD card" will be used in this article.+It is possible to insert standard-size SD cards into the ''MicroSD slot'' using a simple adapter (explained [[vampire:microsd|here]]). Therefore, for brevity, the "Micro" prefix will be omitted, and only "SD card" will be used in this article and in other places in this Wiki.
 </callout> </callout>
  
Line 19: Line 19:
 {{:warning-icon.png?nolink&48|}} {{:warning-icon.png?nolink&48|}}
  
-The current SAGA SD Driver does **NOT** implement - in its current version - the ''AUTOMATIC'' disk drive geometry methods that would allow AmigaOS DOSDrivers MountLists to use some handy default values. As a consequence, keep in mind that:+The current SAGA SD driver does **NOT** implement - in its current version - the ''AUTOMATIC'' disk drive geometry methods that would allow AmigaOS DOSDrivers MountLists to use some handy default values. As a consequence, keep in mind that:
  
   - ''MountList'' attributes such as ''LowCyl'', ''HighCyl'' and some others must be explicitly specified. For example, ''LowCyl = 0'' will **NOT** work!   - ''MountList'' attributes such as ''LowCyl'', ''HighCyl'' and some others must be explicitly specified. For example, ''LowCyl = 0'' will **NOT** work!
Line 31: Line 31:
 {{:install-icon.png?nolink&48|}} {{:install-icon.png?nolink&48|}}
  
-The installation of the SDCard on the Vampire requires some files, provided in the SAGA driver package and some additional tools available on Aminet. Please, follow the following procedure step by step:+The installation of the SD card on the Vampire requires some files, provided in the SAGA Drivers package and some additional tools available on Aminet. Please, follow the following procedure step by step:
  
-==== 1.1) Install the SAGA SD Driver ====+==== 1.1) Install the SAGA SD driver ====
  
-  - Run the installer provided in the [[saga:updates|SAGADriver package]].+  - Run the installer provided in the [[saga:updates|SAGA Drivers package]].
  
 ==== 1.2) Install SCSIQuery (optional) ==== ==== 1.2) Install SCSIQuery (optional) ====
Line 53: Line 53:
 Other filesystems to consider: Other filesystems to consider:
   * [[http://aminet.net/package/disk/misc/SFS|SFS]]   * [[http://aminet.net/package/disk/misc/SFS|SFS]]
-  * [[http://aminet.net/package/disk/misc/fat95|FAT95]] (already included in the SAGA driver package)+  * [[http://aminet.net/package/disk/misc/fat95|FAT32]] (already included in the SAGA Drivers package)
   * [[http://aminet.net/package/disk/misc/ext2fs_0.41|ext2/ext3]]   * [[http://aminet.net/package/disk/misc/ext2fs_0.41|ext2/ext3]]
  
Line 64: Line 64:
 {{:sdcard.png?nolink&48|}} {{:sdcard.png?nolink&48|}}
  
-The SAGA SD Driver (''sagasd.device'') provides a method to ''READ GEOMETRY'' of the disk. First step is to check if your SD card is compatible or not.+The SAGA SD driver (''sagasd.device'') provides a method to ''READ GEOMETRY'' of the disk. First step is to check if your SD card is compatible or not.
  
   - Insert your card into the dedicated Vampire ''MicroSD slot''.   - Insert your card into the dedicated Vampire ''MicroSD slot''.
Line 71: Line 71:
     * If you get an error, then your card will **NOT** work with the driver.     * If you get an error, then your card will **NOT** work with the driver.
     * If you get information such as ''Block Size'', ''Blocks'' and ''Capacity'', then your card should work with the driver.     * If you get information such as ''Block Size'', ''Blocks'' and ''Capacity'', then your card should work with the driver.
-  - Additionally, type ''SCSIQuery'' to double-check the geometry of your SDCard.+  - Additionally, type ''SCSIQuery'' to double-check the geometry of your SD card.
     * Check if ''Capacity in blocks'' is the same as ''Blocks'' shown in ''SDDiag''.     * Check if ''Capacity in blocks'' is the same as ''Blocks'' shown in ''SDDiag''.
     * Check if ''Block length'' is the same as ''Block Size'' shown in ''SDDiag''.     * Check if ''Block length'' is the same as ''Block Size'' shown in ''SDDiag''.
Line 86: Line 86:
 **Different options for different uses:** **Different options for different uses:**
  
-  * Prepare the card on ''Vampire'' using ''HDToolBox'' with a given ''FileSystem''.+  * Prepare the card on ''Vampire'' using ''HDToolBox'' with a given filesystem.
     * See "Tutorial: Preparing the SD card on a Vampire" below for a detailed guide.     * See "Tutorial: Preparing the SD card on a Vampire" below for a detailed guide.
-  * Prepare the card on ''WinUAE'' or ''FS-UAE'' using ''HDToolBox'' with a given ''FileSystem''+  * Prepare the card on ''WinUAE'' or ''FS-UAE'' using ''HDToolBox'' with a given filesystem
-  * Prepare the card on ''Windows'' or ''Linux'' using ''FAT95''''ext2'' or ''ext3'' FileSystems.+  * Prepare the card on ''Windows'' with the ''FAT32'' filesystem. 
 +  * Prepare the card on ''Linux'' with the ''ext2'' or ''ext3'' filesystem. 
 +    * If you want to prepare the card on ''Linux'' with the ''FAT32'' filesystem, see "Issue: Preparing the SD card with FAT32 on Linux" below.
  
 ---- ----
Line 99: Line 101:
   - Type ''Execute SYS:System/SDMountOnOff''.   - Type ''Execute SYS:System/SDMountOnOff''.
     * This script uses ''C:GiggleDisk'' to read the SD partitions table, and creates one MountList per partition in ''T:SDMount'' directory.     * This script uses ''C:GiggleDisk'' to read the SD partitions table, and creates one MountList per partition in ''T:SDMount'' directory.
-    * GiggleDisk should detect each partition'FileSystem automatically, as long as you have that filesystem installed.+    * GiggleDisk should detect each partition'filesystem automatically, as long as you have that filesystem installed.
     * The script then attempts to mount each partition.     * The script then attempts to mount each partition.
   - Type ''CD T:SDMount''.   - Type ''CD T:SDMount''.
Line 106: Line 108:
     * Ensure that the ''FileSystem'' attribute has been set correctly.     * Ensure that the ''FileSystem'' attribute has been set correctly.
     * Repeat this verification for the other partitions in that directory (''SD1'', ''SD2'', etc.).     * Repeat this verification for the other partitions in that directory (''SD1'', ''SD2'', etc.).
-  - Type ''Copy ALL TO SYS:Storage/DOSDrivers/'' to store the MountLists permanently. +  - Type ''Copy ALL TO SYS:Storage/DOSDrivers/'' to store the MountLists permanently.  After every reboot, you will need to re-mount the SD partitions by running ''Mount SYS:Storage/DOSDrivers/SD?''. If you want to mount them automatically during boot, type ''Copy ALL TO DEVS:DOSDrivers/'' while you are still in the ''T:SDMount'' directory.
-  After every reboot, you will need to re-mount the SD partitions by running ''Mount SYS:Storage/DOSDrivers/SD?''. If you want to mount them automatically during boot, type ''Copy ALL TO DEVS:DOSDrivers/''.+
   - Reboot.   - Reboot.
   - If the partitions have not already been formatted, they will appear ''Uninitialized'' after mounting them, and you will need to format them.   - If the partitions have not already been formatted, they will appear ''Uninitialized'' after mounting them, and you will need to format them.
Line 133: Line 134:
   - Ensure ''Bootable'' is **NOT** checked.   - Ensure ''Bootable'' is **NOT** checked.
   - Click ''Add / Update'' button.   - Click ''Add / Update'' button.
-  - Delete all items (FileSystems) in the list.+  - Delete all items (filesystems) in the list.
   - Click ''Add new File System...'' and select ''L:pfs3_aio-handler''.   - Click ''Add new File System...'' and select ''L:pfs3_aio-handler''.
   - Modify the Identifier ''0x444F5303'' to ''0x50445303''.   - Modify the Identifier ''0x444F5303'' to ''0x50445303''.
Line 145: Line 146:
   - Follow the instructions under "Prepare and run MountLists for the SD card" above.   - Follow the instructions under "Prepare and run MountLists for the SD card" above.
     * For formatting the mounted partition, open a CLI (''newcli'') and type ''C:PFSFormat DEVICE=SD0 NAME=SDCARD1 QUICK FNSIZE=107''.     * For formatting the mounted partition, open a CLI (''newcli'') and type ''C:PFSFormat DEVICE=SD0 NAME=SDCARD1 QUICK FNSIZE=107''.
-      * ALWAYS use ''QUICK'' option on SDCard devices (true for all non-mechanical devices, including CompactFlash).+      * ALWAYS use ''QUICK'' option on SD card devices (true for all non-mechanical devices, including CompactFlash).
       * ''FNSIZE'' stands for 'FileName Size'; max is 107 chars with PFS.       * ''FNSIZE'' stands for 'FileName Size'; max is 107 chars with PFS.
 +
 +----
 +
 +===== Issue: Preparing the SD card with FAT32 on Linux =====
 +
 +If you are using ''mkfs'' on Linux to create an SD card partition with the ''FAT32'' filesystem, then ''mkfs.vfat'' will write the string ''mkfs.fat'' into the ''OEM Name'' field of the boot sector (superblock).  However, GiggleDisk on the Amiga expects to see either the ''MSWIN?.?'' pattern or the ''MSDOS?.?'' pattern in that field, where ''?'' can be any character.
 +
 +The ''OEM Name'' field is an 8-byte string that starts at byte location 3 (the 4th byte) of the boot sector. If you could overwrite this field with an "expected" string, then your SD card partition would be recognized by GiggleDisk correctly.  This can be accomplished using the ''dd'' command on Linux.
 +
 +<callout type="warning" icon="true">
 +Using the ''dd'' command is dangerous.  It could lead to data loss if used incorrectly.  You are at your own risk.
 +</callout>
 +
 +Example:
 +<code bash>
 +echo -n "MSWIN4.1" | sudo dd of=<sd_partition_device_path> bs=1 seek=3 count=8
 +</code>
 +where ''<sd_partition_device_path>'' is the Linux **device path** to the correct partition on your SD card, like ''/dev/mmcblk0p1''.
 +
 +**Finding the device path to the SD card partition:**
 +
 +  * If you have mounted the SD card partition manually, then you already know the **device path**.
 +  * If Linux has automatically mounted the SD card partition, then you can find out the **device path** by examining the output of the ''mount'' command:
 +    * Any modern Linux distribution will mount the partition using either the "volume label" (if set) or the "volume serial number".
 +    * For example, if the volume label (or serial number) is ''C8D5-2EC3'', you can run the following:<code bash>
 +$ mount | grep "C8D5-2EC3"
 +/dev/mmcblk0p1 on /media/steve/C8D5-2EC3 type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
 +</code>
 +    * The **device path** is in the first column (''/dev/mmcblk0p1'').
  
 ---- ----
Line 152: Line 182:
 ===== Additional information ===== ===== Additional information =====
  
-  * Peripheral information: [[vampire:microsd|MicroSD Card Slot]]+  * Peripheral information: [[vampire:microsd|MicroSD Card slot]]
   * Technical information: [[saga:sdcard|SAGA SDCard Core]]   * Technical information: [[saga:sdcard|SAGA SDCard Core]]
-  * SAGA SD Driver sources: [[https://github.com/ezrec/saga-drivers/tree/master/sagasd.device|sagasd.device]]+  * SAGA SD driver sources: [[https://github.com/ezrec/saga-drivers/tree/master/sagasd.device|sagasd.device]]
     * Covered under the ''MIT License''.     * Covered under the ''MIT License''.
-  * Forum: [[http://www.apollo-core.com/knowledge.php?b=1&note=912|SAGA SD Driver News]]+  * Forum: [[http://www.apollo-core.com/knowledge.php?b=1&note=912|SAGA SD driver news]]
   * Video: [[https://vimeo.com/166234723|PFSDoctor test]]   * Video: [[https://vimeo.com/166234723|PFSDoctor test]]
   * Video: [[https://vimeo.com/164901762|SD-Card Filesystem Test]]   * Video: [[https://vimeo.com/164901762|SD-Card Filesystem Test]]
Last modified: le 2019/11/11 03:34