Zum Inhalt springen

Hack-A-N900/First Steps: Unterschied zwischen den Versionen

Amir (Diskussion | Beiträge)
Amir (Diskussion | Beiträge)
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
<b>WARNING:</b> That's where the pleasure and pain of N900 starts. How much pleasure and/or pain depends highly on how familiar you are with linux. So make sure you know how to accomplish simple administrative tasks via a root shell without bricking your system and do regular [http://metalab.at/wiki/Hack-A-N900/Backup backups].
<b>WARNING:</b> That's where the pleasure and pain of N900 starts. How much pleasure and/or pain depends highly on how familiar you are with linux. So make sure you know how to accomplish simple administrative tasks via a root shell without bricking your system and do regular [[Hack-A-N900/Backup | backups]].


=== Root Access ===
=== Root Access ===
Zeile 40: Zeile 40:


=== OpenSSH ===
=== OpenSSH ===
Install OpenSSH client and server:
<pre>
apt-get install openssh
</pre>


Generate ssh key:
Generate ssh key:
Zeile 77: Zeile 72:


<pre>
<pre>
apt-get install bash coreutils-gnu grep-gnu tar-gnu wget vim
apt-get install bash coreutils-gnu grep-gnu findutils-gnu tar-gnu wget vim netcat
</pre>
</pre>


Zeile 118: Zeile 113:
alias fgrep='gfgrep'
alias fgrep='gfgrep'
</pre>
</pre>
=== Update Kernel ===
Add tesing repositories to /etc/apt/sources.list:
  deb http://repository.maemo.org/extras/ fremantle free
  deb-src http://repository.maemo.org/extras/ fremantle free
 
  deb http://repository.maemo.org/extras-testing/ fremantle free 
  deb-src http://repository.maemo.org/extras-testing/ fremantle free
apt-get update
apt-get install kernel-flasher-maemo kernel-modules-maemo
cross your thumbs now.. (you backed up before right?)
reboot
WELCOME TO YOUR UPDATED SYSTEM THAT SUPPORTS UNIONFS \o/!
=== Create unionfs / chroot overlay filesystem for development ===
Create a 2 GB file on /home/user/MyDocs/sandbox/fs.img
  mkdir /home/user/MyDocs/sandbox/
  cd /home/user/MyDocs/sandbox/
  dd if=/dev/zero of=fs.img bs=1M count=1 seek=2048
  mkfs.ext2 fs.img
Get the shiny overlay/chroot shellscript
  wget http://metalab.at/wiki/images/d/d8/Chroot-unionfs.sh  '''WARNING the link might be different now look here: [[Bild:Chroot-unionfs.sh]]'''
  mv chroot-unionfs.sh /sbin/chroot-unionfs
  chmod +x /sbin/chroot-unionfs
This script doeas some magic including
* loading the dm-loop kernel module (for /dev/loop? devices)
* overlaying the unionfs filesystem
* mounting all needed filesystem folders inside the unionfs
* chroot()'ing inside
It is started like this:
bash /sbin/chroot-unionfs -v -t /home/user/MyDocs/sandbox/fs.img
Read the source to find out about command line parameters like -t for testing and others..
If this script is successful you should find yourself in a chrooted environment inside the unionfs
touch /CHROOTED
ls /CHROOTED    # it should be here!
exit
  ls /CHROOTED  # it should be gone!


[[Kategorie:N900]]
[[Kategorie:N900]]