raspberry.py
Posts: 2
Joined: Fri Jan 31, 2020 6:34 pm

Booted from usb - great, now where is my micro sd card?

Sat Feb 01, 2020 12:23 am

Ok, so still working on the project mentioned in another post, but context as far as that shouldnt matter, everywhere I look it tells me where to find my sd card - if ive booted from SD - but ive booted from usb, successfully, formated my sd on a diffrent computer, reinsert it, now where do I find it on raspbian???

Thanks for reading - raspberry.py

W. H. Heydt
Posts: 12655
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Booted from usb - great, now where is my micro sd card?

Sat Feb 01, 2020 1:12 am

Running 'df' will show disk partitions (and in this context, the SD card is a "disk").

This is a Pi booted from an SD card:

Code: Select all

pi@demo2:~ $ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       14982068 6024820   8176476  43% /
devtmpfs          834512       0    834512   0% /dev
tmpfs             966608       0    966608   0% /dev/shm
tmpfs             966608   16928    949680   2% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs             966608       0    966608   0% /sys/fs/cgroup
/dev/mmcblk0p1    258096   53441    204655  21% /boot
tmpfs             193320       0    193320   0% /run/user/1000
Mmcblk0p1 is partition 1 on the SD card.

This is a system that is booted from an HDD:

Code: Select all

pi@pidrive:~ $ df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/root      301613616 53946368 233953444  19% /
devtmpfs          469544        0    469544   0% /dev
tmpfs             474152        0    474152   0% /dev/shm
tmpfs             474152    12712    461440   3% /run
tmpfs               5120        4      5116   1% /run/lock
tmpfs             474152        0    474152   0% /sys/fs/cgroup
/dev/sda1         260840    53792    207048  21% /boot
tmpfs              94828        8     94820   1% /run/user/1000
/dev/sda1 is the first partition of the HDD.

There are other methods, such as 'lsblk' (list block devices) which are more inclusive..

Code: Select all

pi@pidrive:~ $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 292.5G  0 disk
├─sda1   8:1    0   255M  0 part /boot
└─sda2   8:2    0 292.2G  0 part /

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Booted from usb - great, now where is my micro sd card?

Sat Feb 01, 2020 1:22 am

raspberry.py wrote:
Sat Feb 01, 2020 12:23 am
but ive booted from usb, successfully, formated my sd on a diffrent computer, reinsert it, now where do I find it on raspbian???
If it's a version of Raspbian with the Raspberry Pi desktop, then it will be in /media/pi/nameofsdcard (try right-click on the desktop, then under desktop preferences, make sure mounted disks is checked, so that it will appear on the desktop).

If it's Raspbian Lite, you have to mount it manually (wherever you want).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Booted from usb - great, now where is my micro sd card?

Sat Feb 01, 2020 10:54 am

HawaiianPi wrote:
Sat Feb 01, 2020 1:22 am
raspberry.py wrote:
Sat Feb 01, 2020 12:23 am
but ive booted from usb, successfully, formated my sd on a diffrent computer, reinsert it, now where do I find it on raspbian???
If it's a version of Raspbian with the Raspberry Pi desktop, then it will be in /media/pi/nameofsdcard (try right-click on the desktop, then under desktop preferences, make sure mounted disks is checked, so that it will appear on the desktop).
...
As can be seen in these screenshots: https://www.cpmspectrepi.uk/raspberry_p ... oting.html
Hint: look where /dev/mmcblk0p1 is mounted.
(Raspbian's SD card copier tool was used to clone the card to the USB flash drive - in my example the card has not been overwritten/re-formatted ie. retained as a system back-up)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Return to “Beginners”