Active Topics

 


Reply
Thread Tools
Posts: 64 | Thanked: 11 times | Joined on Nov 2010
#251
I meant titans post: http://talk.maemo.org/showpost.php?p...1&postcount=66
This is same: http://wiki.maemo.org/Repartitioning_the_flash
These are solution #1
Is this compatible with PR1.3?

Last edited by salazar; 2010-12-11 at 11:52.
 
Posts: 64 | Thanked: 11 times | Joined on Nov 2010
#252
Anyone? Look at upper post and answer pls.
 
Posts: 64 | Thanked: 11 times | Joined on Nov 2010
#253
Help! My phone rebooted itself when i was doing the solution #1.
It rebooted after this command: cp -a /home/* /mnt # copy contents of /home to large partition.
What should i do? My phone is in confusion.
 
Posts: 12 | Thanked: 21 times | Joined on Aug 2010 @ Alger
#254
I recently managed to repartition nand, emmc and mmc to fit my needs, a simple step by step isn't available. So i decided to include the process i used to do it.
I made a well commented (i hope) step by step tutorial so everyone can follow. The only issue i encountered (and didn't solve) is that when connected to a Pc in mass storage mode, only MyDocs is visible, mmc is not mountable by Pc. Everything else works.
So let's begin
I am using a 8GB mmc, you must adapt numbers for partitions
# the goal is to reach this config :
# nand -> /
# emmc partition 1 (remaining) -> /home/user/MyDocs
# emmc partition 2 (4GB) -> /home
# emmc partition 3 (4GB) -> /usr
# emmc partition 4 (768MB) -> swap
# mmc partition 1 (remaining) -> /media/mmc1
# mmc partition 2 (2GB) -> /var
Edit : no need to customize kernel as stated before
install rootsh or openssh-server (to do it via ssh, if wifi at home)
Code:
sudo gainroot (or ssh as root)
# install nano
Code:
apt-get install nano-opt
# partition /dev/mmcblk1 (tmp)
# n900 seems to mount without asking so some umounts are needed
Code:
umount /dev/mmcblk1p1
# be carefull you must adapt the following numbers
# p1=512MB (backup MyDocs), p2=1GB (backup /home), p3=5.5GB (not used), p4=768MB (swap)
# I made small partitions to speed the formatting process (remember it's temporary partitionned)
Code:
sfdisk /dev/mmcblk1
0 32768 c
32768 16384 83
49152 169472 83
218624 24576 82
y
# sometimes partitions are not resynch'ed so better reboot
Code:
reboot
# format partitions on /dev/mmcblk1
Code:
umount /dev/mmcblk1p1
mkfs.vfat /dev/mmcblk1p1
mkfs.ext3 /dev/mmcblk1p2
mkswap /dev/mmcblk1p4
# parking tmp1 (because of n900 mounting automatically)
Code:
umount /dev/mmcblk1p1
mkdir /media/mmc1/tmp
mount /dev/mmcblk1p1 /media/mmc1/tmp
# move /home/user/MyDocs to tmp1
Code:
mkdir /media/mmc1/MyDocs
umount /dev/mmcblk1p1
mount /dev/mmcblk1p1 /media/mmc1/MyDocs -o rw,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir
cd /home/user
cp -a MyDocs /media/mmc1
umount /dev/mmcblk0p1
mount /dev/mmcblk0p1 /media/mmc1/tmp
# move /home in tmp2
Code:
mkdir /media/mmc1/home
mount /dev/mmcblk1p2 /media/mmc1/home
cd /
cp -a home /media/mmc1
# prepare reboot
Code:
nano -w /etc/event.d/rcS-late
change
fstab=/etc/fstab
to
fstab=/etc/_fstab
Code:
nano -w /etc/fstab
change
/dev/mmcblk0p1 -> /dev/mmcblk1p1
/dev/mmcblk0p2 -> /dev/mmcblk1p2
/dev/mmcblk0p3 -> /dev/mmcblk1p4
Code:
swapoff /dev/mmcblk0p3
swapon /dev/mmcblk1p4
reboot
# repair automatically mounted partitions
Code:
umount /dev/mmcblk0p1
umount /dev/mmcblk1p1
mount /dev/mmcblk1p1
mount /dev/mmcblk0p1 /media/mmc1/tmp
at this point you should have /home, MyDocs and swap on mmc, so emmc can be easily partitionned.

# partition /dev/mmcblk0
Code:
umount /dev/mmcblk0p1
sfdisk /dev/mmcblk0
0 688256 c
688256 131072 83
819328 131072 83
950400 24576 82
y
# sometimes partitions are not resynch'ed so better reboot
Code:
reboot
# format partitions on emmc
Code:
umount /dev/mmcblk0p1
mkfs.vfat /dev/mmcblk0p1
mkfs.ext3 /dev/mmcblk0p2
mkfs.ext3 /dev/mmcblk0p3
mkswap /dev/mmcblk0p4
mount /dev/mmcblk0p1 /media/mmc1/tmp
# restore /home/user/MyDocs
Code:
umount /dev/mmcblk0p1
mount /dev/mmcblk0p1 /media/mmc1/MyDocs -o rw,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir
mount /dev/mmcblk1p1
cd /home/user
cp -a MyDocs /media/mmc1
# prepare reboot
Code:
nano -w /etc/fstab
change
/dev/mmcblk1p1 -> /dev/mmcblk0p1
/dev/mmcblk1p2 -> /dev/mmcblk0p2
/dev/mmcblk1p4 -> /dev/mmcblk0p4
Code:
swapoff /dev/mmcblk1p4
swapon /dev/mmcblk0p4
reboot
now you have a system with custom /home (4GB) and MyDocs (20GB) with a 3rd partition unused (4GB).
moving /usr is hard but moving /var is harder and will brick (must reflash) if not done carefully.
Moving /usr and /var can be done in one step (without rebooting between), I prefer going slowly but surely

# partition /dev/mmcblk1 (final)
# ! those numbers must be changed for you
Code:
umount /dev/mmcblk1p1
sfdisk /dev/mmcblk1
0 177664 c
177664 65536 83


y
# sometimes partitions are not resynch'ed so better reboot
Code:
reboot
# format mmc
Code:
umount /dev/mmcblk1p1
mkfs.vfat /dev/mmcblk1p1
mkfs.ext3 /dev/mmcblk1p2
mount /dev/mmcblk1p1 /media/mmc1/tmp
# move /usr
Code:
umount /dev/mmcblk1p1
mount /dev/mmcblk1p1 /media/mmc1/tmp
mkdir /media/mmc1/usr
mount /dev/mmcblk0p3 /media/mmc1/usr
cd /
cp -a usr /media/mmc1
# change partitions' tables
Code:
nano -w /etc/fstab
add
/dev/mmcblk0p3 /usr ext3 defaults 0 0
Code:
nano -w /etc/init.d/rcS
add before call of mount_devpts (second occurence of this string)
mount /usr || echo "Error mounting /usr"
Code:
reboot
# move /var
Code:
umount /dev/mmcblk1p1
mount /dev/mmcblk1p1 /media/mmc1/tmp
mkdir /media/mmc1/var
mount /dev/mmcblk1p2 /media/mmc1/var
cd /
cp -a var /media/mmc1
# change partition's tables
Code:
nano -w /etc/fstab
add
/dev/mmcblk1p2 /var ext3 defaults 0 0
Code:
nano -w /etc/init.d/rcS
add before call of mount_devpts (second occurence of this string)
and before mount /usr
mount /var || echo "Erreur montage /var"
rm -rf /var/run/*
Code:
reboot
# remove automatic update
Code:
gconftool -s --type int /apps/hildon/update-notifier/check_interval 2147483647
Now you have changed a phone that can do computers things into a computer than can do phone calls

Good luke and happy hacking

Last edited by brahim98; 2011-10-31 at 16:49. Reason: No need for custom or modified kernel
 

The Following 5 Users Say Thank You to brahim98 For This Useful Post:
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#255
 
Posts: 12 | Thanked: 21 times | Joined on Aug 2010 @ Alger
#256
I didn't know about this method, could have saved me much time, but the tricky part for me was to move /usr and /var loosely discussed by ruskie (I thank him a lot) and an example was given somewhere for n800 (not very usefull for n900). Now that I have moved these directories, I could install sdk (and every software i want) without worrying about rootfs or any partition. Finally, notice that my solution only requires a N900 and fingers.
 

The Following User Says Thank You to brahim98 For This Useful Post:
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#257
Originally Posted by brahim98 View Post
Finally, notice that my solution only requires a N900 and fingers.
Now that gnu parted N900's version exists, even the method I have linked can be done with only a N900 and fingers

Of course with a Linux PC is more comfortable and probably faster to do
 
Posts: 16 | Thanked: 13 times | Joined on Sep 2010
#258
For me the motivation wasn't size, as I was satisfied with the partitioning, but I wanted MyDocs in a filesystem that preserves permissions (especially fed up with every file having +x when copied out of there).

I formatted it as ext4, changed a pile of scripts (there are instructions on page 18 of this topic), and actually remembered to change the ownership of the whole filesystem to the user before I even tried to use the camera — meaning I never actually experienced camera issues.

Right now I'm happily using my n900 with an ext4 MyDocs, no problems yet.

One thing I have to note though, since my uid on my work/home computers is obviously not the same, I had to do something to be able to write to MyDocs when mounted with mass storage. Best way to do that was with POSIX ACLs; man setfacl is your friend.
 
Posts: 16 | Thanked: 13 times | Joined on Sep 2010
#259
Spoke too soon :-D it worked without flaw... until the next reboot. Now it won't boot no matter what. Playing around with rescue disks and whatnot to figure out my next step...
 

The Following User Says Thank You to lalomartins For This Useful Post:
Banned | Posts: 358 | Thanked: 160 times | Joined on Dec 2010
#260
can u dd mmcblop2 so that i or we can dd it again without danger? or maybe make a .dep file?
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:47.