Reply
Thread Tools
santiago's Avatar
Posts: 518 | Thanked: 334 times | Joined on Mar 2010 @ italy
#1
Hi guys, hi community, i need your help to complete the right setup of my n900.. Yesterday i spent like 8 hours trying to convert the internal Partitions (vfat + ext3) in one Ext4.. Then i used gparted to delete ext3 filesistem and vfat also, i merged both in one Ext4 via backupmenu and gparted. I restored one backup, i did a good work but maybe i mad a mistake couse during the restore with backupmenu just one error appears, something like

"impossible to mount /dev/mmcblk0p1, file system is used..", the restore goes on and everything works as well.. when i bootup my phone, i just have one ext4 patition, yes! It's what i want to have, my phone it's too fast! But i have one problem.. MyDocs seems to be not recognized by the Ossofilemanager and camera, i mean.. I can see screenshots, but i cant format the memory and i cant save pictures or video.. I can manage folders etc, i think it's becouse it's not mounted as well, but i'm not able to understand where the problem is..

this is the /etc/fstab file
Code:
# autogenerated
rootfs / rootfs defaults,errors=remount-ro,noatime 0 0
/dev/mmcblk0p1 /home ext4 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/home/opt /opt none bind
/dev/mmcblk0p3 none swap sw 0 0
this is the /etc/mtab file
Code:
rootfs / rootfs rw 0 0
ubi0:rootfs / ubifs rw,bulk_read,no_chk_data_crc 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /tmp tmpfs rw,noatime,size=1024k 0 0
tmpfs /var/run tmpfs rw,nosuid,noatime,size=256k,mode=755 0 0
none /dev tmpfs rw,noatime,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noatime,size=65536k 0 0
/dev/mmcblk0p1 /home ext4 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/home/opt /opt none bind 0 0
nodev /sys/kernel/debug debugfs  0 0
/opt/pymaemo/usr/lib/python2.5 /usr/lib/python2.5 bind bind 0 0
/opt/pymaemo/usr/share/pyshared /usr/share/pyshared bind bind 0 0
/opt/pymaemo/usr/lib/pyshared /usr/lib/pyshared bind bind 0 0
/opt/pymaemo/usr/share/python-support /usr/share/python-support bind bind 0 0
/opt/pymaemo/usr/lib/python-support /usr/lib/python-support bind bind 0 0

this is the /etc/event.d/rcS-late file
Code:
description "late rcS actions"

start on started hal
stop on stopping hal

console none

