Editing User:Ruskie

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 4: Line 4:
= My repos =
= My repos =
-
  non-optified repo: deb https://repo.codemages.net/ nonopt/
+
  non-optified repo: deb https://repo.codemages.net/nonopt ./
-
  optified repo: deb https://repo.codemages.net/ opt/
+
  optified repo: deb https://repo.codemages.net/opt ./
What do the repos contain?
What do the repos contain?
Line 36: Line 36:
-
<source lang="bash">
 
-
#!/bin/bash
 
-
 
-
echo "Not for running only REFERENCE!!!"
 
-
exit
 
-
 
-
### THIS ALL APPLIES TO ALL PR 1.0 PR 1.0.1 PR 1.1 ###
 
-
 
-
# 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
 
-
</source>
 
 +
#!/bin/bash
 +
 +
echo "Not for running only REFERENCE!!!"
 +
exit
 +
 +
### THIS ALL APPLIES TO ALL PR 1.0 PR 1.0.1 PR 1.1 ###
 +
 +
# 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
Output of df -h
Output of df -h
-
<pre>
+
Filesystem                Size      Used Available Use% Mounted on
-
Filesystem                Size      Used Available Use% Mounted on
+
rootfs                  227.8M    142.0M    81.6M  64% /
-
rootfs                  227.8M    142.0M    81.6M  64% /
+
/dev/mmcblk0p6            4.9G    293.1M      4.4G  6% /usr
-
/dev/mmcblk0p6            4.9G    293.1M      4.4G  6% /usr
+
/dev/mmcblk0p5            2.0G    198.1M      1.7G  10% /opt
-
/dev/mmcblk0p5            2.0G    198.1M      1.7G  10% /opt
+
/dev/mmcblk0p2          19.7G      1.2G    17.5G  6% /home
-
/dev/mmcblk0p2          19.7G      1.2G    17.5G  6% /home
+
/dev/mmcblk0p1            2.0G    287.4M      1.7G  14% /home/user/MyDocs
-
/dev/mmcblk0p1            2.0G    287.4M      1.7G  14% /home/user/MyDocs
+
-
</pre>
+
= Setting profile from the terminal =
= Setting profile from the terminal =
Line 252: Line 248:
You can check what any of these are with: apt-cache show name
You can check what any of these are with: apt-cache show name
-
 
-
 
-
= Bootmenu =
 
-
 
-
The following is my setup for /bootmenu.sh
 
-
 
-
It is still a work in progress and requires FBCON to be actually usable.
 
-
 
-
umask 022
 
-
PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-
MODULES="twl4030-vibra
 
-
dspbridge
 
-
iommu2
 
-
omap3-iommu
 
-
omap34xxcam-mod
 
-
omap_previewer_hack
 
-
board-rx51-camera
 
-
et8ek8
 
-
ad5820
 
-
adp1653
 
-
vs6555
 
-
uinput"
 
-
 
-
if [ -L /var/run ]
 
-
then
 
-
rm -f /var/run
 
-
mkdir /var/run
 
-
fi
 
-
 
-
mount -n -t proc proc /proc
 
-
mount -n -t sysfs sysfs /sys
 
-
mount -n -t tmpfs -o size=1M,noatime tmpfs /tmp
 
-
mount -n -t tmpfs -o size=256k,mode=0755,nosuid,noatime tmpfs /var/run
 
-
 
-
 
-
mount_devpts() {
 
-
TTYGRP=5
 
-
TTYMODE=620
 
-
 
-
if [ ! -d /dev/pts ]
 
-
then
 
-
    mkdir /dev/pts
 
-
fi
 
-
 
-
if [ ! -c /dev/ptmx ]
 
-
then
 
-
    mknod /dev/ptmx c 5 2
 
-
chmod 666 /dev/ptmx
 
-
fi
 
-
 
-
mount -n -t devpts -ogid=$TTYGRP,mode=$TTYMODE devpts /dev/pts
 
-
rm -rf /var/tmp/*
 
-
}
 
-
 
-
# I hate this hack.  -- Md
 
-
make_extra_nodes () {
 
-
    if [ "$(echo /lib/udev/devices/*)" != "/lib/udev/devices/*" ]; then
 
-
cp -a /lib/udev/devices/* /dev/
 
-
    fi
 
-
  grep '^[^#]' /etc/udev/links.conf | \
 
-
  while read type name arg1; do
 
-
    [ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue
 
-
    case "$type" in
 
-
    L)
 
-
      ln -s $arg1 /dev/$name
 
-
      ;;
 
-
    D)
 
-
      mkdir -p /dev/$name
 
-
      ;;
 
-
    M)
 
-
      mknod /dev/$name $arg1 && chmod 600 /dev/$name
 
-
      ;;
 
-
    *)
 
-
      echo "unparseable line ($type $name $arg1)"
 
-
      ;;
 
-
    esac
 
-
  done
 
-
}
 
-
 
-
load_extra_modules () {
 
-
    echo -n "Loading extra modules..."
 
-
    for i in $MODULES; do
 
-
echo "Loading $i"
 
-
modprobe -q $i ||:
 
-
    done
 
-
    echo "done."
 
-
}
 
-
 
-
# Mount home and paging partitions if they are available
 
-
mount_mmc(){
 
-
    device=$1
 
-
    swap=$device"p1"
 
-
    home=$device"p2"
 
-
    test=$device"p3"
 
-
 
-
    if [ -e $test ]
 
-
    then
 
-
      echo "Mounting partition $swap for paging"
 
-
      # swap disabled as a workaround for Xorg bug, per NB#111807.
 
-
      swapon $swap
 
-
      modprobe ext3
 
-
      echo "Mounting partition $home as home directory"
 
-
      mount -t ext3 -o noatime,commit=1,data=writeback $home /home
 
-
    else
 
-
      echo "No paging partition available as $swap"
 
-
      echo "No home partition available as $home"
 
-
    fi
 
-
}
 
-
 
-
prepare_start_udev()
 
-
{
 
-
. /etc/udev/udev.conf
 
-
 
-
if [ -z "$tmpfs_size" ]; then
 
-
tmpfs_size="1M"
 
-
fi
 
-
 
-
ACTION=add
 
-
echo -n "Mounting a tmpfs over /dev..."
 
-
mount -n -o size=$tmpfs_size,mode=0755,noatime -t tmpfs none /dev
 
-
echo "done."
 
-
mkdir -p /dev/.udev/db /dev/.udev/queue
 
-
echo "" > /sys/kernel/uevent_helper
 
-
echo -n "Creating extra device nodes... "
 
-
make_extra_nodes
 
-
echo "done."
 
-
}
 
-
 
-
start_udev()
 
-
{
 
-
    prepare_start_udev
 
-
/sbin/udevd --daemon
 
-
}
 
-
 
-
make_nodes()
 
-
{
 
-
echo -n "Creating device nodes... "
 
-
 
-
if [ -x /sbin/udevtrigger ]; then
 
-
/sbin/udevtrigger
 
-
else
 
-
/sbin/udevadm trigger
 
-
#wait for all events
 
-
/sbin/udevadm settle
 
-
fi
 
-
echo "done."
 
-
}
 
-
 
-
start_udev
 
-
make_nodes
 
-
load_extra_modules
 
-
export BOOTSTATE=LOCAL
 
-
touch /tmp/$BOOTSTATE
 
-
echo $BOOTSTATE > /tmp/STATE
 
-
source /etc/resource_limits.conf
 
-
echo "About to exec dsme in state '$BOOTSTATE'."
 
-
/sbin/dsme -p /usr/lib/dsme/libstartup.so &
 
-
e2fsck -vvv -f /dev/mmcblk0p1
 
-
e2fsck -vvv -f /dev/mmcblk0p2
 
-
e2fsck -vvv -f /dev/mmcblk0p5
 
-
e2fsck -vvv -f /dev/mmcblk0p6
 
-
mount /usr/local || echo 'Failed to mount /usr/local'
 
-
mount /opt || echo 'Failed to mount /opt'
 
-
 
-
mount_devpts
 
-
mount -n -o size=64M,nosuid,nodev,noatime -t tmpfs tmpfs /dev/shm
 
-
 
-
/sbin/hwclock -s || true
 
-
 
-
 
-
hostname -F /etc/hostname
 
-
ifup lo &
 
-
ifup usb0 &
 
-
 
-
echo 0 > /proc/sys/net/ipv4/conf/default/accept_redirects
 
-
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter
 
-
echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter
 
-
echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
 
-
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
 
-
echo "49152 65535" > /proc/sys/net/ipv4/ip_local_port_range
 
-
echo 6000 > /sys/class/bluetooth/hci0/idle_timeout
 
-
 
-
# adjust other kernel parameters to minimize memory consumption
 
-
# and optimize IO pressure
 
-
echo 8 > /proc/sys/kernel/pty/max
 
-
echo 1024 > /proc/sys/kernel/threads-max
 
-
echo 8192 > /proc/sys/fs/file-max
 
-
echo 100 > /proc/sys/vm/swappiness
 
-
echo 5 > /proc/sys/vm/page-cluster
 
-
echo 500 > /proc/sys/vm/dirty_expire_centisecs
 
-
echo 65536 > /proc/sys/net/core/rmem_default
 
-
echo 16384 > /proc/sys/net/core/wmem_default
 
-
 
-
# Disable sysrq to avoid accidental console-carbage resets.
 
-
echo 0 > /proc/sys/kernel/sysrq
 
-
 
-
echo "/what/me/worry" > /proc/sys/kernel/core_pattern
 
-
echo 1 > /proc/sys/kernel/panic
 
-
echo 1 > /proc/sys/kernel/panic_on_oops
 
-
 
-
export BOOTSTATE=LOCAL
 
-
touch /tmp/$BOOTSTATE
 
-
echo $BOOTSTATE > /tmp/STATE
 
-
source /etc/resource_limits.conf
 
-
echo "About to exec dsme in state '$BOOTSTATE'."
 
-
/sbin/dsme -p /usr/lib/dsme/libstartup.so &
 
-
if [ ! -d /var/run/sshd ] ; then
 
-
  mkdir /var/run/sshd
 
-
  chmod 755 /var/run/sshd
 
-
  /usr/sbin/sshd -D &
 
-
fi
 
-
 
-
exec /bin/sh
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)