Moving var to hard disk.
-
- Interessierter
- Beiträge: 42
- Registriert: Dienstag 8. Dezember 2009, 19:46
Moving var to hard disk.
Hi Forum,
I am trying to move var directory to hard disk on DM7000S box running with Enigma the image created using cvs from tuxbox-cvs.sourceforge.net I believed the procedure should be straight forward as normal Linux but it not happening the contents of /var tend to get copied but usage of var does not! Kernel only look to /var which exist on ROM. AND there another directory /var_init whose role yet I could not figure out what it is? As content of this directory i.e. var_init are different and gauging possibility to move this directory too?
I will be greatly appreciated is some one can explain how to move var on to hard disk using telnet issuing command manually? OR if script can satisfy the condition where I can find such script.
Thank in advance.
I am trying to move var directory to hard disk on DM7000S box running with Enigma the image created using cvs from tuxbox-cvs.sourceforge.net I believed the procedure should be straight forward as normal Linux but it not happening the contents of /var tend to get copied but usage of var does not! Kernel only look to /var which exist on ROM. AND there another directory /var_init whose role yet I could not figure out what it is? As content of this directory i.e. var_init are different and gauging possibility to move this directory too?
I will be greatly appreciated is some one can explain how to move var on to hard disk using telnet issuing command manually? OR if script can satisfy the condition where I can find such script.
Thank in advance.
-
- Foren-Moderator
- Beiträge: 297
- Registriert: Montag 11. Oktober 2004, 14:51
Re: Moving var to hard disk.
ok, lets start by explaining, that the contents of var_init get copied to /var if you "reset to factory defaults", that is at least its purpose
apart from the fact that with a moving harddisk getting /var mounted on a harddisk doesnt make any sense IMHO, the procedure should be to edit /etc/fstab and make the entry of /var point to where you want it to be e.g. /dev/ide/host0/bus0/target0/lun0/part1 (depends on your harddisk layout)
hope that helps
regards
HB
apart from the fact that with a moving harddisk getting /var mounted on a harddisk doesnt make any sense IMHO, the procedure should be to edit /etc/fstab and make the entry of /var point to where you want it to be e.g. /dev/ide/host0/bus0/target0/lun0/part1 (depends on your harddisk layout)
hope that helps
regards
HB
-
- Interessierter
- Beiträge: 42
- Registriert: Dienstag 8. Dezember 2009, 19:46
Re: Moving var to hard disk.
Currently the hard drive already mounted on OS as a hdd directory if I issue:
The above is snapshot from device /mnt/hdd1 mounted in mnt directory. If I check cd hdd I can view all the contents of hdd and subsequently create directory and copy contents of var but making kernel to read from the /mnt.hdd1/var is tricky cause currently fstab file is completely blank and READ ONLY. When I try to edit using vi the message pops up readonly cannot write.
CAUSE file system squashFS applies on /etc/ file system too.
the question is how to make /etc/fstab? Although I tried to
Code: Alles auswählen
~ > ls
bin etc lib proc sbin sys var
dev hdd mnt root share tmp var_init
~ > cd hdd
/mnt/hdd1 > ls
download log movie pictures swapswapfile
epg lost+found photos swapfile tmp
/mnt/hdd1 >
CAUSE file system squashFS applies on /etc/ file system too.
the question is how to make /etc/fstab? Although I tried to
Code: Alles auswählen
/etc > chmod +x fstab
chmod: fstab: Read-only file system
-
- Neugieriger
- Beiträge: 5
- Registriert: Sonntag 14. Februar 2010, 18:32
Re: Moving var to hard disk.
Hi,shylock_1 hat geschrieben:Code: Alles auswählen
/etc > chmod +x fstab chmod: fstab: Read-only file system
Edit squashfs, I do so (true for dbox2):
telnet to the box:
# Killall all processes to that level (true for dbox2):
# Ps
PID Uid VmSize Stat Command
1 root 504 S init
2 root SW [keventd]
3 root SWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
7 root SW [mtdblockd]
13 root SWN [jffs2_gcd_mtd3]
27 root 552 S / sbin / inetd
54 root SW [avia_av_wdt]
130 root SW [rpciod]
132 root 380 R telnetd
133 root 660 S-sh
137 root 504 S init
138 root 572 R ps "
Then:
# mkdir /tmp/root
# mount-t squashfs-o ro /dev/mtdblock/2 /tmp/root # "to dream7000 squashfs may be another number,"
# cd /tmp/root
# ls-all
You'll see about that:
/tmp/root # ls-all
-rw-r - r - 1 root root 124 Jan 24 16:40. version
drwxr-xr-x 1 root root 941 Jan 24 16:39 bin
drwxr-xr-x 1 root root 25 Feb 21 2004 boot
drwxr-xr-x 1 root root 0 Feb 21 2004 dev
drwxr-xr-x 1 root root 266 Oct 22 15:14 etc
drwxr-xr-x 1 root root 0 Feb 24 2004 hdd
drwxr-xr-x 1 root root 896 Dec 29 17:20 lib
drwxr-xr-x 1 root root 0 Feb 21 2004 mnt
drwxr-xr-x 1 root root 0 Feb 21 2004 proc
drwxr-xr-x 1 root root 20 Feb 21 2004 root
drwxr-xr-x 1 root root 223 Sep 8 15:27 sbin
drwxr-xr-x 1 root root 41 Sep 24 19:38 share
drwxr-xr-x 1 root root 0 Feb 21 2004 tmp
drwxr-xr-x 1 root root 0 Feb 21 2004 var
-rw-r - r - 1 root root 705,798 Dec 2 22:43 vmlinuz
In the command below will create a squash-rw directory to which you will already have access and we will be able to write about it in the forbidden parts.
/tmp/root # cp-a. /var/tmp/squash-rw
/tmp / root # cd /var/tmp/squash-rw
/var/tmp/squash-rw # umount/tmp/root # saving space ...
Next edit /etc/fstab
/var/tmp/squash-rw # cd etc/fstab
/var/tmp/squash-rw/etc/fstab # vi fstab
.....
After you finish the changes, archiving:
/var/tmp # tar-cf squash-rw.tar.gz /var/tmp/squash-rw
And then copy it to your computer, where development environment (tuxbox-cvs).
Untar for example to /home/tuxbox/,
/home/tuxbox # ls-all
drwxr-xr-x 10 root root 4096 February 19 13,27 squash-rw
In a folder exist mksquashfs-lzma (at least to me so)
debian: /home/tuxbox/dbox2/cdk/bin # ls-all
....
-rwxr-xr-x 1 root root 176,624 February 6 14,31 mksquashfs-lzma
....
This is a tool for squash, for dbox2, for the DM7000, is probably like ... I do not know.
debian: /home/tuxbox/dbox2/cdk/bin # ./mksquashfs-lzma /home/tuxbox/squash-rw /home/tuxbox/squash-ro.img-be
After a while we prepared root partition - squash-ro.img, then install it on the receiver.
In my dbox2 of this method works, I do not know how to apply for DM7000.
Forgive me for bad English ... I hope I did not say anything stupid ...
-
- Interessierter
- Beiträge: 42
- Registriert: Dienstag 8. Dezember 2009, 19:46
Re: Moving var to hard disk.
Thanks for valuable help....but I need to clarify following:
Following processes are currently running in DM7000s box
Thank you.
How to edit squashfs? (please out line its steps if possible)Edit squashfs, I do so (true for dbox2):
WHICH level please?Killall all processes to that level (true for dbox2):
Following processes are currently running in DM7000s box
Code: Alles auswählen
ps
PID USER VSZ STAT COMMAND
1 root 508 S init
2 root 0 SWN [ksoftirqd/0]
3 root 0 SW< [events/0]
4 root 0 SW< [khelper]
13 root 0 SW< [kblockd/0]
14 root 0 SW [khubd]
25 root 0 SW [pdflush]
26 root 0 SW [pdflush]
28 root 0 SW< [aio/0]
27 root 0 SW [kswapd0]
98 root 0 SW [kseriod]
119 root 0 SW [mtdblockd]
136 root 596 S /bin/sh /etc/init.d/rcS
156 root 0 SW< [fe_thread]
159 root 0 DW< [ci]
170 root 0 SW [cifsoplockd]
186 root 0 SWN [jffs2_gcd_mtd1]
207 root 632 S /sbin/inetd
214 root 0 SW [kjournald]
246 root 656 S dccamd
247 root 11672 S /bin/enigma
282 root 516 S telnetd
283 root 744 S -sh
320 root 668 R ps
-
- Neugieriger
- Beiträge: 5
- Registriert: Sonntag 14. Februar 2010, 18:32
Re: Moving var to hard disk.
Yes, maybe we should kill /bin/enigma, all cam's (dccamd <-?). Otherwise looks like a dbox2.
What is the structure of the flash DM7000s?
To me is such: (dbox2)
If the root is Squashfs, then in debian:/home/tuxbox/dbox2/cdk/bin must have mksquashfs or mksquashfs-lzma ...
Otherwise, the idea is such mounting root (read oonly) to /tmp, copying it to a new folder to have "read/write" file system (root(rw)), umount of the root(ro) to save space. In the presence of HDD can be used folders on HDD.
You can make symbolic links to new /var directories on hard disk. The old /var remain symbolic links (shortcuts), and on /mnt/hdd1/var (for example) things from the old /var. It is not possible to move everything, but emu, plugins, shoutcast, picons, logos, may be transferred.
In DM7000s, is it possible start from the hard disk? In DM7000s there a USB port?
Can examine the structure of the other image, to see how things are made.
What is the structure of the flash DM7000s?
To me is such: (dbox2)
Code: Alles auswählen
dbox /var > cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00004000 "BR bootloader"
mtd1: 00020000 00020000 "FLFS (U-Boot)"
mtd2: 00520000 00020000 "root (Squashfs)"
mtd3: 002a0000 00020000 "var (JFFS2)"
mtd4: 007e0000 00020000 "Flash without bootloader"
mtd5: 00800000 00020000 "Complete Flash"
dbox /var >
Otherwise, the idea is such mounting root (read oonly) to /tmp, copying it to a new folder to have "read/write" file system (root(rw)), umount of the root(ro) to save space. In the presence of HDD can be used folders on HDD.
I am trying to move var directory to hard disk on DM7000S
You can make symbolic links to new /var directories on hard disk. The old /var remain symbolic links (shortcuts), and on /mnt/hdd1/var (for example) things from the old /var. It is not possible to move everything, but emu, plugins, shoutcast, picons, logos, may be transferred.
In DM7000s, is it possible start from the hard disk? In DM7000s there a USB port?
Can examine the structure of the other image, to see how things are made.
-
- Interessierter
- Beiträge: 42
- Registriert: Dienstag 8. Dezember 2009, 19:46
Re: Moving var to hard disk.
Thanks....
The contents of mtd file is as follow
My initial plan is in two phase :
Phase 1
1/ Create a extra partition on existing hard disk shall I say ext3 exclusively for var with least 5GB
2/ Format the partition and mount var there and original var could be remain on ROM; but empty.
3/ modify the file /etc/fstab so the automatic mount procedure can be activated after post boot. (All this happening using telnet interaction)
Once above procedure established worked correctly then modify the cvs.tuxbox script file i.e. algorithms
phase 2
if ./configure suffix == --enable-ide
then
move var on hdd1 like /mnt/hdd1/var
move tmp on hdd1 like /mnt/hdd1/tmp
create swapfile in like /mnt/hdd1/tmp/swapfile
end
The above proc considered to be relible for long term usage with hdd, although hdd will be spinning rather than sleep mode. But as good solution for ever growing plugins and add-on and libs, setting etc.
I came across that using symbolic link to var on hdd1; while cvs.tuxbox 1.1.0v create initial symbolic link to hdd as its i.e. /mnt/hdd1 to hdd on the root.
I recall 2Gether Strombreaker's image 2.2v for DM7000s tend to have this flavor I can only assume that they using symbolic link to var on hdd1 and original var directory on ROM still remain but hold smylink, just a guess.
The contents of mtd file is as follow
Code: Alles auswählen
~ > cat /proc/mtd
dev: size erasesize name
mtd0: 00600000 00020000 "DreamBOX cramfs+squashfs"
mtd1: 001c0000 00020000 "DreamBOX jffs2"
mtd2: 00040000 00020000 "DreamBOX OpenBIOS"
mtd3: 007c0000 00020000 "DreamBOX (w/o bootloader)"
mtd4: 00800000 00020000 "DreamBOX (w/ bootloader)"
mtd5: 004e0000 00020000 "DreamBOX SquashedFS"
mtd6: 00120000 00020000 "DreamBOX Cramfs"
Phase 1
1/ Create a extra partition on existing hard disk shall I say ext3 exclusively for var with least 5GB
2/ Format the partition and mount var there and original var could be remain on ROM; but empty.
3/ modify the file /etc/fstab so the automatic mount procedure can be activated after post boot. (All this happening using telnet interaction)
Once above procedure established worked correctly then modify the cvs.tuxbox script file i.e. algorithms
phase 2
if ./configure suffix == --enable-ide
then
move var on hdd1 like /mnt/hdd1/var
move tmp on hdd1 like /mnt/hdd1/tmp
create swapfile in like /mnt/hdd1/tmp/swapfile
end
The above proc considered to be relible for long term usage with hdd, although hdd will be spinning rather than sleep mode. But as good solution for ever growing plugins and add-on and libs, setting etc.
I came across that using symbolic link to var on hdd1; while cvs.tuxbox 1.1.0v create initial symbolic link to hdd as its i.e. /mnt/hdd1 to hdd on the root.
I recall 2Gether Strombreaker's image 2.2v for DM7000s tend to have this flavor I can only assume that they using symbolic link to var on hdd1 and original var directory on ROM still remain but hold smylink, just a guess.
-
- Neugieriger
- Beiträge: 5
- Registriert: Sonntag 14. Februar 2010, 18:32
Re: Moving var to hard disk.
That's fine, but you will load the driver for hdd during launch DM7000? Because when dbox2 driver hdd, load much later, as the boot log info.3 / modify the file / etc / fstab so the automatic mount procedure can be activated after post boot. (All this happening using telnet interaction)
-
- Erleuchteter
- Beiträge: 625
- Registriert: Samstag 8. September 2007, 16:17
Re: Moving var to hard disk.
*closed* -> illegal/unsupported content!