Reply
Thread Tools
Posts: 543 | Thanked: 181 times | Joined on Aug 2009 @ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
#51
Well I've done it... only had to reflash 3 times...
This is just stupid but if MyDocs isn't vfat nothing seems to want to work. This shouldn't be so - I would consider this a bug but not sure if Nokia would or the Maemo team.

Here's the file I made:
And of course THIS CAN MAKE IT A BRICK SO BE PREPARED TO RESTORE FROM FLASHER OR ANY OTHER WAY YOU CAN THINK OF
cat repart.sh
Code:
#!/bin/bash

echo "Not for running only REFERENCE!!!"
exit

### THIS ALL APPLIES TO 42.11 ###

# backup your user
mount /dev/mmcblk1p1 /media/mmc1
cp -a /home/user /media/mmc1/

# partitioning
sfdisk -uM --no-reread /dev/mmcblk0 << FDSK
0 2048 c
2049 20544 83
22593 768 82
23361 7170 5
23362 2048 83
25410 5120 83

FDSK

# REBOOT

# do this sometime
mkfs.ext2 /dev/mmcblk0p5
mkfs.ext2 /dev/mmcblk0p2
mkfs.ext2 /dev/mmcblk0p6
mkfs.vfat /dev/mmcblk0p1
mkswap /dev/mmcblk0p3

# change /etc/event.d/rcS-late
# comment out generation of fstab
# the following sed command will add a comment character "#"
# at the start of lines 10-20 
sed "10,20s:\(.*\):#\1:" /etc/event.d/rcS-late > /etc/event.d/rcS-late.new
cp /etc/event.d/rcS-late.new /etc/event.d/rcS-late

# add mount /home/user/MyDocs
# this sed command inserts /bin/mount /home/user/MyDocs || echo 'Failed to mount' on line 23
sed "23i/bin/mount /home/user/MyDocs || echo 'Failed to mount /home/user/MyDocs partition.'" /etc/event.d/rcS-late > /etc/event.d/rcS-late.new
cp /etc/event.d/rcS-late.new /etc/event.d/rcS-late
rm /etc/event.d/rcS-late.new
# change /etc/init.d/rcS
# this sed command starts on line 197 and if it finds: load_extra_module
# it will replace it with: load_extra_module newline and a mount for usr and opt
sed "197s:load_extra_modules:load_extra_modules\nmount /usr || echo 'Failed to mount /usr'\nmount /opt || echo 'Failed to mount /opt':" /etc/init.d/rcS > /etc/init.d/rcS.new
cp /etc/init.d/rcS.new /etc/init.d/rcS
rm /etc/init.d/rcS.new
# fstab
cat << FSTAB > /etc/fstab
rootfs / rootfs defaults,errors=remount-ro,noatime 0 0
/dev/mmcblk0p6 /usr ext2 rw,noatime,nodiratime,errors=continue 0 0
/dev/mmcblk0p5 /opt ext2 rw,noatime,nodiratime,errors=continue 0 0
/dev/mmcblk0p3 none swap sw 0 0
/dev/mmcblk0p2 /home ext2 rw,noatime,nodiratime,errors=continue 0 0
/dev/mmcblk0p1 /home/user/MyDocs vfat noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0

