Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 100GB USB-stick and 16GB SD-card and these are Linux or Mac formatted.
When i plug these in to Linux or Mac, they dont mount at all.
I would like to backup these using dd or some thing else, but if i use df, Disk Utility etc, it dont list these at all so i dont know what code i should use to replace ??? here:
If i plug these to Linux or Mac, it don't mount and show up in Finder/File Manager sidebar at all.
I then try all kinds of disk repair apps like Disk Utility and some unix tools like df and these don't list these two SD-card and USB-stick at all.
So i need a way to find out what is the code that os uses to refer these medias so i can then use that code with dd to backup it. So where i can get to code which replaces ??? in this code: dd if=/dev/??? of=/dev/???
/dev/mmcblk0p1 size 127M W95 FAT16 (LBA)
/dev/mmcblk0p2 size 28.6G Linux
Your correct /dev/mmcblk0p1 is the Pi's /boot partition and /dev/mmcblk0p2 is the Pi's /(root) partition.
We need to to know more information about these drives. You mentioned they are formatted as linux or Mac but not mountable on a linux or Mac. How did you format them and do you know exactly how they are formatted i.e. what type of filesystem (ext4, HPFS, exFAT etc)? You probably need to install drivers on both systems to read filesystems created by the other.
You can either use the dd command to copy the existing drive to another drive of the same or larger capacity or copy them to a file.
Quote:
dd if=/dev/??? of=/dev/???
Your example would be from one drive to another. What device ID to use would be determined from the output of the dmesg command since it depends on the computer and how they are recognized. if=/dev/??? is the source and of=/dev/??? is the destination.
If you are trying to copy the contents to a file then of=/path/to/file where the filesystem has enough space for the entire drive i.e. 100GB or 16GB.
It is also possible if the SD card reader is really old that it can not read the card.
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,020
Rep:
I'm thinking that your main machine doesn't have automount enabled, therefore you would need to mount them manually first before you could read them. (No need to use dd.)
Use /dev/mmcblk0p1 as your first argument & /mnt as your second, then you should be able to access your files under /mnt, once you have done with that partition, unmount /mnt, then mount /dev/mmcblk0p2 to /mnt & do what you want, then unmount /mnt.
Your correct /dev/mmcblk0p1 is the Pi's /boot partition and /dev/mmcblk0p2 is the Pi's /(root) partition.
We need to to know more information about these drives. You mentioned they are formatted as linux or Mac but not mountable on a linux or Mac. How did you format them and do you know exactly how they are formatted i.e. what type of filesystem (ext4, HPFS, exFAT etc)? You probably need to install drivers on both systems to read filesystems created by the other.
You can either use the dd command to copy the existing drive to another drive of the same or larger capacity or copy them to a file.
Your example would be from one drive to another. What device ID to use would be determined from the output of the dmesg command since it depends on the computer and how they are recognized. if=/dev/??? is the source and of=/dev/??? is the destination.
If you are trying to copy the contents to a file then of=/path/to/file where the filesystem has enough space for the entire drive i.e. 100GB or 16GB.
It is also possible if the SD card reader is really old that it can not read the card.
I think i didn't explain that these don't have Rasbian installed. These are just sticks i have stored some files.
Yes i want to copy to file not to another disk.
I don remember anymore how i formatted these, most likely in my Mac using Disk Utility. File system is probably Mac OS Extended (Journaled) or some basic Windows format.
My Mac can see ext and Windows file systems in other USB-sticks.
Since both Raspberry and Mac cannot see these, it means that these stick are gone bad and it's not because what file system these uses.
/dev/mmcblk0p1 size 127M e W95 FAT16 (LBA)
/dev/mmcblk0p2 size 28.6G 83 Linux
dmesg |tail
it detects new usb mass storage device
usb-storage 1-1.3:1.0: usb mass storage device detected
scsi host0: usb-storage 1-1.3:1.0
scsi 0:0:0::0: direct-access intenso nand flash 1.00 pq: 0 ansi: 6
sd 0:0:0:0: [sda] attached scsi removable disk
sd 0:0:0:0: attached scsi generic sg0 type 0
So only dmesg |tail can see this stick.
Quote:
Originally Posted by fatmac
I'm thinking that your main machine doesn't have automount enabled, therefore you would need to mount them manually first before you could read them. (No need to use dd.)
Use /dev/mmcblk0p1 as your first argument & /mnt as your second, then you should be able to access your files under /mnt, once you have done with that partition, unmount /mnt, then mount /dev/mmcblk0p2 to /mnt & do what you want, then unmount /mnt.
You can create an image of the SD card using the following command but make sure you have sufficient space on the destination partition. Are you planning on saving it to the Pi's SD card? As stated if neither system can read the card then it is probably broken or corrupted.
Sorry, I should have been more explicit. Can you please do a recursive long listing: ls -lR /dev/disk/? No need for sudo. You have at least read permission I think.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.