Re: Quick question regarding permissions and tar

2003-08-21 Thread Darik Horn
tar cvfPpj /home/mark/secure-server-woody.tar.bz2 /home/image/secure-server
Run `tar jtvvf secure-sever-woody.tar.bz2` and notice how every file in the tarball has the '/home/image/secure-server' prefix.  This will make it difficult to unpack.  (The 'Pp' switches are not doing what you think they're doing.)

You will get the desired result by doing this:

# cd /home/image/secure-server
# tar jcf /home/mark/secure-server-woody.tar.bz2 *
You can install the tarball to a new disk by doing this:

# mkdir /target
# mount /dev/MyDisk /target
# cd /target
# tar jxf /home/mark/secure-server-woody.tar.bz2
# [install a boot loader to the new disk]
If you really need the initial '/' in the tarball, then you'll need to do something like this:

# chroot /home/image/secure-secure
# tar --exclude /out.tar.bz2 -jcvPf out.tar.bz2 /
# exit
Mark C wrote:

Hi,

I've created a snapshot of a secure locked down server running woody that
was stetup on a secure non net connnected pc, I've got it setup to run
discover and a few other apps on boot to automatically detect hardware and
so forth, so I can then extract this to any new server and setup a few
basic things like fstab,lilo,partitioning and updates etc..
I've installed the harddrive to another pc that again is not net
connected, but running woody with Gnome, I've mounted the hardrive and
created a compressed image of the new system:
tar cvfPpj /home/mark/secure-server-woody.tar.bz2 /home/image/secure-server

Basically this will compress using bz2 compression, do not strip slashes
and keep the permissions of the files.
This is fine, I have a live cd (opps, running gentoo basic, as its only
66mb), which I have copied the image to and use to extract to a new pc.
The problem I'm getting is that its not keeping the correct permissions,
it looks like its taking the permissions from the host livecd.
This I can understand, but when I chroot into the new environment, all the
permissions are messed up, where as in /dev/ where is should say i.e.
cdrom it only says 18 for the group (yes cdrom is listed in /etc/groups).
I can cure this by copying the same version of group from the newly
extracted system into the live cd after boot up and then wipe the
extracted image and re extract the new image again.
Basically is there any way around this problem? apart from creating my own
livecd using debian as a base
(I know I could try knoppix, but I really want a small base live cd,so
there is space for the new image)
Thanks

Mark
 



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Quick question regarding permissions and tar

2003-08-20 Thread Mark C
Hi,

I've created a snapshot of a secure locked down server running woody that
was stetup on a secure non net connnected pc, I've got it setup to run
discover and a few other apps on boot to automatically detect hardware and
so forth, so I can then extract this to any new server and setup a few
basic things like fstab,lilo,partitioning and updates etc..

I've installed the harddrive to another pc that again is not net
connected, but running woody with Gnome, I've mounted the hardrive and
created a compressed image of the new system:

tar cvfPpj /home/mark/secure-server-woody.tar.bz2 /home/image/secure-server

Basically this will compress using bz2 compression, do not strip slashes
and keep the permissions of the files.

This is fine, I have a live cd (opps, running gentoo basic, as its only
66mb), which I have copied the image to and use to extract to a new pc.

The problem I'm getting is that its not keeping the correct permissions,
it looks like its taking the permissions from the host livecd.
This I can understand, but when I chroot into the new environment, all the
permissions are messed up, where as in /dev/ where is should say i.e.
cdrom it only says 18 for the group (yes cdrom is listed in /etc/groups).

I can cure this by copying the same version of group from the newly
extracted system into the live cd after boot up and then wipe the
extracted image and re extract the new image again.

Basically is there any way around this problem? apart from creating my own
livecd using debian as a base
(I know I could try knoppix, but I really want a small base live cd,so
there is space for the new image)

Thanks

Mark
-- 
To steal ideas from one person is plagiarism,
to steal ideas from many is research.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]