LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Memory Card's partition table. (https://www.linuxquestions.org/questions/linux-general-1/memory-cards-partition-table-503637/)

EchoWarrior 11-21-2006 12:39 PM

Memory Card's partition table.
 
Hello everyone =)

I'll try to explain this as good as I can.
So:
Im doing a partition on a MMC Memory card.
Quote:

Command (m for help): p

Disk /dev/sdd1: 510 MB, 510798336 bytes
16 heads, 61 sectors/track, 1022 cylinders
Units = cylinders of 976 * 512 = 499712 bytes

Device Boot Start End Blocks Id System
/dev/sdd1p1 1 1022 498705+ 83 Linux

Command (m for help):
However, when I make a filesystem to the partition, the partition table resets!

After doing the filesystem, when I look to fdisk, it says:
Quote:

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
And the partition table is empty.
What's the correct way of doing the partitions and filesystems? Or is it even possible?

PS. If I try mke2fs /dev/sdd1p1 it says:
Quote:

mke2fs 1.38 (30-Jun-2005)
Could not stat /dev/sdd1p1 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
I am bit confused :confused:

EDIT: after doing the filesystem, the card works fine. But I cant install GRUB to it :/

George Liu 11-21-2006 12:51 PM

What do you mean "the card work fine"? What's the output of dmesg and df?

EchoWarrior 11-21-2006 01:00 PM

I mean I can put files to it. But theres "no" partition table.
dmesg:
Code:

[17183088.324000] SCSI device sdd: 997888 512-byte hdwr sectors (511 MB)
[17183088.328000] sdd: Write Protect is off
[17183088.328000] sdd: Mode Sense: 00 00 00 00
[17183088.328000] sdd: assuming drive cache: write through
[17183088.340000] SCSI device sdd: 997888 512-byte hdwr sectors (511 MB)
[17183088.340000] sdd: Write Protect is off
[17183088.340000] sdd: Mode Sense: 00 00 00 00
[17183088.340000] sdd: assuming drive cache: write through
[17183088.340000]  sdd: sdd1
[17183088.344000] sd 6:0:0:3: Attached scsi removable disk sdd
[17183088.344000] sd 6:0:0:3: Attached scsi generic sg3 type 0
[17183088.352000] usb-storage: device scan complete
[17183123.232000] usbcore: deregistering driver usb-storage
[17183126.528000] Initializing USB Mass Storage driver...
[17183126.528000] scsi7 : SCSI emulation for USB Mass Storage devices
[17183126.528000] usb-storage: device found at 3
[17183126.528000] usb-storage: waiting for device to settle before scanning
[17183126.528000] usbcore: registered new driver usb-storage
[17183126.528000] USB Mass Storage support registered.
[17183131.528000]  Vendor: Generic  Model: USB Storage-CFC  Rev: I16A
[17183131.528000]  Type:  Direct-Access                      ANSI SCSI revision: 00
[17183131.540000] sd 7:0:0:0: Attached scsi removable disk sda
[17183131.540000] sd 7:0:0:0: Attached scsi generic sg0 type 0
[17183131.540000]  Vendor: Generic  Model: USB Storage-MSC  Rev: I16A
[17183131.540000]  Type:  Direct-Access                      ANSI SCSI revision: 00
[17183131.552000] sd 7:0:0:1: Attached scsi removable disk sdb
[17183131.552000] sd 7:0:0:1: Attached scsi generic sg1 type 0
[17183131.556000]  Vendor: Generic  Model: USB Storage-SMC  Rev: I16A
[17183131.556000]  Type:  Direct-Access                      ANSI SCSI revision: 00
[17183131.568000] sd 7:0:0:2: Attached scsi removable disk sdc
[17183131.568000] sd 7:0:0:2: Attached scsi generic sg2 type 0
[17183131.568000]  Vendor: Generic  Model: USB Storage-SDC  Rev: I16A
[17183131.568000]  Type:  Direct-Access                      ANSI SCSI revision: 00
[17183131.576000] SCSI device sdd: 997888 512-byte hdwr sectors (511 MB)
[17183131.576000] sdd: Write Protect is off
[17183131.576000] sdd: Mode Sense: 00 00 00 00
[17183131.576000] sdd: assuming drive cache: write through
[17183131.588000] SCSI device sdd: 997888 512-byte hdwr sectors (511 MB)
[17183131.592000] sdd: Write Protect is off
[17183131.592000] sdd: Mode Sense: 00 00 00 00
[17183131.592000] sdd: assuming drive cache: write through
[17183131.592000]  sdd: sdd1
[17183131.592000] sd 7:0:0:3: Attached scsi removable disk sdd
[17183131.592000] sd 7:0:0:3: Attached scsi generic sg3 type 0
[17183131.604000] usb-storage: device scan complete

df:
Code:

Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/hda8            18706608  10005688  7750680  57% /
varrun                  517984      112    517872  1% /var/run
varlock                517984        4    517980  1% /var/lock
udev                    517984      124    517860  1% /dev
devshm                  517984        0    517984  0% /dev/shm
lrm                    517984    18856    499128  4% /lib/modules/2.6.15-27-386/volatile
/dev/hda6                30075    11422    17049  41% /boot
/dev/hda1            15358108  11557048  3801060  76% /media/hda1
/dev/hda5            124688464 103949088  20739376  84% /media/hda5
/dev/hdb                650708    650708        0 100% /media/cdrom0
/dev/sdd1              483058        13    458104  1% /mmc


EchoWarrior 11-22-2006 08:11 AM

I solved this. Stupid me!

I noticed today that I had been accidentally using fdisk /dev/sdd1 when I should be using fdisk /dev/sdd


All times are GMT -5. The time now is 10:16 AM.