Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux Development (http://www.linux-archive.org/archlinux-development/)
-   -   support for /usr on a separate partition (http://www.linux-archive.org/archlinux-development/620807-support-usr-separate-partition.html)

Dave Reisner 01-14-2012 01:48 AM

support for /usr on a separate partition
 
Hi all,

With the release of mkinitcpio 0.8.2, we've added support for mounting
/usr from early userspace when it exists as a separate partition. This
has been something people have been asking about for a little while, so
I figured I'd make a call out for the feature.

There's two requirements to make sure this works:

1) Include the shutdown hook in /etc/mkinitcpio.conf. This copies the
contents of the initramfs to /run/initramfs during bootstrap and
additionally adds a small script (cleverly called shutdown). On
shutdown, initscripts will bind mount the API filesystems into
/run/initramfs, pivot into this new root, and then unmount the real
filesystems from top to bottom.

For the time being, this is a fairly dumb process. We don't break down
stacked filesystems like LVM or close crypt mappings. I may aim to do
for the next release.

2) Include the fsck hook in /etc/mkinitcpio.conf. This needs to go
_before_ autodetect if your /usr is a different FS from your root.
Neglecting to add the fsck hook will result in bad things. I expect
this to change next release and the fsck hook will be smart enough to
grab binaries for only root and usr.

The fsck hook is highly recommended for everyone, not just those with a
separate /usr. Running fsck in early userspace means the device can be
checked before it's even mounting -- any and all repairs can be
performed without the need for a reboot.

With systemd, this pretty much all works the same. The shutdown script
is honored, and your root will not be re-fsck'd due to a tell-tale file
dropped in /run/initramfs.

Happy testing!

dave

Isaac Dupree 01-14-2012 02:30 AM

support for /usr on a separate partition
 
On 01/13/2012 09:48 PM, Dave Reisner wrote:

The fsck hook is highly recommended for everyone, not just those with a
separate /usr. Running fsck in early userspace means the device can be
checked before it's even mounting -- any and all repairs can be
performed without the need for a reboot.


Currently my mkinitcpio.conf contains BINARIES="fsck fsck.ext4".
I forget whether I put it there (probably did). Can/must I remove those
from the BINARIES line to add this new fsck hook?


Thanks
-Isaac

Don Juan 01-14-2012 03:11 AM

support for /usr on a separate partition
 
On 01/13/2012 07:30 PM, Isaac Dupree wrote:

On 01/13/2012 09:48 PM, Dave Reisner wrote:

The fsck hook is highly recommended for everyone, not just those with a
separate /usr. Running fsck in early userspace means the device can be

Should it be moved to hooks now?


checked before it's even mounting -- any and all repairs can be
performed without the need for a reboot.


Currently my mkinitcpio.conf contains BINARIES="fsck fsck.ext4".
I forget whether I put it there (probably did). Can/must I remove
those from the BINARIES line to add this new fsck hook?


That is how it is in the wiki is with those in the binaries part.


Thanks
-Isaac


Should it be moved to hooks now?

Thanks

Myra Nelson 01-14-2012 07:13 AM

support for /usr on a separate partition
 
On Fri, Jan 13, 2012 at 20:48, Dave Reisner <d@falconindy.com> wrote:

> Hi all,
>
> With the release of mkinitcpio 0.8.2, we've added support for mounting
> /usr from early userspace when it exists as a separate partition. This
> has been something people have been asking about for a little while, so
> I figured I'd make a call out for the feature.
>
> There's two requirements to make sure this works:
>
> 1) Include the shutdown hook in /etc/mkinitcpio.conf. This copies the
> contents of the initramfs to /run/initramfs during bootstrap and
> additionally adds a small script (cleverly called shutdown). On
> shutdown, initscripts will bind mount the API filesystems into
> /run/initramfs, pivot into this new root, and then unmount the real
> filesystems from top to bottom.
>
> For the time being, this is a fairly dumb process. We don't break down
> stacked filesystems like LVM or close crypt mappings. I may aim to do
> for the next release.
>
> 2) Include the fsck hook in /etc/mkinitcpio.conf. This needs to go
> _before_ autodetect if your /usr is a different FS from your root.
> Neglecting to add the fsck hook will result in bad things. I expect
> this to change next release and the fsck hook will be smart enough to
> grab binaries for only root and usr.
>
> The fsck hook is highly recommended for everyone, not just those with a
> separate /usr. Running fsck in early userspace means the device can be
> checked before it's even mounting -- any and all repairs can be
> performed without the need for a reboot.
>
> With systemd, this pretty much all works the same. The shutdown script
> is honored, and your root will not be re-fsck'd due to a tell-tale file
> dropped in /run/initramfs.
>
> Happy testing!
>
> dave
>

Forgot to read my email before upgrading. Dave is right about bad things
happening if you don't put fsck hook in mkinitcpio. Really bad things.

Myra

PS. Lots of downgrading got it back up.

--

Life's fun when your sick and psychotic!


All times are GMT. The time now is 02:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.