RE: I have an 8GB card....

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Rusty Ramser
Date:  
To: 'Main PLUG discussion list'
Subject: RE: I have an 8GB card....
Hi, Mike.



mkfs just makes a file system, it doesn’t do the partitioning for you. For that, you’ll probably just want to use fdisk. You’ll need to figure out which device your 8 GB card is, but it’s usually not too hard. If you’ve got one hard disk (likely /dev/sda) and no other external drives/devices added, when you insert the card it will probably be /dev/sdb.



Try doing something like this: sudo fdisk -l /dev/sdb

That’s a lower case “L”, for list. Not a number one. The command just displays information and then immediately exits out to your shell prompt.



Does it report back drive partitioning information that looks like your 8 GB card? That’s probably it then. Does it report back 500 GB that looks like your external USB drive you have attached? Wrong device, obviously. Try looking at /dev/sdc and so on, until you find your card. Alternatively, you can just issue the command without specifying any device at all (sudo fdisk -l) and it will spit out a long listing of all your drives and partitions; it might be easier to spot the 8 GB card that way.



Once you’ve nailed down which device your card is, you can even be extra safe by removing the card and then running the fdisk command again. Does it error out because it can’t find your device? That’s good, because it shows you’ve removed the right device. Insert the card again and run the fdisk listing command to make sure it’s still the same device.



Once you know what device you’re dealing with, just run fdisk interactively (sudo fdisk /dev/sdb, for example) to delete the existing partitions and create one big new one. Then use mkfs to create your file system on the card, and you’re ready to go.



Bonus Only-Partially-Related-To-Anything Tip: Do you have the di utility installed on your system? It stands for Disk Information, and I find it provides much more usable information than df or du. I would typically use di first to see a listing of drive devices/partitions I had available.



Cheers.





----- Original Message -----

From: [mailto:plug-discuss-bounces@lists.phxlinux.org] On Behalf Of Michael Havens
Sent: Saturday, April 4, 2015 09:41
To: PLUG
Subject: Re: I have an 8GB card....



I found the command. I used df but this is what happened after I tried to format it:



$ sudo mkfs /dev/sdc

mke2fs 1.42.9 (4-Feb-2014)

/dev/sdc is entire device, not just one partition!

Proceed anyway? (y,n) y

mkfs.ext2: No medium found while trying to determine filesystem size



What is wrong?




:-)~MIKE~(-:





----- Original Message -----

From: [mailto:plug-discuss-bounces@lists.phxlinux.org] On Behalf Of Michael Havens
Sent: Saturday, April 4, 2015 09:24
To: PLUG
Subject: I have an 8GB card....



I want to use this card. Currently it is partitioned. Can I delete all of the partitions by formatting it with mkfs? I would have just tried it without asking but I can't remember what the command is to see what number the device has been assigned (/dev/sd??) so I need help with that as well.


:-)~MIKE~(-:

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss