View Single Post
Old 05-21-2013, 09:11 AM   #1
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,537
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Hacking SD card file system

After some discussions got started over in the Upgrade thread on changing the SD card to a different format than the default FAT32 I thought I would move the discussion over here.

Original request:

Quote:
Originally Posted by jlynton View Post
My request is for it to be possible to use an ext3 (or ext4) formatted microSD card, mainly to get around the file limitations in the images directory.
My initial reply:

Quote:
Originally Posted by PeterT View Post
Maybe one of the tweakers in the Kobo Developer's Corner could look into this. I have a gut feeling that what is needed is a change to the script used for mounting the SD card.

Quote:
Originally Posted by \usr\local\Kobo\uDev\sd
Code:
DEV="/dev/mmcblk1p1"

if [ "$DEV" == "$DEVNAME" ]; then
	if [ "$ACTION" == "add" ]; then
		dosfsck -a -w $DEVNAME
		mount -r -t vfat -o shortname=mixed $DEVNAME /mnt/sd
		if [ $? != 0 ]; then
#			mount -r $DEVNAME /mnt/sd
#			if [ $? != 0 ]; then
				echo sd mount fail $DEVNAME >> /tmp/nickel-hardware-status &
#			else
#				echo sd $ACTION $DEVNAME >> /tmp/nickel-hardware-status &
#			fi
		else
			echo sd $ACTION $DEVNAME >> /tmp/nickel-hardware-status &
		fi
	fi
fi
It looks like the ability to mount non FAT32 formats was there at one point, and has now been commented out.
More discussion:
Quote:
Originally Posted by tshering View Post
If one makes changes there, one might also consider adjusting usr/local/Kobo/udev/usb.
Quote:
Originally Posted by jlynton View Post
This looks interesting, is there an easy way to access these files (glo, without removing internal microSD card)?
Quote:
Originally Posted by tshering View Post
One way of modifying these files is by using the upgrade mechanism. Unpack the file "KoboRoot.tgz" from the FW update file, which you can find here ,and then unpack its (KoboRoot.tgz's) content. After modifying some files you can pack them again into "KoboRoot.tgz" (you have of course to preserve the path of each modified file, but there is no need to include all the other files). Copy then "KoboRoot.tgz" to the folder ".kobo" of the reader. After unplugging the reader, it will copy the content of "KoboRoot.tgz" to the system partition. Confer the paragraph "The Kobo upgrade mechanism" of "Hacking the Kobo Touch for DUMMIES". This part is valid for Glo too.
Word of caution: Preserve lower and upper case of file and path names (e.g. udev, not uDev).
If you mess things up, you might have to factory reset the reader. If you have a lot of annotations and highlights, you might consider making a back up of .kobo/KoboReader.sqlite.
Quote:
Originally Posted by jlynton View Post
Thanks, this looks like something I could try on my day off. I have looked at the two files usr/local/Kobo/udev/usb and usr/local/Kobo/udev/sd, both have the commented out section that PeterT refers to. I assume that one refers to the internal microSD cards FAT32 partition, and the other to the external microSD card, do you know which is which?
Quote:
Originally Posted by PeterT View Post
Actually I believe that the sd is used only for the mounting of the external sd card; note that it mounts the card on /mnt/sd. usb is used for when the device is attached to your PC.

/mnt/onboard appears to be used for the partition that is accessible to us normally, and /mnt/sd to the external SD card.

I think that this section
Quote:
Originally Posted by /usr/local/Kobo/udev/usb
Code:
	if [ -e $DEV ]; then
		mount -r -t vfat -o shortname=mixed $DEV /mnt/sd
#		if [ $? != 0 ]; then
#			mount -r $DEV /mnt/sd
#		fi
	fi
should be similar to the code in /usr/local/Kobo/udev/sd
PeterT is offline   Reply With Quote