Configuring the flash on your stargate
From CSL Wiki
These instructions assume that you will be setuping the CF card on
Contents |
[edit]
Step 1: Preparing the Stargate
- Verify that the mkreiserfs program is on your CSL stargate. For some reason it did not end up in the image. If it is not there, please get the ipkg and install it. The ipkg is here:
/usr/local/lecs/platx/packages/corefs/reiserfsprogs_3.x.1.b1_arm.ipk
- Note: With our version of the 7.2/7.3 filesystem, you may have to tell ipkg to force the install. Give ipkg the --help flag to figure out what the proper command is
[edit]
Step 1.5: Preparing yoursef
- On the stargate, the CF card works through the pcmcia system.
- As with a pcmcia card, you can access information about CF card using the cardctl commands
- IMPORTANT: any time you want to remove the CF card, you must run the eject command first:
cardctl eject 1
- If you do not end up pulling the card out, you can reinsert it using the 'insert 1' command
- There are two files you will be editing on the Stargate
[edit]
Step 2: Formating the Stargate
- Insert the CF card
- When you plug in the CF card, it should show up as /dev/hda1
- You can type the following to verify the partitions and their sizes on the card:
cat /proc/partitions
- If the partitions are not correct, you will need to eject the card and insert it into a PC and run fdisk on the card. Carefull though!
- If all the partitions are correct, format the partitions with mkreiserfs substitutiong /dev/hda1 with the partitions you want to format
mkreiserfs /dev/hda1 You may have to disable the watchdog (take *watchdog script out of /etc/rc2.d and reboot) if you do not run this command immediately after rebooting the stargate
[edit]
Step 3: Test mount
- Try mounting the partition
mkdir /opt mount /dev/hda1 /opt # if it works cd /opt ls -la cd / umount /opt
[edit]
Step 3: configure pcmcia
- Edit the folowing file
/etc/pcmcia/ide.opts
- You should see something like this:
# ATA/IDE drive adapter configuration
#
# The address format is "scheme,socket,serial_no[,part]".
#
# For multi-partition devices, first return list of partitions in
# $PARTS. Then, we'll get called for each partition.
#
case "$ADDRESS" in
*,*,*,1)
INFO="CF Card"
DO_FSTAB="n" ; DO_FSCK="n" ; DO_MOUNT="y"
FSTYPE="reiserfs"
OPTS="defaults,noatime"
MOUNTPT="/opt"
;;
*,*,*)
PARTS="1"
# Card eject policy options
NO_CHECK=n
NO_FUSER=n
;;
esac
- LOOK AT ALL THE settings. The example above has everything correct
- DO_FSTAB=n -- if this gets set to y, it will add an entry to the fstab each time you reboot... you do not want this
- DO_FSCK=n
- DO_MOUNT=y -- this must be yes if you want it to mount on boot
- FSTYPE="reiserfs" -- this should be filled in with the filesystem type
- OPTS="defaults,noatime" -- noatime is important... it will help with flash wear by not updating the time each time the file is read
- MOUNTPT="/opt" -- where you want the card mounted
- Leave the rest of the options alone
[edit]
Step 4: configure the fstab
- edit the fstab file:
/etc/fstab
- there is a bunch of stuff there. All you need to add is one line that looks like this:
/dev/hda1 /opt reiserfs defaults,noatime 0 0
- You can replace /dev/hda1 with the partition, /opt with the mountpoint, and reiserfs with the filesystem type
[edit]
Step 5: Test it all
- Reboot, or do the following
# unmount the card if it is mounted somewhere cardctl eject 1 # note, the following will disable the pcmcia slot to... so be prepared /etc/init.d/pcmcia stop /etc/init.d/pcmcia start # when it is done, type df -h to see if the CF card is mounted
- Reboot anyways to make sure it mounts on boot
