Help - Search - Members - Calendar
Full Version: partitioning SD card
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
scoutme
Can anyone help me? I'd like to partition my SD card in order to have an ext2 part for software installation and a fat one for data exchanging
murple
Sure.

I'm assuming you're using RC5 btw. The locations are a bit different in 1.0.5

in a console do...

umount /mnt/card
fdisk /dev/mmcd/disc0/disc
p (see what partitions you have)
d (delete em)
n (new partition)
p (primary)
1 (when asked for the endpoint use the +50M option/ substitute 50 for how ever big you want it)
w (writes to disk)
mkfs.ext2 /dev/mmcd/disc0/part1 (formats it)

then pull the sucker out and sick it in your windows box and use the disk manager to add a fat partition after your linux one. formating fat32 works fine for me fyi.

You can also create both partiton on the z, just be sure to change one of them to the Fat in fdisk. "t" command in fdisk.. doing it in windows is prolly the easiest way tho

hope that helps
scoutme
going to try.

Thank you for the tip
scoutme
I used fdisk to create a 256MB ext2 partition, then used the Disk Management tool of WinXp to create the fat32 partition in the remaining space.
Everything seems to run fine wink.gif


thank you
scoutme
I had to do the whole job with fdisk... windows has problems if the fat partition isn't the first of the device.



Does anyone know where can I find automount settings? they are not in fstab, actually
rgrep
I partitioned my 512MB SD with a 135 MB FAT partition 1 (for flashing and NAND backups) and an ext3 partition 2. I had to edit /etc/sdcontrol to change the "DEVICE" (line 11) to part2. I also had to edit /etc/fstab to give me a mount point for partition 1 (I used /mnt/fat).
scoutme
that's what I needed smile.gif
scoutme
I'm going to modify the /etc/sdcontrol so that both partition will be mounted on inserting, and storage functions will act on the fat one.
Suggestions?
rgrep
QUOTE(scoutme @ Oct 31 2004, 01:53 PM)
I'm going to modify the /etc/sdcontrol so that both partition will be mounted on inserting, and storage functions will act on the fat one.
Suggestions?

Good idea, I will be very keen to get a copy of this when you're done!

I suggest you modify it to use fstab for the list of SD partitions to mount. So just do something like this:
CODE
for i in $(grep /dev/mmcd/disc0 /etc/fstab | grep -v -e noauto -e swap | awk '{ print($2) }'); do
   mount $i
done

That way people can choose which partitions get mounted, where they are mounted to, the filesystem type and any mount options.

Matt
rgrep
You should also check for swap partitions on the SD card and use swapon to activate them.
systemparadox
Hi. I am trying to do a similar thing. Would it be possible for someone to post the modified /etc/sdcontrol (and any other files) please?

Thanks
Simon

EDIT: just realised that this is the pdaxrom forum- I am running OpenZaurus with Opie- will there be much difference?
rgrep
I'm working on the replacement script now so I'll post it when I've finished. There shouldn't be much difference but if you post your copy of /etc/sdcontrol then I can compare the differences and release a version that will work on OZ.
systemparadox
Attached is my /etc/sdcontrol. I changed the device from mmcda1 to mmcda2.
Can I have both versions of the script when you are done please?

Thanks a lot!
Simon
systemparadox
Has anyone finished the modified version of this script?
grog
QUOTE(systemparadox @ Feb 12 2005, 07:11 AM)
Has anyone finished the modified version of this script?
*
I don't know if the the scripts are the same between the ROM's, but I modified the sdcontrol on a 5600 under OZ. Check out the thread here. HTH
phillvs
I am running the latest RC10 pdaxRom on a C860

I have just partitioned my SD card so that the 'part1' is a FAT32 partition (this is for W2K which only 'sees' the first partition on the card). The 'part2' is formatted as a ext2 partition as described previously in this thread.

I could not quite follow the rest of the instruction for automounting the card. I have tried modifying the /etc/fstab file it now has two mount instructios as:

/dev/mmcd/disc0/part1 /mnt/fat auto noauto,owner 0 0
/dev/mmcd/disc0/part2 /mnt/card auto noauto,owner 0 0

and I have modifyed sdcontrol like this:

DEVICE=/dev/mmcd/disc0/part1
MOUNT_POINT=/mnt/fat

Now, how do I get the the other partition to automatically mount?

Can I just add:
DEVICE=/dev/mmcd/disc0/part2
MOUNT_POINT=/mnt/card
?????

(Note: mount -a gives errors with mounting the card, don't know why yet)

Someone who knows these things please guide me. Many thanks.

Phill
rgrep
Hi Phill,

Due to the way the standard /etc/sdcontrol works it's not trivial to get two partitions to mount automatically. I've been meaning for a while to rewrite sdcontrol so that it supports things like this (as well as swap partitions and multiple SD cards with different partitioning schemes).

In the meantime you could try groq's modified version of sdcontrol. It's based on the OZ version of sdcontrol so you might need to tweak it a bit to work on pdaXrom. I haven't tried it so can't say whether it should work or not.

http://www.oesf.org/forums/index.php?showt...indpost&p=66353

I'll post my version of sdcontrol if or when I get around to finishing it! smile.gif

Matt
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.