PDA

View Full Version : Problems with 5.3.1DVD - Create a persistent disk image



knppi
07-09-2008, 04:24 PM
Hi all,

Having trouble when I try to "Overwrite/update stored system configuration" in the menu following the boot up prompt (I'm using " knoppix home=/mnt/sda2/knoppix.img").

I get the following error:

"rsync: recv_generator: failed to stat "/UNIONFS/etc/ssh/.wh..wh..opq": operation not permitted (1)"

After this it just hangs and I have to reset the machine.

Anyone else come across this problem or have any ideas.



Thanks all for your time.

knoppixL0V3R
07-14-2008, 12:26 PM
Hi i have the same problem :(

I use cheatcode : knoppix myconfig=/media/sda1 or knoppix myconfig=scan or without cheatcodes when knoppix live DVD finds the knoppix.img and i click o.k. to use it. Maybee the problem start when last time i used the knoppix.img normal, without problem, wanted to update upgrade to much programs(via synaptic) and ended up not have free space to complete the installation.


The sda1 is a usb Fllash Voyager 4GB usb2.0

stevesr0
07-23-2008, 11:39 PM
There is a post with a patch for this problem.

I am rather nonexpert in all the details, but a user posted his patch in April and Klaus replied that the patch looked ok and he would put it in the next release. I have not tried to work this patch yet, but I am also interested in making a persistent disk image with 5.3.1.

Steve

The post is as follows:

Patch for knoppix-mkimage

by Ronny Standtke Apr 26, 2008; 06:32pm ::

Hi all,

Today I used Knoppix-5.3.1 for a while and then decided to create a persistent
KNOPPIX disk image.

My first attempt failed with an error message from rsync that there is no
space left on the device. I tried increasing the disk image size again and
again but it did not help. Then I noticed that the path names in the rsync
error message became longer and longer and looked like an endless recursion.
At this point in time I started to investigate this issue a little more...

knoppix-mkimage mounts the disk image to /tmp/knxhome and uses this directory
as the destination when rsync'ing /ramdisk. There is one central issue
here: /tmp/knxhome is a subdirectory of /ramdisk. So basically, you are
rsyncing a directory to one of its own subdirectories. In previous versions
of Knoppix this was probably not really a problem, because older versions of
rsync first get a complete file-list and then start to copy files. But, since
version 3.0 rsync uses a feature called "incremental file-list recursion". It
just looks up some files, transfers them, looks up the next bunch of files,
etc. Now you probably see the problem: When /ramdisk contains much more files
than rsync catches with its first file-list creation round and rsync finally
reaches /ramdisk/tmp/knxhome it considers the already copied files as new
files to be copied. Eternal recursion starts and the universe collapses. :-)

You can reproduce this bug by booting Knoppix, creating a lot of files in your
home directory (i.e. surf the web for a while, install some software packages
or unpack some source packages) and try creating the persistent disk image.

I fixed this bug by using /tmp_knxhome as mount point for the disk image (see
attached patch). I am not a l33t shell script h4xor, not at all. I don't know
if I did everything right. Please take a look.

Greetings

Ronny

[knoppix-mkimage.diff]
--- knoppix-mkimage.original 2008-04-26 08:13:58.498639618 +0200
+++ knoppix-mkimage 2008-04-26 08:17:03.212588966 +0200
@@ -346,14 +346,16 @@
# Start progress display and copy data
gauge "$MESSAGE9" &
mke2fs -m0 "$LOOPDEV" 2>"$TMP.err" || { killgauge; $DIALOG --cr-wrap --title "$TITLE1" --msgbox "$ERROR `cat $TMP.err`" 10 75; bailout; }
-mkdir -p /tmp/knxhome
-mount -t ext2 "$LOOPDEV" /tmp/knxhome 2>"$TMP.err" && rsync --exclude /ramdisk/var/tmp/ --exclude /ramdisk/etc/mtab --exclude /etc/mtab -Ha /ramdisk/ /tmp/knxhome 2>"$TMP.err" || { umount /tmp/knxhome 2>/dev/null; killgauge; $DIALOG --cr-wrap --title "$TITLE1" --msgbox "$ERROR `cat $TMP.err`" 10 75; bailout; }
+MOUNT_POINT=/tmp_knxhome
+mkdir -p $MOUNT_POINT
+mount -t ext2 "$LOOPDEV" $MOUNT_POINT 2>"$TMP.err" && rsync --exclude /ramdisk/var/tmp/ --exclude /ramdisk/etc/mtab --exclude /etc/mtab -Ha /ramdisk/ $MOUNT_POINT 2>"$TMP.err" || { umount $MOUNT_POINT 2>/dev/null; killgauge; $DIALOG --cr-wrap --title "$TITLE1" --msgbox "$ERROR `cat $TMP.err`" 10 75; bailout; }

# Save knoppix.sh script ?
# Rather add some links in the network/printer configuration scripts that go to the pesistent homedir.

# Finish
-umount /tmp/knxhome
+umount $MOUNT_POINT
+rmdir $MOUNT_POINT
[ -n "$LOOPDEV" ] && losetup -d "$LOOPDEV"
umount "$DIRECTORY" 2>/dev/null
killgauge


Re: Patch for knoppix-mkimage
Click to flag this post
by Klaus Knopper-2 Apr 26, 2008; 09:14pm :: Rate this Message: - Use ratings to moderate (?)
Reply | Reply to Author | Print | View Threaded | Show Only this Message
On Sun, Apr 27, 2008 at 12:32:44AM +0200, Ronny Standtke wrote:

> Hi all,
>
> Today I used Knoppix-5.3.1 for a while and then decided to create a persistent
> KNOPPIX disk image.
>
> My first attempt failed with an error message from rsync that there is no
> space left on the device. I tried increasing the disk image size again and
> again but it did not help. Then I noticed that the path names in the rsync
> error message became longer and longer and looked like an endless recursion.
> At this point in time I started to investigate this issue a little more...
>
> knoppix-mkimage mounts the disk image to /tmp/knxhome and uses this directory
> as the destination when rsync'ing /ramdisk. There is one central issue
> here: /tmp/knxhome is a subdirectory of /ramdisk. So basically, you are
> rsyncing a directory to one of its own subdirectories. In previous versions
> of Knoppix this was probably not really a problem, because older versions of
> rsync first get a complete file-list and then start to copy files. But, since
> version 3.0 rsync uses a feature called "incremental file-list recursion". It
> just looks up some files, transfers them, looks up the next bunch of files,
> etc. Now you probably see the problem: When /ramdisk contains much more files
> than rsync catches with its first file-list creation round and rsync finally
> reaches /ramdisk/tmp/knxhome it considers the already copied files as new
> files to be copied. Eternal recursion starts and the universe collapses. :-)
>
> You can reproduce this bug by booting Knoppix, creating a lot of files in your
> home directory (i.e. surf the web for a while, install some software packages
> or unpack some source packages) and try creating the persistent disk image.
... [show rest of quote]