script
    #mount /home; fix ext4 and retry mounting if 1st attempt fails
    mount_home ()
    {
    /bin/mount /home && grep -q "/home ext4 rw" /proc/mounts
    if [ $? -eq 0 ]
    then
      return 0
    else
      grep -q "/home ext4 ro" /proc/mounts
      if [ $? -eq 0 ]
      then
        umount /home
      fi
      HOME_DEV=`grep "/home ext4" /etc/fstab | cut -d' ' -f1`
      fsck.ext4 -y $HOME_DEV >> /var/lib/fsck_ext4_home.log 2>&1
      sync
      /bin/mount /home && grep -q "/home ext4 rw" /proc/mounts
      return $?
    fi
    }


    ACT_DEAD=0
    HOME_MOUNTED=0
    
    #check act_dead
    if [ -e /tmp/ACT_DEAD ]; then
      ACT_DEAD=1
    fi

    # Generate fstab and mount /home
    . /etc/default/mount-opts

    fstab=/etc/fstab
    tmp_fstab=/tmp/fstab

    sfdisk -l /dev/mmcblk0 | /bin/busybox awk \
    	-v home_opts="$home_opts" -v ext4_opts="$ext4_opts" \
	-f /usr/lib/genfstab.awk > $tmp_fstab

    cmp -s $tmp_fstab $fstab || cp $tmp_fstab $fstab
    rm -f $tmp_fstab

    if [ $ACT_DEAD -eq 0 ]; then
      /sbin/swapon -a || echo "Failed to enable paging partition."
      # Setup lowmem module
      echo 32768  > /proc/sys/vm/lowmem_deny_watermark_pages
      echo 98304  > /proc/sys/vm/lowmem_notify_high_pages
      echo 131072 > /proc/sys/vm/lowmem_notify_low_pages
      echo 1024   > /proc/sys/vm/lowmem_nr_decay_pages
      # Exclude some UIDs from memory allocation denial.
      # 30000 is messagebus, 30001 could be used by Matchbox
      echo "30000 30001 30002 30003" > /proc/sys/vm/lowmem_allowed_uids
    fi

    mount_home && HOME_MOUNTED=1
   
    # If failed to mount /home and system has been already optified - reboot 
    if [ $HOME_MOUNTED -eq 0 ]
    then
      if [ -e /var/lib/maemo-optify-firstboot-do-not-clean-home-opt ]; then
        telinit 6
      fi
    else
      [ ! -d /home/opt ] && mkdir /home/opt
      [ ! -d /opt ] && mkdir /opt
    fi   
 
    if [ $ACT_DEAD -eq 0 ]
    then
      if [ $HOME_MOUNTED -eq 1 ]
      then
        if [ -x /usr/sbin/maemo-optify-firstboot.sh ]; then
            . /usr/sbin/maemo-optify-firstboot.sh
        fi
      fi
    fi    
    
    /bin/mount /opt || echo "Failed to mount(bind) /opt."
      
    if [ $ACT_DEAD -eq 0 ]
    then
      if [ $HOME_MOUNTED -eq 1 ]
      then
        if [ -x /usr/sbin/maemo-optify-auto-opt.sh ]; then
            . /usr/sbin/maemo-optify-auto-opt.sh
        fi
      fi
      
      if [ -d /home/preinstalled -a -d /home/user ]
      then 
        rm -rf /home/user
      fi     
    
      if [ ! -d /home/user ]
      then
        if [ -d /home/preinstalled ]
        then
          mv /home/preinstalled /home/user
        else
          mkdir /home/user
        fi
        cd /etc/skel
        cp -a . /home/user
        chown -R user:users /home/user
        sync
      fi
    fi

    if [ ! -d /home/user ]
    then
      mkdir /home/user
      chown user:users /home/user
      sync
    fi

    # We can safely continue booting now.
    initctl emit MOUNTS_OK

    # Adjust flushing of memory card buffers
    echo 40 > /proc/sys/vm/dirty_ratio
    echo 10 > /proc/sys/vm/dirty_background_ratio

    # Initialize PRNG pool with the HW RNG. Slow, but that's ok.
    URANDOM_POOLSZ=512
    if [ -e /dev/hwrng ]; then
      echo "Seeding entropy pool"
      dd if=/dev/hwrng of=/dev/urandom bs=$URANDOM_POOLSZ count=1
    fi

    # Data for the panic info driver
    mount -t debugfs nodev /sys/kernel/debug
    modprobe panic_info_buff
    sleep 1
    osso-product-info > /sys/kernel/debug/panic_info_buff
end script

normal exit 0

this is the /usr/lib/genfstab.awk file
Code:
#!/usr/bin/awk

BEGIN {
	# states so that we don't end up having more than one
	# of home or MyDocs; we can have as many swaps as we find
	__home = 0

	print "# autogenerated"
	print "rootfs / rootfs defaults,errors=remount-ro,noatime 0 0"
}

/^\/dev\/mmc/ { start=1 }
start == 1 && $6 == 82 {
	printf "%s none swap sw 0 0\n", $1
}

start == 1 && $6 == 83 && !__home {
	printf "%s /home ext4 %s 0 0\n", $1, home_opts
	printf "/home/opt /opt none bind\n"
	__home++
}

start == 1 && $6 == 84 && !__home {
	printf "%s /home/user/MyDocs ext4 %s 0 0\n", $1, home_opts
        printf "/home/user/MyDocs /MyDocs none bind\n"
	__home++
}

