Jump to content

PSA for mounting SD card


shortmaniak

Recommended Posts

Just got a nano and was banging my head against the wall trying to get my SD card mounted. Finally got it working so I figured I should leave a PSA for anyone else that has the same problem in the future. In my case the SD card was visible with fdisk -l and when attempting to use the gui to format the card it would report it as a success but would not actually format it. Fdisk would note the card as /dev/sda1.

Steps to mount:

  • Find sd card device with fdisk -l
    • I'm guessing this will usually be /dev/sda1
  • Format sd card with mkfs.ext4 /dev/sda1 (change /dev/sda1 to whatever you found in the above step)
    • Copy the UUID that this prints out, you need to format in order to get the UUID, most commands I know to get the UUID (such as blkid) are not installed on the nano
  • In the GUI, under advanced, change the fstab file with the information discovered in the previous steps
    • Change option UUID to the one you copied (keep the quotes)
    • Change option device to whatever you used to format (/dev/sda1)
  • Click save fstab
  • Reboot

Your SD card should now be mounted and you should be able to install modules to it through the GUI.

Hopefully this saves someone some headache!

Link to comment
Share on other sites

There is an option under the Advanced tab to format the sd card and it will do all that for you with just one click.  Also it is recommend to format the card after putting it in so that it works right with the pineapple

Link to comment
Share on other sites

On 6/10/2019 at 12:13 PM, b0N3z said:

There is an option under the Advanced tab to format the sd card and it will do all that for you with just one click.  Also it is recommend to format the card after putting it in so that it works right with the pineapple

I found that while this option would say that it succeeded, it would not actually make any changes to the card, nor would it mount.

Link to comment
Share on other sites

  • 3 weeks later...

Thank you very much for this guide, out of the hours I've spent researching how to do this, this one worked. My SD card did not show up at all in the GUI, but i could see it if I ran fdisk -l

Just to add to it, 

  • Find sd card device with fdisk -l
    • I'm guessing this will usually be /dev/sda1
  • Format sd card with mkfs.ext4 /dev/sda1 (change /dev/sda1 to whatever you found in the above step)
    • Copy the UUID that this prints out, you need to format in order to get the UUID, most commands I know to get the UUID (such as blkid) are not installed on the nano (didn't need this)
  • In the GUI, under advanced, change the fstab file with the information discovered in the previous steps
    • Change option UUID to the one you copied (keep the quotes) there wasn't an option to change as it didn't refer to UUID, so i left it
    • Change option device to whatever you used to format (/dev/sda1) I changed this
  • Click save fstab 
  • Reboot

THEN I used the GUI format SD and now it's working like a charm (did this as a precaution as per the b0N3z's suggestion)

Hope this helps everyone else.

Link to comment
Share on other sites

  • 1 month later...

Still not working for me. I dont have the UUID in the fstab either but thats not actually the problem. The problem is, that I cant seem to change the fstab in the GUI. So I tried to ssh into my pineapple and change the fstab right in the /etc/config with 'vi' but it says its read-only, and I dont know if this is normal, but it seems kind of strange to me, since its a config, right? Do you have any ideas about what I can do?

Also my sd-card is /dev/sda, just in case that it matters...

 

Thank you

Max

Link to comment
Share on other sites

  • 2 months later...

 

On 8/3/2019 at 8:26 AM, maxspie said:

Still not working for me. I dont have the UUID in the fstab either but thats not actually the problem. The problem is, that I cant seem to change the fstab in the GUI. So I tried to ssh into my pineapple and change the fstab right in the /etc/config with 'vi' but it says its read-only, and I dont know if this is normal, but it seems kind of strange to me, since its a config, right? Do you have any ideas about what I can do?

Also my sd-card is /dev/sda, just in case that it matters...

 

Thank you

Max

/dev/sda means that you dont have any partitions on the drive and you are viewing the entire drive. 

 

1. Create partition

fdisk /dev/sda

2. Now you have to type n to create new partition and then type p for making a primary partition and e for making an extended or logical partition.

3. Run w command to write the changes and reboot your system.

4. Create the file system

mkfs.ext4 /dev/sda1

5. Record the UUID that is returned from the previous step

6. Update config mount section of the fstab or do it from ssh.

nano /etc/config/fstab

Example: Replace "[PASTE UUID HERE]" with the UUID you copied from step 4.

config global
    option anon_swap '0'
    option anon_mount '0'
    option auto_swap '1'
    option auto_mount '1'
    option delay_root '5'
    option check_fs '0'

config mount
    option target '/sd'
    option device '/dev/sda1'
    option uuid '
[PASTE UUID HERE]'
    option fstype 'auto'
    option options 'rw,sync'
    option enabled '1'

7. Save the fstab file and exit

Ctrl+o, to Write the file

Click Enter, to confirm filename

Ctrl+x, to exit nano

8. Reboot

reboot

9. Login to UI, navigate to Advanced and verify that you now see /dev/sda1

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...