PdaXrom: Using ext2 on an external card
Ok, so I hit this link with no text and was given an editing window, so I'll share what worked for me.
This is what I did for my SL6000, to change my 1GB CF card from the default FAT16 to ext2. These instructions are for Ubuntu 7.10 Linux Desktop, but most distributions have the required tools pre-installed.
First of all BACKUP ALL DATA ON THE CARD. This procedure WILL DEFINITELY DESTROY ALL DATA!
Now we need to turn off auto-mounting of removable media.
On Ubuntu, go to System > Preferences > Removable Drives and Media You'll see the checkboxes for mount and browse removable media when inserted. Uncheck them.
Next you'll need to insert the card into a card reader and attach it to the Ubuntu PC,
Then we need to find the device nodes for disk and partition, if it's in a USB or PCMCIA card reader then it will likely be mounted from /dev/sda.
To check this open a terminal and type:
If you only get the following text:
then we're ok, but if you get listings of /dev/sdb etc. it means that you have more than one usb/scsi device attached to your machine. If you know which one is your card then good, substitute the /dev/sd? listing for /dev/sda and the /dev/sd?1 for /dev/sda1 in the rest of this howto, but make certain your using the right one or else you'll erase the wrong disk.
If you don't know which one is the card reader, you could try unpluging all other usb storage devices, unplug and re-plug the card reader, then try ls /dev/sd* again and hopefully you only get the 2 entries.
now we need to change the entry in the cards partition table, type:
sudo fdisk /dev/sda
enter your password if required. (note I used the disk entry (sda) rather than the partition (sda1))
this should start fdisk.
now type p and hit enter.
you should get something like this:
Disk /dev/sda: 1031 MB, 1031675904 bytes 32 heads, 63 sectors/track, 999 cylinders Units = cylinders of 2016 * 512 = 1032192 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 * 1 999 1006960+ 6 FAT16 Partition 1 has different physical/logical endings: phys=(973, 31, 63) logical=(998, 31, 63)
Take special note of the disk size and system. If the system is not FAT16 or the size is more than 10% different to the size written on your card then you've likely picked the wrong disk entry (/dev/sd?), THINK CAREFULLY BEFORE PROCEEDING!
now to delete the partition, THIS WILL DESTROY ALL DATA! type d and hit enter.
type p again and enter, you should now see this:
Disk /dev/sda: 1031 MB, 1031675904 bytes 32 heads, 63 sectors/track, 999 cylinders Units = cylinders of 2016 * 512 = 1032192 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System
An empty partition table, now we want to create a new ext2 partition, so type n and hit enter.
Command action e extended p primary partition (1-4)
Type p for a new primary partition.
Partition number (1-4):
Type 1 for the partition number
First cylinder (1-999, default 1):
Just hit enter to accept the default.
Last cylinder or +size or +sizeM or +sizeK (1-999, default 999):
Just hit enter again to accept the default
now type p and hit enter, and check that the system is Linux:
Disk /dev/sda: 1031 MB, 1031675904 bytes 32 heads, 63 sectors/track, 999 cylinders Units = cylinders of 2016 * 512 = 1032192 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 999 1006960+ 83 Linux
now type w and hit enter to write the new partition table to disk and exit.
now to format the disk to ext2, type:
unplug the card reader, turn auto mounting back on the same way you turned it off, then plug the card reader back in you should now be able to put all your backed up data back on the card.