Page 1 of 1

how open & close initrd.xz

Posted: 30 Jan 2017, 19:15
by lolololo
Hello
someone can explain me how open & close initrd.xz of porteus 3.2.2??

i see here information about here:
http://www.porteus.org/component/conten ... ernel.html
but only explain about "Updating initial ramdisk for pxe boot" no how to change it

I also suppose that the new kernel use aufs 4 and not 3 how Is in the guide or tutorial "Compilation and usage of custom Porteus kernel "

thanks and hi

Re: how open & close initrd.xz

Posted: 30 Jan 2017, 21:10
by Bogomips
Probably be able to extract from it:

Code: Select all

guest@porteus:~$ bsdtar  tf  initrd.xz 
.
sys
memory
memory/images
memory/xino
memory/copy2ram
memory/changes
fatal
dev
tmp
cleanup
proc
porteus
init
lib
lib/libe2p.so.2.3
lib/libext2fs.so.2.4
lib/libpthread.so.0
lib/libe2p.so.2
lib/libgcc_s.so
lib/libuClibc-0.9.33.2.so
lib/libc.so.0
lib/libuuid.so.1.3.0
lib/libcom_err.so.2
lib/libgcc_s.so.1
lib/libblkid.so.1.1.0
lib/libcom_err.so.2.1
lib/libext2fs.so.2
lib/modules
lib/libuuid.so.1
lib/libpthread-0.9.33.2.so
lib/ld-uClibc-0.9.33.2.so
lib/libblkid.so.1
lib/ld-uClibc.so.0
run
m
opt
opt/000-kernel
etc
etc/mtab
usr
usr/share
usr/share/pciids
usr/share/pciids/AMD
usr/share/pciids/AMD/amd-catalyst
usr/share/pciids/AMD/amd-catalyst-legacy
usr/share/pciids/nVidia
usr/share/pciids/nVidia/96.43
usr/share/pciids/nVidia/304
usr/share/pciids/nVidia/173.14
usr/share/udhcpc
usr/share/udhcpc/default.script
usr/lib
usr/lib/libntfs-3g.so.85.0.0
usr/lib/libntfs-3g.so.85
usr/lib/libntfs-3g.so
usr/bin
usr/bin/blkid
usr/bin/ntfs-3g
usr/bin/reiserfsck
usr/bin/e2fsck
union
var
var/log
var/tmp
bin
bin/dmesg
bin/md5sum
bin/bash
bin/grep
bin/vi
bin/lsmod
bin/kill
bin/halt
bin/ifconfig
bin/tac
bin/sed
bin/mount
bin/chroot
bin/modprobe
bin/umount
bin/clear
bin/ls
bin/ln
bin/pivot_root
bin/route
bin/sh
bin/touch
bin/eject
bin/sync
bin/sleep
bin/df
bin/ping
bin/cat
bin/free
bin/usleep
bin/find
bin/switch_root
bin/uniq
bin/lspci
bin/sort
bin/cp
bin/losetup
bin/chown
bin/basename
bin/ps
bin/udhcpc
bin/killall
bin/busybox
bin/reboot
bin/modinfo
bin/uname
bin/cut
bin/mkdir
bin/tail
bin/poweroff
bin/tr
bin/rev
bin/mknod
bin/rmdir
bin/rm
bin/lsof
bin/egrep
bin/chmod
bin/mv
mnt
linuxrc
Also:

Code: Select all

guest@porteus:~$ bsdcpio -it < initrd.xz
.
sys
memory
memory/images
memory/xino
memory/copy2ram
memory/changes
fatal
dev
tmp
cleanup
proc
porteus
init
...
bin/mv
mnt
linuxrc
3698 blocks
Which you may be able to use to put together a new initrd with requested xz compression.

Re: how open & close initrd.xz

Posted: 31 Jan 2017, 01:56
by Ed_P
:shock: There's a LOT of stuff in that file!!

Re: how open & close initrd.xz

Posted: 31 Jan 2017, 09:18
by tome

Re: how open & close initrd.xz

Posted: 02 Feb 2017, 17:10
by lolololo
tome thanks your answer is the final solution
Bogomips "bsdtar tf initrd.xz" only list the fikes does not extract it
thanks to both

about aufs4 I answer myself
is required for kernel 4.x should be update tutorial about kernel
i compiled kernel 4.9.6 stable in porteus 3.2.2 using your ".config" and only retouched for activate high memory PAE, all compiled without problems all very fine.
If anyone wants it just ask for it.

bye and thanks again

Re: how open & close initrd.xz

Posted: 02 Feb 2017, 20:52
by Bogomips
lolololo wrote: Bogomips "bsdtar tf initrd.xz" only list the fikes does not extract it
  • Code: Select all

    guest@porteus:~$ bsdtar  xf  initrd.xz  usr/lib
  • Code: Select all

    guest@porteus:~$ tree usr/
    usr/
    └── lib
        ├── libntfs-3g.so -> libntfs-3g.so.85.0.0
        ├── libntfs-3g.so.85 -> libntfs-3g.so.85.0.0
        └── libntfs-3g.so.85.0.0
    1 directory, 3 files
    
    guest@porteus:~$ ls -lh usr/lib/libntfs-3g.so.85.0.0 
    -rwxr-xr-x 1 guest users 239K Apr 16  2016 usr/lib/libntfs-3g.so.85.0.0*
    
RTFM is the Name of the Game. :twisted:

Re: how open & close initrd.xz

Posted: 04 Feb 2017, 19:05
by lolololo
with X yes but foe me is more easy the other method that bsdtar or bsdcpio.

Re: how open & close initrd.xz

Posted: 13 Mar 2017, 02:13
by brokenman
someone can explain me how open & close initrd.xz of porteus 3.2.2??
To extract the initrd.xz file

Code: Select all

xz -d < initrd.xz | cpio -i
To repack it move into the unpacked directory

Code: Select all

find | cpio -H newc -o | xz --check=crc32 --x86 --lzma2 > /tmp/initrd.xz