Curiously, I did not catch this bug before, probably because of what you
suggested, that previous versions of rsync handled overlapping src/dst
copies differently. And it just was wrong to mount the persistent home
inside the directory to copy in the first place. Actually, /tmp should
probably be a different tmpfs than /ramdisk.

> I fixed this bug by using /tmp_knxhome as mount point for the disk image (see
> attached patch). I am not a l33t shell script h4xor, not at all. I don't know
> if I did everything right. Please take a look.

Your patch looks OK, thanks a lot. Scheduled for next release.

Regards
-Klaus Knopper

knoppixL0V3R
07-24-2008, 03:26 PM
Thanks stevesr0, i am not sure that the problem is 100% the same( i have had a working persistent image for let's say 2-3 weeks),but the lesson i learned(my working around solution with new persistent image) is to always have minimum 1/3 of knoppix.img free/not in use and the same for ramdisk (1/3 of ramdisk minimum,always free),and never try again to use the option "Overwrite/update stored system configuration". I have 1GB ram,350 MB SWAP and i use a 3.5 GB knoppix.img size.

stevesr0
07-25-2008, 04:36 PM
Thanks.

Yours might be the only solution I need (when I try to set this up)!

Steve

johnrw
02-09-2009, 04:41 AM
Looking at knoppix-image, all the way down at the end... I see this bit of code.



case "$SELECTION" in *overwrite*)
[ -z "$OLDHOMEDIR" ] && rsync --update --exclude /ramdisk/etc/mtab -Ha /ramdisk/etc/ /UNIONFS/etc
;;
esac

