[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to extract the content of the Knoppix 5.3.0 minirt.gz ?



Hello John,

On Fri, Mar 14, 2008 at 01:29:40AM -0400, John Woods wrote:
> Hi Gilles,
> 
> Well I gave it a try... but this is beyond me apparently.
> 
> gunzip minirt.gz
> mkdir init_tmp
> cd init_tmp
> cpio -imvd --no-absolute-filenames -I ../minirt

A shortcut would be:
mkdir -p init_tmp && init_tmp
zcat ../minirt.gz | sudo cpio -idmv --no-absolute-filenames

>  make changes... to these files... then
> 
> find . | cpio --quiet -o -H newc | gzip -9 > ../minirt.gz

Looks OK.

> but my minirt.gz is smaller
> 
> -rw-r--r-- 1 root root 1465564 Mar 14 00:11 minirt.gz
> -r--r--r-- 1 knoppix knoppix 1471612 Feb 16 16:19 minirt.orig.gz
> 
> Also The first cpio command had some curious error messages... where
> it looked like it was trying to remove the leading slashes... but at
> times it looked like it was trying to overwrite device names from the
> root of the filesystem. I am puzzled, and glad I can't break this
> Knoppix. The only thing I can break is my knoppix.img  which I
> probably would have had I done that as root.
> 
> Lot of these types of errors...
> cpio: Removing leading `/' from member names

That's not an error, though.

> cpio: dev/ttyp6: Operation not permitted
> dev/ttyp6

It means "you cannot create a device file if you are not root".

> and more of these.
> 
> cpio: Removing leading `/' from member names
> etc/mtab
> cpio: Removing leading `/' from member names
> cpio: cannot remove current lib/terminfo/l/linux: Read-only file system
> lib/terminfo/l/linux

This looks like you extracted from within the wrong directory, indeed.
The filename is relative (otherwise it would start with a /), but maybe
there are existing symlinks to the rot filesystem inside the current
directory? Please recheck if this error really occurs when you are in a
subdirectory.

> cpio: Removing leading `/' from member names
> static/ntfs-3g
> 
> It produced enough errors to consume the whole Konsole buffer and some.
> Klaus?

I have done this extract and recompress, and it worked fine, without
overwriting files The only prblem is that you cannot create device files
if not being root, and also, file owners are wrong.

I may reconsider the abslute filenames in initramfs for the next release,
it really does not seem to be necessary. But they should do no harm when
using option --no-absolute-filenames either.

Regards
-Klaus Knopper


Reply to: