View Single Post
Posts: 13 | Thanked: 6 times | Joined on Oct 2012 @ Damascus, Syria
#264
Originally Posted by ArchiMark View Post
Can you please clarify, is Arch installed all on your microSD card or ?

From your partition info, it seems like it is on your card....but from some comments read, I'm not sure...

Hope to get Arch installed on my 900 soon.....

Thanks.
Wlecome dude

so you need to install Arch on emmc

1- Partitioning

First things first , you have to know how to partition your emmc
The easiest way is to use BackupMenu

- Install BackupMenu from the repos

when done

- Open N900 keyboard, reboot then enter BackupMenu

- Chose Mass storage mode (press d)
Now you have direct access to partitions in the emmc

- Use gparted (easy) or cfdisk

you should keep the 1st partition as fat32 cuz it has u-boot config on it (bootimg.img.d and .src)
unless you change the config dir ( which I want to learn how ^_^ )
and be careful
<< consider making backup, use BackupMenu >>

- I recommend using Extended partition type ( since MBR only allow for 4 primary partitions in the same device )

extended partitions starts numbering from 5
mmcblk0p5 (first partition in Extended )
mmcblk0p6 (second partition)
and so on..

(Skip making swap partition now , you can do it later)

2- Format your partition
after partitioning you should format the partition to ext2/3/4

If formating from PC (recommended)
Code:
mkfs.ext4 /dev/sdb5
else from N900
Code:
mkfs.ext4 /dev/mmcblk0p5
3- Mount the partition

if you are mounting from your PC (recommended)
Code:
mount -t ext4 /dev/sd?? /mnt/arch
(if you don't know what "sd??" mean just ask :] )
/dev/sdb5 ( in my case )

OR from your N900

Code:
mount -t ext4 /dev/mmcblk0p5 /mnt/arch
4- Extract FileSystem (also sync)

Code:
cd /mnt/arch

tar xzvf Arch-Skry-Unofficial-Img.tar.gz; sync
This may take some time ( faster if you do it from PC )


5- Install and configure U-boot

Install u-boot version (that spports booting 3.x kernels)
add boot entry in /etc/bootmenu.d/Arch.item

example
Code:
ITEM_NAME="Arch Linux ARM"
ITEM_KERNEL="/boot/uImage"
ITEM_DEVICE="${INT_CARD}p5"
ITEM_FSTYPE="ext4"
ITEM_OMAPATAG="1"
ITEM_CMDLINE="root=/dev/mmcblk1p5 rootwait init=/bin /systemd omapfb.vram=0:3M,1:3M,2:3M quiet"
This should work if you untar the image FileSystem on /dev/mmcblk0p5
run
Code:
u-boot-update-bootmenu

reboot
- Chose Arch from the menu

- Then run in U-boot console

Code:
run emmcboot
Done.

------------------------------------------------------------------------
For testing.

I wrote a simple script to chroot to this arch from maemo.

arch-chroot.sh
------------------------------------------------------------------------
Code:
echo "==> Mounting FS"
mount /dev/mmcblk0p5 /mnt/arch

echo "==> Mounting proc, sys, dev/pts/, dev/ "
cd /mnt/arch
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
mount -t devpts pts dev/pts/

echo "==>Chroot to Arch"
chroot /mnt/arch /bin/bash
echo "Done!"
When done from Arch chroot, run
Code:
exit

close-arch.sh
------------------------------------------------------------------------
Code:
cd /mnt/arch
echo "==> Umounting proc, sys, dev/pts/, dev/ "
umount proc/
umount sys/
umount dev/pts/
umount dev/

echo "==>Closing Arch chroot"
cd && sleep 5
umount /mnt/arch ||  umount /dev/mmcblk0p5
echo "Done!"

Have Fun

Last edited by AhmadMhd; 2013-03-27 at 20:03.
 

The Following 4 Users Say Thank You to AhmadMhd For This Useful Post: