Multiple partitions on a CF / SD card
From OESF
m |
(revert to remove spam) |
||
Line 101: |
Line 101: | ||
Pop your sd card out and then back in and both partitions should now mount. | Pop your sd card out and then back in and both partitions should now mount. | ||
| - | |||
| - | |||
| - | |||
| - | [http://www.slots-wiki.com/index.php/slots_tips slots tips] | ||
| - | [http://www.casino-games-wiki.com/index.php/on_line_casino_games on line casino games] | ||
| - | [http://www.gambling-online-theory.com/online-casino/bet-online-casino.html bet online casino] | ||
| - | [http://www.casinos-new.com/blackjack.html Online casino - Blackjack online] | ||
| - | [http://www.fortune-slots.com/ online slots] | ||
| - | [http://www.gambling-online-theory.com/casinos-portal/internet-casinos-sites.html internet casinos sites] | ||
| - | [http://www.gambling-online-theory.com/casinos/casinos-strategy.html casinos strategy] | ||
| - | [http://www.casino-theory.com/online-casino-royale/play-free-online-casino.html play free online casino] | ||
| - | [http://www.magical-casino.com/casino_rules.html Casino rules.] | ||
| - | [http://www.magical-casino.com/casino_bonus.html Casino Bonus ] | ||
Revision as of 18:16, 24 November 2006
Setting up multiple partitions on a CF or SD card may be quite useful. For example, to flash a new ROM image to a 5000/5500 you need a FAT partition on your CF card. On the other hand, installing programs to a card often requires a partition with symbolic linking support (i.e. not FAT). With a multi-partition setup, you can have your cake and eat it too - provided your cake is big enough (at least 64 MB).
Here is a step-by-step guide for setting up two partitions on a CF or an SD card: a FAT one and an ext2 one. It is based on the excellent [Step-by-step CF/SD fdisk/formatting for newbies] Howto. See the bottom of this page for notes on differences in an SD setup. (Note: 3.5.3 calls the second SD partition "card1". The original instructions were for calling it "card2", so this becomes a problem when the system is rebooted. It's probably more complicated for CF cards because of the second CF that is included in the SL6000 hardware. If you know how it works, update this page.)
The 3.5.3 distribution includes the required programs fdisk and mkfs.ext2, but does not include mkfs.msdos. You can get that by installing the dosftools package.
Then, as root, type the following from the console:
cd /root umount /dev/hda1 [or /dev/mmcda1 if using SD] fdisk /dev/hda [or /dev/mmcda] (it will ask you for a command) d (this will delete a partition) 1 (this will delete partition #1) n (this will create a new partition) p (this will create it as a Primary partition) 1 (Choses partition 1; it will tell you the available cylinder range) Enter (to take default start cylinder) N (integer, determines partition size: 1 < N < number of cylinders on the card) Enter (to confirm N as end cylinder) v (this will verify that the partition has been created) t (to change partition type) 1 (to select partition 1) 6 (to select FAT-16) n (this will create a new partition) p (this will create it as a Primary partition) 2 (Choses partition 2) Enter (to take default start cylinder which will be N + 1) Enter (to take default end cylinder) v (this will verify that the partition has been created) t (to change partition type) 2 (to select partition 2) 83 (to select ext2) w (this will save the table and exit the fdisk program)
When you're done with fdisk, enter one of these sets of commands depending on which card you are using:
mkfs.msdos /dev/hda1 (this will format the 1st partition with the FAT-16 file system) mkfs.ext2 /dev/hda2 (this will format the 2nd partition with the ext2 file system) mkdir /mnt/cf2 (this will create the directory where the 2nd partition will be mounted) ...or... (if SD) mkfs.msdos /dev/mmcda1 (this will format the 1st partition with the FAT-16 file system) mkfs.ext2 /dev/mmcdda2 (this will format the 2nd partition with the ext2 file system) mkdir /mnt/card2 (this will create the directory where the 2nd partition will be mounted)
Now you need to edit /etc/fstab to associate the 2nd partition with its mount point. The /etc/fstab file should already contain a line for the first partition and it should look something like this:
/dev/hda1 /mnt/cf auto defaults,noauto,noatime,user,exec,suid 0 0 ...or... (if SD) /dev/mmcda1 /mnt/card auto defaults,noauto,noatime,user,exec,suid 0 0
Use your favorite text editor to copy and tweak that line; you should end up with:
/dev/hda1 /mnt/cf auto defaults,noauto,noatime,user,exec,suid 0 0 /dev/hda2 /mnt/cf2 auto defaults,noauto,noatime,user,exec,suid 0 0 ...or... (if SD) /dev/mmcda1 /mnt/card auto defaults,noauto,noatime,user,exec,suid 0 0 /dev/mmcda2 /mnt/card1 auto defaults,noauto,noatime,user,exec,suid 0 0
If you want programs installed to the CF card to go to the ext2 partition rather than to the FAT one (and you do want that), you need to edit /etc/ipkg.conf, changing the line
dest cf /mnt/cf to dest cf /mnt/cf2 ...or... (if SD) dest cf /mnt/card to dest cf /mnt/card2
Now the instructions get entirely different for CF and SD cards.
Here's the CF version:
Finally, you want to __ensure that both partitions get auto-mounted__ when you reboot your Zaurus or eject / re-insert the CF card. For that, you need to edit /etc/pcmcia/ide.opts. This is not the place to explain how the file works (it contains explanatory comments if you care). I'll just list what you should end up with, omitting comments for brevity:
case "$ADDRESS" in
*,*,*,1)
DO_FSCK="y"
DO_MOUNT="y"
;;
*,*,*,2)
DO_FSCK="y"
DO_MOUNT="y"
;;
*,*,*)
PARTS="1 2"
NO_CHECK=n
NO_FUSER=n
;;
esac
The easiest way to apply all these changes is to restart your Zaurus whichever way your ROM allows. That's that.
Here's the SD version:
(Log in as root) mount -n -o remount,rw / (make the file system writable) cp /etc/sdcontrol /etc/sdcontrol2 (make a control file for the new partition)
Edit the file /etc/sdcontrol2 and change three adjacent lines
DEVICE=/dev/mmcda1 to DEVICE=/dev/mmcda2 MOUNT_POINT=/mnt/card to MOUNT_POINT=/mnt/card1 SMB_MOUNT=/home/samba/SD_Card to SMB_MOUNT=/home/samba/SD_Card1
Pop your sd card out and then back in and both partitions should now mount.

