All of 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: Fri, 25 Jan 2013 00:42:45 +0200	[thread overview]
Message-ID: <5101B8E5.7050000@petroprogram.com> (raw)
In-Reply-To: <51017295.7020803@mind.be>

24.1.2013 19:42, Arnout Vandecappelle kirjoitti:
> On 01/22/13 13:41, Stefan Fr?berg wrote:
> [snip]
>> My /etc/fstab look like this
>> # /etc/fstab: static file system information.
>> #
>> # <file system> <mount pt> <type> <options> <dump> <pass>
>> /modules.sqfs        /lib/modules    squashfs   
>> defaults,auto,loop,noatime    0    0
>> /firmware.sqfs      /lib/firmware    squashfs   
>> defaults,auto,loop,noatime    0    0
>> /dev/cdrom            /mnt/cdrom    iso9660      defaults,noatime   
>> 0    0
>> /mnt/cdrom/usr.sqfs        /mnt/ro        squashfs 
>> defaults,auto,loop,noatime    0    0
>
>  Now this is a real use case for being able to split the rootfs into
> several parts.
>
>  However, as Thomas mentioned, it's simpler to just use a complete
> squashfs rootfs and put the unionfs on top of that. How? Somewhere
> early in your init.d you put something like the following (a script I
> swiped from the internet, don't remember where from; I haven't
> actually tested it myself):
>
> #!/bin/sh
>
> CHROOT_PATH="/tmp/unionfs"
> UNION_OPT="-o
> allow_other,use_ino,suid,dev,nonempty,chroot=$CHROOT_PATH,max_files=32768"
>
> #mount -t proc proc /proc
> #mount -t tmpfs tmpfs /tmp
>
> mkdir -p $CHROOT_PATH/root
> mkdir -p $CHROOT_PATH/rw
> mkdir -p /tmp/union
>
> # Mount the filesystems
> mount --bind / $CHROOT_PATH/root
> # $CHROOT_PATH/rw is already on a tmpfs so doesn't need to be mounted
>
> modprobe fuse
> $CHROOT_PATH/root/usr/bin/unionfs $UNION_OPT /rw=RW:/root=RO /tmp/union
>
> #mount -t proc proc /tmp/union/proc
>
> cd /tmp/union
> mkdir oldroot
> pivot_root . oldroot
> cd /
>
> # Move existing mounts, if any
> #umount /proc
> mount --move /oldroot/proc /proc
> mount --move /oldroot/dev /dev
> mount --move /oldroot/sys /sys
> mount --move /oldroot/tmp /tmp
> rmdir /tmp/union
>

That looks very interesting Arnout.
If that works then I will own you a whiskey bottle :-)

Stefan

      parent reply	other threads:[~2013-01-24 22:42 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
2013-01-27  7:13                 ` Stephen Turner
2013-01-24 22:42       ` Stefan Fröberg [this message]

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=5101B8E5.7050000@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.