Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Fröberg" <stefan.froberg@petroprogram.com>
To: buildroot@busybox.net
Subject: [Buildroot] Squashfs boot
Date: Sun, 27 Jan 2013 01:04:22 +0200	[thread overview]
Message-ID: <510460F6.1020507@petroprogram.com> (raw)
In-Reply-To: <51045AD4.1000100@mind.be>

27.1.2013 0:38, Arnout Vandecappelle kirjoitti:
> On 01/25/13 22:55, Stefan Fr?berg wrote:
>> Hello Stephen
>>
>> I made a quick conversion of my LiveCD initramfs stuff to squashfs image
>> file and then played little bit with it and kernel image
>> with the help of qemu. (took less time than starting all
>> reconfiguring/combiling from buildroot)
>>
>> The good news is that yes, it should be doable to do boot directly from
>> squashfs root image.
>>
>> For example I did this to start it (ramdisk_size is in kilobytes):
>>
>> qemu-system-i386 -kernel bzImage -initrd rootfs.sqfs -append
>> "ramdisk_size=131072"
>>
>> It first tries to unpack rootfs as initramfs and then it notices that
>> it's not initramfs but traditional,
>> older version of initrd file. (please see root.png).
>>
>> After that it should print RAMDISK: squashfs filesystem found and start
>> automatically loading it to ram.
>> (please see root2.png)
>>
>> After that it continues normally and starts the normal init process.
>>
>> And now the bad news:
>>
>> - Takes a lot of memory. This is old style initrd stuff (time when 2.4
>> kernel was still hot and new).
>
>  Yes, using squashfs as initrd is probably not what you want: it will
> load the entire squashfs into memory (albeit compressed), and then
> copy it (and decompress) when you access it.
>
>  The typical way to use squashfs is as a partition of your disk. So if
> you'd boot from a USB stick, you'd make two partitions: an ext2 for
> grub and the kernel, and a second one for the squashfs. To install it,
> just do "cat output/images/rootfs.sqfs > /dev/sdb2" (assuming your USB
> key is /dev/sdb and squashfs is the second partition). When booting,
> you append the following the kernel command line: "root=/dev/sda2
> rootwait" (assuming there's no hard disk or anything so the USB key
> will end up as /dev/sda).
>

But I understanded that he didn't want to use partition to boot but
directly from squashfs image.
At least that's how I understanded this part in his message:  "It would
be ideal to run the systems from a file instead of dd a image to an area"


Regards
Stefan

  reply	other threads:[~2013-01-26 23:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAN_xxrWTp21-a-jD7x11yJa6ghM=C=ON2h_bx_is1iFhEkE0bQ@mail.gmail.com>
2013-01-22  1:25 ` [Buildroot] Squashfs boot Stephen Turner
2013-01-22 12:41   ` Stefan Fröberg
     [not found]     ` <CAN_xxrVD=Tq=ekME-jdHKRzyUwXk0PMocQX9mrxxcgjZQ8SYqA@mail.gmail.com>
2013-01-22 17:49       ` Stefan Fröberg
     [not found]         ` <CAN_xxrXZWmhECAH1JfgvHk+U_wksdZ0ZyxpcaSea8KsEYy04mw@mail.gmail.com>
2013-01-22 19:39           ` Stefan Fröberg
2013-01-22 20:20         ` Peter Korsgaard
2013-01-23 15:57         ` Thomas Petazzoni
2013-01-23 16:05           ` Stefan Fröberg
2013-01-23 16:18             ` Thomas Petazzoni
2013-01-23 16:31               ` Stefan Fröberg
2013-01-24 17:42     ` Arnout Vandecappelle
2013-01-24 19:29       ` Stephen Turner
2013-01-24 22:40         ` Stefan Fröberg
     [not found]           ` <CAN_xxrXsvvupyo61cqZhCR4JyLwtCsm1NRAh9JCy_uVHRqGO4A@mail.gmail.com>
2013-01-25 21:55             ` Stefan Fröberg
2013-01-26 22:38               ` Arnout Vandecappelle
2013-01-26 23:04                 ` Stefan Fröberg [this message]
2013-01-27  7:13                 ` Stephen Turner
2013-01-24 22:42       ` Stefan Fröberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510460F6.1020507@petroprogram.com \
    --to=stefan.froberg@petroprogram.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox