Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
user:sachy:lakatux [2021/10/13 13:16]
sachy
user:sachy:lakatux [2021/10/30 22:08] (current)
sachy custom livecd
Line 816: Line 816:
 When hibernating the system (storing the state on disk), all RAM content is dumped into the swap area. This includes also caches and other rubbish which can be safely dropped. When hibernating the system (storing the state on disk), all RAM content is dumped into the swap area. This includes also caches and other rubbish which can be safely dropped.
 By default, the pm-utils try to fit the state under 2/5 of the RAM size when hibernating to shorten the store/​reload time. This is however not a hard-limit, if the content cant fit, then more data is stored. To change the limit, one can edit /​sys/​power/​image_size to desired soft-limit in bytes. In particular, 0 means that the system will hibernate with the smallest amount of data and all caches will be dropped. By default, the pm-utils try to fit the state under 2/5 of the RAM size when hibernating to shorten the store/​reload time. This is however not a hard-limit, if the content cant fit, then more data is stored. To change the limit, one can edit /​sys/​power/​image_size to desired soft-limit in bytes. In particular, 0 means that the system will hibernate with the smallest amount of data and all caches will be dropped.
 +
 +==== Custom LiveCD ====
 +
 +When you want to have an immutable virtual machine, booting directly the LiveCD of preffered distro is the easiest option. But sometimes one might want to edit some parts of the base ISO.
 +
 +New users are created from skeleton /etc/skel, so whatever is there, the live user will have too.
 +
 +<code bash>
 +apt-get install squashfs-tools
 +mount -o loop livecd.iso /​mountpoint/​iso
 +unsquashfs /​mountpoint/​iso/​casper/​filesystem.squashfs
 +# make your changes in squashfs-root
 +mksquashfs squashfs-root filesystem.squashfs -b 1024k -comp xz -Xbcj x86 -e boot
 +# cd inside the extracted ISO content and create the isofile somewhere else
 +mkisofs -J -l -R -v -o ../​livecd_new.iso ./
 +</​code>​
 +
 +Virtualbox got a feature called "​virtual iso" (VISO), so you can point to the directory with the changed iso files without repackaging into real ISO. Good for debugging. ​
  
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki