to chris_l
I want to periodically 'freeze' current packages into a live usb, with a few persistent directories. At least /home /var have to be.
I believe archiso can do that, but copying from the running system is more straightforward to me.
and there is fun inside XD
I'm not criticizing by the way! If the reason is "just for the fun to hack it that way", that is a valid reason to me
(hell,"just for the fun to hack" is, to me, one of the most respetable reasons to do anything at all X3 )
to tomegun
Thanks for the hint. I was obviously on a wrong way.
As Mkinitcpio#usr_as_a_separate_partition suggests, I added 'usr fsck shutdown' to HOOKS array.
And that wasn't enough for a /usr in squashfs. I had to
- replace a few symlink to /usr with actual file in /boot/
- add 'loop' and 'squashfs' to MODULES array in mkinitcpio.conf
- use /new_root/usr/usr.sfs to refer the file in fstab
Am I on a proper way now?
]]>I wanted to have a empty /usr, and mount a squashfs onto it during boot.
Because I have to periodically 'freeze' current system onto a tiny usb pendrive, if you want to know.
### Here I list the points
- add 'usr' , 'fsck' , 'shutdown' to HOOKS array in mkinitcpio.conf , as Mkinitcpio#usr_as_a_separate_partition mentioned.
- add 'loop' and 'squashfs' to MODULES array in mkinitcpio.conf , to mount /usr without kernel modules in /usr.
- there may be symlink to /usr in /boot/<boot-manager> , they have to be replaced with actual file.
- use /new_root/<path> to refer the squashfs file in fstab , in my case I mounted /new_root/usr/usr.sfs to /usr