OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: scoutme on October 28, 2004, 09:53:01 pm

Title: partitioning SD card
Post by: scoutme on October 28, 2004, 09:53:01 pm
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
Title: partitioning SD card
Post by: murple on October 28, 2004, 11:12:45 pm
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
Title: partitioning SD card
Post by: scoutme on October 30, 2004, 07:13:48 am
going to try.

Thank you for the tip
Title: partitioning SD card
Post by: scoutme on October 30, 2004, 07:35:44 am
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


thank you
Title: partitioning SD card
Post by: scoutme on October 30, 2004, 08:49:44 am
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
Title: partitioning SD card
Post by: rgrep on October 30, 2004, 04:22:27 pm
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).
Title: partitioning SD card
Post by: scoutme on October 30, 2004, 09:22:55 pm
that's what I needed
Title: partitioning SD card
Post by: scoutme on October 30, 2004, 09:53: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?
Title: partitioning SD card
Post by: rgrep on October 30, 2004, 10:18:55 pm
Quote
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: [Select]
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
Title: partitioning SD card
Post by: rgrep on October 30, 2004, 10:19:52 pm
You should also check for swap partitions on the SD card and use swapon to activate them.
Title: partitioning SD card
Post by: systemparadox on November 11, 2004, 09:53:57 am
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?
Title: partitioning SD card
Post by: rgrep on November 11, 2004, 01:27:01 pm
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.
Title: partitioning SD card
Post by: systemparadox on November 11, 2004, 03:06:42 pm
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
Title: partitioning SD card
Post by: systemparadox on February 12, 2005, 08:11:21 am
Has anyone finished the modified version of this script?
Title: partitioning SD card
Post by: grog on February 12, 2005, 08:24:44 am
Quote
Has anyone finished the modified version of this script?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=66726\")
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 [a href=\"https://www.oesf.org/forums/index.php?showtopic=9945&hl=]here[/url]. HTH
Title: partitioning SD card
Post by: phillvs on July 26, 2005, 07:26:45 pm
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
Title: partitioning SD card
Post by: rgrep on July 27, 2005, 07:33:25 am
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.

https://www.oesf.org/forums/index.php?showt...indpost&p=66353 (https://www.oesf.org/forums/index.php?showtopic=9945&view=findpost&p=66353)

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

Matt