I used the wiki "changing the emmc file system" but i cant go on as i say, impossible mount-umount /MyDocs, impossible save pictures using the camera, it says full memory
and impossible to manage it with ossofilemanager to format the memory..

I believe in you community, don'leave i want to get full ext4 to my internal mmc


Some screenshots
Attached Images
  

Last edited by santiago; 2012-02-08 at 03:06.
 
Posts: 539 | Thanked: 518 times | Joined on May 2010 @ nanaurbusiness
#2
 

The Following User Says Thank You to J4ZZ For This Useful Post:
Posts: 1,048 | Thanked: 1,127 times | Joined on Jan 2010 @ Amsterdam
#3
About the cam:

Camera needs a VFat partition. AFAIK you'd need to make sure to have at least one partition in VFat that the camera app has access to. You could use an SD card and save them there. Apparently someone thought it would be smart to hardcode the filesystem into the app.

http://test.maemo.org/testzilla/show_bug.cgi?id=7160
 
Posts: 701 | Thanked: 585 times | Joined on Sep 2010 @ London, England
#4
There is an open source replacement for the camera-ui (which is now included in the testing version of the CSSU), perhaps this can be fixed in that (if it hasn't already).

If you read through all the comments in that bug report kindly linked to by anthonie, there may be a solution there, but hard to tell if it will work since you have a single partition for home and MyDocs not simply a separate ext formatted partition for MyDocs.

I did find this gem from someone who appeared to be the Nokian assigned to this bug
Originally Posted by Eero Tamminen
I assume the directory is done by omap3camd which runs as root:
# ps|grep cam
786 root 14976 S /usr/sbin/omap3camd -d /dev/video0 -f /tmp/omap3camd0
862 root 14732 S /usr/sbin/omap3camd -d /dev/video1

It needs to be run as root to access the video device files, those aren't user
readable.
And of course the correct response to not being able to read a dev file because it is only root readable is: modify the udev config so that device file has the correct permissions, not run the program as root. No wonder Maemo is such a f-ing mess.
 

The Following 2 Users Say Thank You to retsaw For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#5
For the camera, have a look here:

http://test.maemo.org/testzilla/show...gi?id=7160#c36

VFAT is not hard-coded. Camera-UI (or rather, omap3camd) tries to create DCIM folder if it doesn't already exist, but it gives it root:root owner:group. For VFAT it's no problem, but with ext[2-4] it means that user cannot write to the DCIM directory.

# chown -R user:users DCIM; chmod -R 664 DCIM

should fix that.
(I haven't tried that though)
 

The Following User Says Thank You to reinob For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#6
Oops, I kept the thread open without refreshing for too long.
Thanks @retsaw!
 
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#7
You may also wish to consider that this totally buggers up backup menu.
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 2 Users Say Thank You to vi_ For This Useful Post:
Posts: 701 | Thanked: 585 times | Joined on Sep 2010 @ London, England
#8
Yeah, it may well bugger backup menu, but that isn't the be-all and end-all of backup solutions. For all its faults N900 is still basically a pocket linux computer. You can use something like rsnapshot (which uses rsync) for your backups, which can quickly and economically (with respect to disk usage) make daily (or even hourly if you like) backups to another (preferably Linux, though you should be able to get it working with Windows as well) computer over wifi.
 
Posts: 863 | Thanked: 213 times | Joined on Feb 2012 @ Goa
#9
Is this project completely done?
 
Posts: 95 | Thanked: 66 times | Joined on Mar 2012
#10
I am curious... are you still able to mount your sdcard?
I thought I recall some scripts rely on count & order of partiton found in eMMC & SDcard. If sdcard cant be mounted, then there is no way for that n900 to function as USB/thumb drive too.

Btw, the latest CSSU updates dont use genfstab.awk anymore.

Sorry, but it'd take up quite a bit of time to run thru each line of change u posted.

kh
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:34.