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 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 =

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)