LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Knoppix K3B DVD write problem (https://www.linuxquestions.org/questions/linux-newbie-8/knoppix-k3b-dvd-write-problem-540190/)

ArthurDent 03-24-2007 10:07 AM

Knoppix K3B DVD write problem
 
http://www.linuxquestions.org/questi...d.php?t=540189

Hello all,

I'm currently trying to recover from a hard drive failure as you can see from this thread and while I can read my /home partition I want to make a DVD backup.

The problem is that when Knoppix mounts the /home partition it shows /home/me , /home/wife and /home/son as locked. If I try to make a backup to DVD of these directories using K3B as the standard user it says that I don't have the necessary permission.

If I launch K3B as root (sudo k3b) it can read these directories but it gives me an error stating that growisofs is not installed!

Now I suppose I could mount the partition and change the permissions on the directories, but at this stage I don't want to write anything to my - still very fragile - hard drive if I can help it.

Is there any way around this conundrum?

Thanks in advance

Mark

GrapefruiTgirl 03-25-2007 07:26 PM

I'm not sure what growisofs does (other than the obvious: make iso filesystems by some means) but, is it installed on the screwed-up drive?? And not on knoppix? Is that the issue?

Instead of trying to read them as a standard user, or trying to use growisofs from Knoppix, perhaps you want to:
0 - become root in knoppix..
1- mount the damaged drive read-only somewhere from knoppix.
2 - chroot yourself into the damaged drive.
3 - use your 'growisofs' or whatever tools you want, to copy the damaged drive's contents out to another media or another drive.

If I have understood you correctly, I hope this helps. :)

ArthurDent 03-26-2007 04:01 AM

Not exactly...

The issue is as follows:

I have a damaged drive from which I have partially recovered. It is still very fragile so I don't want to risk any sort of writing to it (and I am still hoping to be able to recover some of the other - as yet missing - partitions). Therefore I am only accessing the system via a live CD (Knoppix v.5.1.1).

One of the partitions that is readable is my /home partition. While I still can I want to get the data off it (without risking any form of writing). Unfortunately the actual FC6 OS partition is still corrupted so I can't chroot into that.

When I boot into the live CD and mount the /home partition it shows my users as being "locked" i.e. I do not have read permission.

If I try to launch K3B as the normal Knoppix user I cannot therefore read and copy the /home/users directories onto DVD.

If I launch K3B as root I can now read the /home directories but it forbids the use of growisofs as a security threat.
Here is the extract from the growisofs man page: (See here for more details) :
Code:

If executed under sudo(8) growisofs refuses to start. This is done for the following reason. Naturally growisofs has to access the data set to be recorded to optical media, either indirectly by letting mkisofs generate ISO9660 layout on-the-fly or directly if a pre-mastered image is to be recorded. Being executed under sudo(8), growisofs effectively grants sudoers read access to any file in the file system. The situation is intensified by the fact that growisofs parses MKISOFS environment variable in order to determine alternative path to mkisofs executable image. This means that being executed under sudo(8), growisofs effectively grants sudoers right to execute program of their choice with elevated privileges. If you for any reason still find the above acceptable and are willing to take the consequences, then consider running following wrapper script under sudo(8) in place for real growisofs binary.
        #!/bin/ksh
        unset SUDO_COMMAND
        export MKISOFS=/path/to/trusted/mkisofs
        exec growisofs "$@"

I have tried creating that script but it just locks my system...

Any other ideas?

Thanks for helping...

Mark

GrapefruiTgirl 03-26-2007 09:15 AM

Can you use SU rather than SUDO?
and then run growisofs as root? (Might be just another means to the same end.. ie, won't work)

How about using gparted (parted) from (a)the live CD to duplicate the partition? I have done this using the Ubuntu live CD, and copied a partition.
parted works excellently, and will copy a partition exactly as it is, to another location, where even if there is some file corruption from the damage, it will atleast be safe to read & write and work within the newly copied version.


All times are GMT -5. The time now is 03:03 PM.