0

I've made a single .img. It's a minimal Ubuntu which includes a rootfs and various installs. A kernel and kernel modules are installed.

I'd like to compress my .img and have the bootloader load uncompress it and load it into RAM (I don't want any persistence). I've been reading the grub manual, but still don't know how to try to boot either my .img or a compressed version.

How can I boot my .img into RAM? Or, is it impossible?

1 Answers1

0

Such compressed filesystem is called squashfs, it is used in many distros for live CD.

Loading fs in RAM seems what Grub command map does, also map --mem.

  • I've read http://askubuntu.com/questions/95392/how-to-create-a-bootable-system-with-a-squashfs-root I don't understand if I should run "sudo apt-get install live-boot live-boot-initramfs-tools extlinux" on the PC I want to boot the image, inside the chroot of the rootfs filesystem I've been building, or on the host where I am building the rootfs. It also seems I do need to have the kernel as a separate file (as opposed to both the kernel and rootfs) in a single file. Thank your for your comment, I will keep reading and changing my image. Make a squashfs is definitely a set I need. – ears_and_tails Dec 11 '14 at 21:03
  • They refer to quite detailed instruction: https://help.ubuntu.com/community/LiveCDCustomizationFromScratch

    You should install live-boot and friends to host OS.

    – Vladimir Kovalchuk Dec 12 '14 at 21:38