You are not logged in.

#1 2010-07-29 07:45:16

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

[Solved] howto correctly recompress root-image.sqfs?

I want to "remaster" the official arch install ISO, so as to add a custom AIF config-file and add this to /etc/rc.local: 'aif -p automatic -c /etc/config'.

I then extract root-image.sqfs from the ISO, installs squashfs-tools and decompress root-image.sqfs with: 'unsquashfs root-image.sqfs'.

Then I make my changes and recompress root-iamge.sqfs with: 'mksquashfs squashfs-root root-image.sqfs'.

I then add the "remastered" root-image.sqfs to the ISO and try to run it in qemu, but it fails with an error(sorry i'm not at home now and cannot remember what the error was, but it was about not being able to mount the new filesystem).

Also, when i try to mount the "remastered" root-image.sqfs, then there is displayed an error-message about the image not having a superblock(or not a correct superblock?).

So, could any of you smart ppl then please tell me if I have to compress the root-image.sqfs in another way than I did? I mean with some extra parameters in the mksqashfs command-line?

Btw, I know there's also tools like archiso and larch etc., but as I want verything to be the same as the original ISO, except two small changes, then I would rather just change the original ISO, than to make a completelly new one.

Thanks in advance!

Martin.

Last edited by mhertz (2010-07-31 00:43:07)

Offline

#2 2010-07-30 09:54:56

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: [Solved] howto correctly recompress root-image.sqfs?

Hmm, very strange... I tried the exact same procedure again, and then it worked!

Btw, I forgot to previously mention that I had looked at the archiso scripts and saw that it also just used standard: 'mksquashfs <source> [dest]', except that also '-noappend' was added additionally, but since my "dest" file is freshly made and non-existing preliminary, then that extra parameter shouldn't make a difference in my case...

I am still having some strange things occuring though, but not the same error as before, but instead then sometimes I get a faulty bash command-line prompt where no commands work after having log'ed in???

I seem to have narewed it down to it happening if I add extra stuff(the 'eject' binary) to root-image.sqfs, in addition to just editing /etc/rc.local? I'm pretty stumbed at the momment about this, or maybe it's something related to running the eject binary from rc.local, even though I cannot see how that should bork the system like that?

Offline

#3 2010-07-31 00:41:05

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: [Solved] howto correctly recompress root-image.sqfs?

OK, sorry guys, my last problem was because obviously I cannot eject the mounted filesystem and then continuing issuing commands afterwards!

However, the very first problem i reported in the first post I have no explenation for why worked the second time around, but as it hasen't come up again after several tests now, then i'm just gonna mark this thread as solved now!

Btw, I ended up just adding:

aif -p automatic -c /etc/config
reboot

To '/etc/rc.local', and then adding the aif 'config' to '/etc', and then altering the timeout to 10 secs + making 'existing'(i.e. boot from hdd) the default in isolinux.cfg, and then everything works great and is fully unattended smile

Sorry again for wasting your time reading about a non-existing issue(the later one!).

CU, Martin.

Last edited by mhertz (2010-07-31 12:40:26)

Offline

Board footer

Powered by FluxBB