I guess the point of that option is to use the /ramdisk files as the source and put them into the persistent home. I recently ran into a situation where I tried using a knoppix.img on a different machine, and since the knoppix.img had hardware specific files from the old machine in the image... it was a bit of a problem to update the config. That would have been a good time for the option:

Overwrite/update stored system configuration

to have worked... which led me here. My problem was that X thought I had an nVidia graphics card, when the new machine had an ATI card. I found the file xserver in /etc/sysconfig that said i had an nVidia... so I wound up booting knoppix clean... and copied /etc/sysconfig to a thumbdrive. Then I copied that back from the thimbdrive when I had booted into the knoppix.img... and then did an mkxorgconfig to update. Then X would start!

Adel
04-07-2009, 06:39 PM
Hi stevesr0
Thanks for your info on patch but I could not use it cause when I try to run it, it fails with such an error: there is no such a command "killgauge".
I'm using Knoppix 6.0.1 which I've installed it on a USB flash disk.

bash: killgauge: command not found
bash: --cr-wrap: command not found
bash: bailout: command not found

And I've changed the disk image size two times but each time it gets full very soon and the problem still remains.
Any idea?
Best regards

johnrw
04-07-2009, 09:04 PM
Adel,

You don't need those lines that begin with guage and killguage.
I would just put a # in the first char position.

They just appear to make a progress display.

# Start progress display and copy data
gauge "$MESSAGE9" &

Edit:
Hmm, I see there are compound statements... with killguage in them.
You can try deleting the killguage ; part...
That would mean... you also need to remove the semicolon following killguage.

Ie... this line would need changing.
mke2fs -m0 "$LOOPDEV" 2>"$TMP.err" || { killgauge; $DIALOG --cr-wrap --title "$TITLE1" --msgbox "$ERROR `cat $TMP.err`" 10 75; bailout; }

TO:
mke2fs -m0 "$LOOPDEV" 2>"$TMP.err" || { $DIALOG --cr-wrap --title "$TITLE1" --msgbox "$ERROR `cat $TMP.err`" 10 75; bailout; }

Adel
04-07-2009, 09:52 PM
Thanks for the reply, Johnrw
Currently I'm trying to keep my Desktop as clean as possible ! That's a simple solution as mentioned by knoppixL0V3R.
Anyway, I'll try to run the script but I'm new with Linux and also so many things have changed in Knoppix 6 !
Best Regards

johnrw
04-08-2009, 12:40 AM
Thanks stevesr0, i am not sure that the problem is 100% the same( i have had a working persistent image for let's say 2-3 weeks),but the lesson i learned(my working around solution with new persistent image) is to always have minimum 1/3 of knoppix.img free/not in use and the same for ramdisk (1/3 of ramdisk minimum,always free),and never try again to use the option "Overwrite/update stored system configuration". I have 1GB ram,350 MB SWAP and i use a 3.5 GB knoppix.img size.

My current knoppix.img is 30GB and it runs fine at that size.

I also agree with knoppixL0V3R, avoid using the Overwrite option like the plague. If you plan on changing the machine, once you are booted and using the persistent home on the new machine, copy /ramdrive/etc/sysconfig to /etc/sysconfig and reboot. The files in /ramdrive/etc/sysconfig have what knoppix diagnosed the hardware on bootup. If the persistent image has a permanent copy of the /etc/sysconfig files from your old machine... they would need to be updated in a new machine with different hardware.

On other fronts...
Since I am playing with VirtualBox (PUEL edition), I decided to move that knoppix.img into a VirtualBox image. Since I did it in a quick and dirty way... I have to type home=scan for it to find the image. If I really wanted to put all the effort into it... I would use Gilles minirt_531.gz and grub4dos, or maybe even grub and have a menu that already has the peristent image cmdline setup. But I do have Knoppix 5.3.1 running in VirtualBox now.

I have been running Debian Lenny now for about a month. From there, I do my flavors in VirtualBox. If I need MS Word official... I fire up XP in a VM. In short... I finally found something Microsoft and I agree on. We both now regard XP as legacy. As in the days when Windows 95 came... and I was always clicking that MSDos icon... now I have a XP icon to click. It says VirtualBox but contains my last XP installation.

I can move it from computer to computer too, and so when this pc dies... I won't have any upgrade worries. :)
Google Docs has my "office" stuff now. So I don't boot ex-xp, xxp... whatever, much anymore. Even with it right there as a 'program', it is now legacy. Ask Microsoft.