SliTaz SliTaz Forum

You are not logged in.

#1 2014-04-28 20:41:10

kamac
Member
Registered: 2014-01-11
Posts: 10

Modifying rootfs

Hey there.

I had to change a couple of files that lied within rootfs.gz. For this purpose, I unpacked rootfs.gz to a folder, which simply gave me the file ROOTFS(.cpio). Then, I unpacked ROOTFS, and finally was greeted with what I wanted ( files and folder structure. etc, bin folders and so on )

After I made the changes I needed, I tried to repack the whole thing.

Now this is where the problems begin.

First, I created a text file containing all the files that were needed with this command:

find . -printf "%p\n" -depth > result.txt

Then, I ran this command to pack my stuff:

cpio -o -H newc < result.txt | gzip -9 > ROOTFS.gz

Then, I put my new ROOTFS.gz file ( which suprisingly was bigger than the original. Fairly bigger ) in place of the old one, and created the .iso file. (I am using livecd)

Then I ran the beast, and unsuprisingly the kernel gave me this cheerful message:

Kernel panic: no init found. Try passing init= option to kernel

How can I fix that? I haven't modified anything but rootfs. I did recreate .iso file before (without modifying rootfs) and everything worked, so it has to be related to something being wrong with my rootfs generation.

What could it be, though? hmm

Offline

#2 2014-04-28 21:46:55

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: Modifying rootfs

Why ROOTFS with uppercases?

Offline

#3 2014-04-29 00:07:56

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Modifying rootfs

Tazlito is used to build/extract/modify/test slitaz iso

[c]tazlito extract-distro[/c] iso.to.be.modified.iso

Extracts iso:

rootfs.gz extracted to /home/slitaz/distro/rootfs

/boot/kernel,syslinux and other files to /home/slitaz/distro/rootcd

After you add/remove/modify files.

Rebuild modified root file tree in rootfs + rootcd into iso.

[c]tazlito gen-initiso[/c]

Modified iso is found in /home/slitaz/distro

Offline

#4 2014-04-29 13:36:40

kamac
Member
Registered: 2014-01-11
Posts: 10

Re: Modifying rootfs

Uh, I can't find any info about tazlito. How can I possibly use it on other linux distro than slitaz? ( I downloaded tazlito, but I lack libtaz.sh. Probably because I don't run it on slitaz distro )

Offline

#5 2014-04-29 15:22:49

kamac
Member
Registered: 2014-01-11
Posts: 10

Re: Modifying rootfs

Alright, for some reason it doesn't work either. When I try to run the outputted .iso, it tells me that it couldn't find DEFAULT or UI in the kernel, then a new line appears and makes me type in something. (boot: )

@EDIT

Nevermind that. I simply ran out of RAM when running slitaz.

Offline

#6 2014-04-29 16:03:09

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Modifying rootfs

Boot into slitaz-base.iso or choose base in boot menu of core-4in1

Base consumes only 31MB of hard memory on boot.

Mount /home/slitaz/distro on slitaz to r/w hard drive partition or flash drive.

If there is swap partition on attached drive verify it has been auto enabled with [c]free[/c] command.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.020 seconds, 7 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]