FSTAB
mkdir /usra
mount /dev/mmcblk0p6 /usra
cp -a /usr/* /usra/
mount /home
mount /home/user/MyDocs
mount /dev/mmcblk1p1 /media/mmc1
cp -a /media/mmc1/user /home/

mkdir /tmproot
mount -o bind / /tmproot
And if it isn't obvious you need rootsh/gainroot

Last edited by ruskie; 2009-12-16 at 06:01. Reason: Added a mer detailed explanation of the sed commands
 

The Following 6 Users Say Thank You to ruskie For This Useful Post:
Posts: 145 | Thanked: 88 times | Joined on Nov 2009 @ Copenhagen
#52
Originally Posted by 白い熊 View Post
Based on my exploits, a guide to "repartition" the N900:

http://sumoudou.org/0/5.html

BEWARE: if you mess up in any single step, you'll brick your N900, and will have to reflash, so not for the meek. You're on your own.

But I did it this way, so it works.
If I don't want to partition right away, could I without problems just do this part:

Code:
   cd /usr/share/
   for FILE in fonts icons locale mime nokia-maps pixmaps sounds themes tutorial-applet zoneinfo
      do
      mv $FILE /home/root/usr/share/
      ln -s /home/root/usr/share/$FILE /usr/share/
      done
If this is ok and doesn't cause any speed issues, it would at least give me some extra MB in / to play with.
 
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#53
Yeah. you can do that.
 

The Following User Says Thank You to 白い熊 For This Useful Post:
Posts: 145 | Thanked: 88 times | Joined on Nov 2009 @ Copenhagen
#54
Thanks a lot for your fast reply! I have now done it and so far everything seems to work fine
 
eMHa's Avatar
Posts: 44 | Thanked: 29 times | Joined on Nov 2009 @ germany, heidelberg
#55
I just used an extra microSD (4GB) to build my own Debian lenny chroot. I think it's not good to mess with the disk layout of the N900. So using a chroot on extra microSD you don't have any limitations beyond the microSD and don't loose any functions, such as regular firmware updates. You also can use multiple chroots on your microSD, so you are also able to install http://repository.maemo.org/stable/fremantle/armel/.
 
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#56
Can you upload your debian rootfs somewhere?

I've had a go at making it with debootstrap, but didn't quite get it done yet...
 
Posts: 543 | Thanked: 181 times | Joined on Aug 2009 @ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
#57
Originally Posted by eMHa View Post
I just used an extra microSD (4GB) to build my own Debian lenny chroot. I think it's not good to mess with the disk layout of the N900. So using a chroot on extra microSD you don't have any limitations beyond the microSD and don't loose any functions, such as regular firmware updates. You also can use multiple chroots on your microSD, so you are also able to install http://repository.maemo.org/stable/fremantle/armel/.
It is one solution. Though not for me. Hell I don't know what I'll do with 32gb of storage on it anyway. Also building my own packages when I need to seems to be easy enough for the most part using scratchbox.

Anyway found out a few other bits like don't change passwd to use a diff shell. Seems to just break it and so on.

I need to fix those instructions I've posted.
 
Posts: 313 | Thanked: 86 times | Joined on Oct 2009
#58
so ruskie when you do df -h, what do u get?
 
Posts: 543 | Thanked: 181 times | Joined on Aug 2009 @ Universe,LocalCluster.MilkyWay.Sol.Earth.Europe.Slovenia.Ljubljana
#59
Ask and ye shall receive:

Filesystem Size Used Available Use% Mounted on
rootfs 227.8M 161.0M 62.6M 72% /
ubi0:rootfs 227.8M 161.0M 62.6M 72% /
tmpfs 1.0M 76.0k 948.0k 7% /tmp
tmpfs 256.0k 80.0k 176.0k 31% /var/run
none 10.0M 92.0k 9.9M 1% /dev
/dev/mmcblk0p6 4.9G 382.9M 4.3G 8% /usr
/dev/mmcblk0p5 2.0G 41.4M 1.8G 2% /opt
tmpfs 64.0M 4.0k 64.0M 0% /dev/shm
/dev/mmcblk0p2 19.7G 86.4M 18.7G 0% /home
/dev/mmcblk0p1 2.0G 171.3M 1.8G 8% /home/user/MyDocs
/dev/mmcblk1p1 956.1M 397.4M 558.7M 42% /media/mmc1

Enjoy
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#60
Ok, I'm just going to post a couple things here as my 5401st post

First, I have a package called "easy-chroot" in the Extras-devel repository. This lets you chroot into either an image file or a partition, and it mounts all the right things so that you can share everything with the main Maemo system. You can use Easy Debian as a slick wrapper on this system. You can chroot in as root or user, too.

Secondly, I have a bunch of rootfs stuff in qole.org/files, including a debian rootfs (for dumping into a partition), a 1.3 GB debian rootfs image (for putting in MyDocs), and a development sdk rootfs image.

I have repartitioned a "class 6" microSD card, and then used my new ext2 partition as a chroot, but it seems quite slow, no faster than using an image file in MyDocs. That concerns me. I'm waiting for more hacker types to report back after experimenting... Is the microSD slot really slow? Is it just my card?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following 3 Users Say Thank You to qole For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 00:55.