Optional /usr merge in Gentoo

classic Classic list List threaded Threaded
219 messages Options
1234 ... 11
Reply | Threaded
Open this post in threaded view
|

Optional /usr merge in Gentoo

Alessio Ababilov
Hi!

I wrote a script that allows /usr merge in Gentoo without changes to ebuilds.


Are there any volunteers to test it? I use it on my computers for two months.

Alessio Ababilov
Senior Software Engineer
Grid Dynamics
Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

东方巽雷
more information?


2013/8/13 Alessio Ababilov <[hidden email]>
Hi!

I wrote a script that allows /usr merge in Gentoo without changes to ebuilds.


Are there any volunteers to test it? I use it on my computers for two months.

Alessio Ababilov
Senior Software Engineer
Grid Dynamics

Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Alessio Ababilov
"/usr merge" is the process of making /bin, /sbin, and /lib to be symlinks to corresponding directories in /usr. It is done in Fedora and several other distros now, and also in Solaris 15 years ago.
Benefits from /usr merge are described here: http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/

In few words, the script is run once to merge /usr on a running system. Also, the script is installed in post_src_install hook to perform /usr merge during package updates or installations.

2013/8/13 东方巽雷 <[hidden email]>
more information?


2013/8/13 Alessio Ababilov <[hidden email]>
Hi!

I wrote a script that allows /usr merge in Gentoo without changes to ebuilds.


Are there any volunteers to test it? I use it on my computers for two months.

Alessio Ababilov
Senior Software Engineer
Grid Dynamics


Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

pk-5
On 2013-08-13 16:05, Alessio Ababilov wrote:

> "/usr merge" is the process of making /bin, /sbin, and /lib to be symlinks
> to corresponding directories in /usr. It is done in Fedora and several
> other distros now, and also in Solaris 15 years ago.
> Benefits from /usr merge are described here:
> http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
> Technical details are here:
> http://aababilov.wordpress.com/2013/07/17/usr-merge-in-gentoo/
>
> In few words, the script is run once to merge /usr on a running system.
> Also, the script is installed in post_src_install hook to perform /usr
> merge during package updates or installations.

So, how would this work for me who have /usr on a separate harddrive?
And what would be the benefit? To me, mentioning Fedora, makes the alarm
bells go off...

Best regards

Peter K

Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

the guard
In reply to this post by Alessio Ababilov
On 08/13/13 18:05, Alessio Ababilov wrote:

> "/usr merge" is the process of making /bin, /sbin, and /lib to be
> symlinks to corresponding directories in /usr. It is done in Fedora and
> several other distros now, and also in Solaris 15 years ago.
> Benefits from /usr merge are described here:
> http://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/
> Technical details are here:
> http://aababilov.wordpress.com/2013/07/17/usr-merge-in-gentoo/
>
> In few words, the script is run once to merge /usr on a running system.
> Also, the script is installed in post_src_install hook to perform /usr
> merge during package updates or installations.

The site doesn't describe any real problems.

Also I don't see how the current dir tree is not compatible
with gnu autoconf/automake.

--
Stop talking and start compiling.
Linux user #557897

Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Alessio Ababilov

2013/8/13 the <[hidden email]>
The site doesn't describe any real problems.
Well, it is a question to discuss.
I am not going to begin a holy war, I would like just to provide a possibility to perform a harmless /usr merge for those who share FreeDesktop's opinion.

Also I don't see how the current dir tree is not compatible
with gnu autoconf/automake. 
In a simple way: please look at coreutils-8.20.ebuild that has to move a lot of binaries from /usr/bin to /bin:

                cd "${D}"/usr/bin
                dodir /bin
                # move critical binaries into /bin (required by FHS)
                local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
                           mkdir mknod mv pwd rm rmdir stty sync true uname"
                mv ${fhs} ../../bin/ || die "could not move fhs bins"

2013/8/13 pk <[hidden email]>
So, how would this work for me who have /usr on a separate harddrive?
If you have an initrd, it will work.
Anyway, I just look for people that are interested in /usr merge.

And what would be the benefit? To me, mentioning Fedora, makes the alarm
bells go off...
Yes. it does. Fedora is a big distro sponsored by Red Hat and its /usr merge will be in RHEL-7. That's not a great idea to fight against upstream if it will do /usr merge. Remember, /bin/mail now is moved to /usr/bin/mail - what will be the next?

Sincerely,
Alessio Ababilov
Senior Software Engineer
Grid Dynamics
Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Canek Peláez Valdés
In reply to this post by Alessio Ababilov
On Tue, Aug 13, 2013 at 4:08 AM, Alessio Ababilov
<[hidden email]> wrote:
> Hi!

Hi Alessio.

> I wrote a script that allows /usr merge in Gentoo without changes to
> ebuilds.
>
> I described it in an article
> http://aababilov.wordpress.com/2013/07/17/usr-merge-in-gentoo/
>
> Are there any volunteers to test it? I use it on my computers for two
> months.

I think it's a great experiment, but perhaps too much work for little
gain, at least currently.

The next council meeting will vote if separated /usr without and
initramfs is officially supported by Gentoo; I hope this time around
finally is officially and unequivocally stated by the council that a
separated /usr without an initramfs is *NOT* supported.

When that is out of the way, several packages will start to naturally
move to /usr, since most upstreams are doing that, and eventually we
will have empty /bin, /sbin, and /lib directories. Then there will be
no need for a script to move everything to /usr; which is good: I
believe in Gentoo a flag-day doesn't really work.

The usr-merge will be a slow, gradual change; it will probably take
years. The systemd package entered the tree in June 2011, after more
than a year in an overlay, and then it took more than two years to
make it an official alternative to OpenRC. The /usr merge will take a
similar amount of time, if not longer.

But it's good to know that you can do the merge now; thanks for
sharing your experiment.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Daniel Campbell-2
In reply to this post by Alessio Ababilov
On 08/13/2013 01:08 PM, Alessio Ababilov wrote:

>
> 2013/8/13 the <[hidden email] <mailto:[hidden email]>>
>
>     The site doesn't describe any real problems.
>
> Well, it is a question to discuss.
> I am not going to begin a holy war, I would like just to provide a
> possibility to perform a harmless /usr merge for those who share
> FreeDesktop's opinion.
>
>
>     Also I don't see how the current dir tree is not compatible
>     with gnu autoconf/automake.
>
> In a simple way: please look at coreutils-8.20.ebuild that has to move a
> lot of binaries from /usr/bin to /bin:
>
>                 cd "${D}"/usr/bin
>                 dodir /bin
>                 # move critical binaries into /bin (required by FHS)
>                 local fhs="cat chgrp chmod chown cp date dd df echo
> false ln ls
>                            mkdir mknod mv pwd rm rmdir stty sync true uname"
>                 mv ${fhs} ../../bin/ || die "could not move fhs bins"
>
> 2013/8/13 pk <[hidden email] <mailto:[hidden email]>>
>
>     So, how would this work for me who have /usr on a separate harddrive?
>
> If you have an initrd, it will work.
> Anyway, I just look for people that are interested in /usr merge.
>
>     And what would be the benefit? To me, mentioning Fedora, makes the alarm
>     bells go off...
>
> Yes. it does. Fedora is a big distro sponsored by Red Hat and its /usr
> merge will be in RHEL-7. That's not a great idea to fight against
> upstream if it will do /usr merge. Remember, /bin/mail now is moved to
> /usr/bin/mail - what will be the next?
>
> Sincerely,
> Alessio Ababilov
> Senior Software Engineer
> Grid Dynamics
Red Hat is only upstream for GNOME and systemd. What they choose to do
with their distro should not affect the choices of any other distro. I
see no reason for a /usr merge unless one is using Fedora or wants to
turn their Gentoo installation into a makeshift Fedora installation.
This merge should not be forced on Gentoo whatsoever.

Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Alessio Ababilov
2013/8/13 Canek Peláez Valdés <[hidden email]>
I think it's a great experiment, but perhaps too much work for little
gain, at least currently.

Thank you! 
The next council meeting will vote if separated /usr without and
initramfs is officially supported by Gentoo; I hope this time around
finally is officially and unequivocally stated by the council that a
separated /usr without an initramfs is *NOT* supported.
As I see from http://www.gentoo.org/proj/en/council/meeting-logs/20130813.txt, the council has stated that it is not supported anymore.

The usr-merge will be a slow, gradual change; it will probably take
years. The systemd package entered the tree in June 2011, after more
than a year in an overlay, and then it took more than two years to
make it an official alternative to OpenRC. The /usr merge will take a
similar amount of time, if not longer.

Yes, but systemd is a large important package and it requires changes to startup files in other packages, so, it took a lot of time.

As the opposite, /usr merge is easier and, IMHO, it doesn't introduce any _obvious_ problems to Gentoo.

2013/8/16 Daniel Campbell <[hidden email]>

Red Hat is only upstream for GNOME and systemd. What they choose to do
with their distro should not affect the choices of any other distro. I
see no reason for a /usr merge unless one is using Fedora or wants to
turn their Gentoo installation into a makeshift Fedora installation.
This merge should not be forced on Gentoo whatsoever.


I would like to ask you to understand my intension. I believe that Gentoo is a distro that is famous for providing choises (USE flags and so on). /usr merge is also a choise, and I look for volunteers and supporters.
BTW, /usr merge is not just a Fedora's caprice: is is done in Arch this year:


Sincerely,
Alessio Ababilov
Senior Software Engineer
Grid Dynamics
Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

tanstaafl-2
On 2013-08-16 8:29 AM, Alessio Ababilov <[hidden email]> wrote:

> 2013/8/13 Canek Peláez Valdés <[hidden email] <mailto:[hidden email]>>
>
>     I think it's a great experiment, but perhaps too much work for little
>     gain, at least currently.
>
> Thank you!
>
>     The next council meeting will vote if separated /usr without and
>     initramfs is officially supported by Gentoo; I hope this time around
>     finally is officially and unequivocally stated by the council that a
>     separated /usr without an initramfs is *NOT* supported.
>
> As I see from
> http://www.gentoo.org/proj/en/council/meeting-logs/20130813.txt, the
> council has stated that it is not supported anymore.

<sigh>

Great. So what does this mean for those of us with older systems with
separate /usr and don't want initramfs?

Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Canek Peláez Valdés
In reply to this post by Alessio Ababilov
On Fri, Aug 16, 2013 at 7:29 AM, Alessio Ababilov
<[hidden email]> wrote:

> 2013/8/13 Canek Peláez Valdés <[hidden email]>
>>
>> I think it's a great experiment, but perhaps too much work for little
>> gain, at least currently.
>>
> Thank you!
>>
>> The next council meeting will vote if separated /usr without and
>> initramfs is officially supported by Gentoo; I hope this time around
>> finally is officially and unequivocally stated by the council that a
>> separated /usr without an initramfs is *NOT* supported.
>
> As I see from
> http://www.gentoo.org/proj/en/council/meeting-logs/20130813.txt, the council
> has stated that it is not supported anymore.

Well, better late than never. It was about time.

>> The usr-merge will be a slow, gradual change; it will probably take
>> years. The systemd package entered the tree in June 2011, after more
>> than a year in an overlay, and then it took more than two years to
>> make it an official alternative to OpenRC. The /usr merge will take a
>> similar amount of time, if not longer.
>>
> Yes, but systemd is a large important package and it requires changes to
> startup files in other packages, so, it took a lot of time.
>
> As the opposite, /usr merge is easier and, IMHO, it doesn't introduce any
> _obvious_ problems to Gentoo.

Perhaps; please understand that I'm 100% behind the /usr merge. But
even if it's easier than the introduction of virtual/service-manager,
it's still true that in Gentoo flag days kinda don't work. The /usr
merge will happen as more and more programs move naturally from / to
/usr.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Canek Peláez Valdés
In reply to this post by tanstaafl-2
On Fri, Aug 16, 2013 at 7:35 AM, Tanstaafl <[hidden email]> wrote:

> On 2013-08-16 8:29 AM, Alessio Ababilov <[hidden email]> wrote:
>>
>> 2013/8/13 Canek Peláez Valdés <[hidden email] <mailto:[hidden email]>>
>>
>>
>>     I think it's a great experiment, but perhaps too much work for little
>>     gain, at least currently.
>>
>> Thank you!
>>
>>     The next council meeting will vote if separated /usr without and
>>     initramfs is officially supported by Gentoo; I hope this time around
>>     finally is officially and unequivocally stated by the council that a
>>     separated /usr without an initramfs is *NOT* supported.
>>
>> As I see from
>> http://www.gentoo.org/proj/en/council/meeting-logs/20130813.txt, the
>> council has stated that it is not supported anymore.
>
>
> <sigh>
>
> Great. So what does this mean for those of us with older systems with
> separate /usr and don't want initramfs?

It means exactly what the Council voted:

"Since that particular setup may already be subtly broken today
depending on the installed software, Council recommends using an early
boot mount mechanism, e.g. initramfs, to mount /usr if /usr is on a
separate partition."

If you don't want an initramfs, you are on your own. Things will start
to break subtly (probably they *are* broken *now*, you just didn't
noticed), and if you file bugs about it they will be closed as WONTFIX
or INVALID.

If you want your system to be supported, you need an initarmfs, or
anything similar that allows the system to mount /usr really early in
the boot process.

https://wiki.gentoo.org/wiki/Early_Userspace_Mounting

http://www.gentoo.org/doc/en/initramfs-guide.xml

By a quick lecture of the Council session, I believe they are even
open to a closer /usr merge than I thought. When that happens (if it
happens), your system (if you keep upgrading) will not be able to boot
for sure if you don't follow the Council suggestion.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply | Threaded
Open this post in threaded view
|

How hard is it to move separate /usr to / partition? - WAS Re: [gentoo-user] Optional /usr merge in Gentoo

tanstaafl-2
So, in order to fix a system I'd rather not reinstall from scratch...

Is this possible? Easy? Recommended?

Reply | Threaded
Open this post in threaded view
|

Re: How hard is it to move separate /usr to / partition? - WAS Re: [gentoo-user] Optional /usr merge in Gentoo

Canek Peláez Valdés
On Fri, Aug 16, 2013 at 9:35 AM, Tanstaafl <[hidden email]> wrote:
> So, in order to fix a system I'd rather not reinstall from scratch...
>
> Is this possible? Easy? Recommended?

If you have physical access to the system, and a large enough /, it's
really easy. You boot from a livecd, mount /usr in another directory,
copy all the files from it to /usr (be sure to preserve links,
permissions, attributes, etc.), change /etc/fstab, and off you go.

If you need to resize / then it's a little more difficult, but not so
much. You need again to boot with a livecd, and somewhere (a external
or internal disk with enough free space) to put the contents of / and
/usr while repartitioning an reformatting the drive that contains
them. Afterwards you just change /etc/fstab and you are good to go.

If it's a remote system then it gets hairy; any changes to how /usr is
handled should not be done while the system is running.

And really, maybe you could try an initramfs? It will be much more
easy than any juggle of filesystems.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply | Threaded
Open this post in threaded view
|

Re: How hard is it to move separate /usr to / partition? - WAS Re: [gentoo-user] Optional /usr merge in Gentoo

tanstaafl-2
Thanks for the reply Canek

On 2013-08-16 10:48 AM, Canek Peláez Valdés <[hidden email]> wrote:
> If you have physical access to the system,

I do.

> and a large enough /,

Well...

/ is 19GB, with 18GB available.

/usr is 20GB, with 13GB used, with 7.9GB available.

I guess I'd be ok with going from 18GB available on / to just 5GB
available...

> it's really easy. You boot from a livecd, mount /usr in another
> directory,

Not exactly sure how to do this since /user in on lvm...

> copy all the files from it to /usr (be sure to preserve
> links, permissions, attributes, etc.),

So, once I have it mounted

cp -rp ... ?

> change /etc/fstab, and off you go.

Currently:

> # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
> /dev/sda1               /boot           ext2            noauto,noatime  1 2
> /dev/sda2               none            swap            sw              0 0
> /dev/sda3               /               ext3            noatime         0 1
> /dev/sda4               /backups        ext3            noatime         0 2
> /dev/vg2/home           /home           reiserfs        noatime         0 0
> /dev/vg2/usr            /usr            reiserfs        noatime         0 0
> /dev/vg2/var            /var            reiserfs        noatime         0 0
> /dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0 0
> /dev/fd0                /mnt/floppy     auto            noauto          0 0
>
> # NOTE: The next line is critical for boot!
> none                    /proc           proc            defaults        0 0

So, just remove the line referencing /usr?

> And really, maybe you could try an initramfs? It will be much more
> easy than any juggle of filesystems.

I always compile my kernels manually, by choice - so, no desire to use
genkernel or dracut.

How would I then create one? I am *not* a programmer, just a reasonably
competent general sys admin.

Is there a 'generic' one that I can use? Or is there a separate tool
that will create one based on my system profile (or whatever)?

Thanks again

Reply | Threaded
Open this post in threaded view
|

Re: How hard is it to move separate /usr to / partition? - WAS Re: [gentoo-user] Optional /usr merge in Gentoo

Alan McKinnon-2
On 16/08/2013 17:04, Tanstaafl wrote:

> Thanks for the reply Canek
>
> On 2013-08-16 10:48 AM, Canek Peláez Valdés <[hidden email]> wrote:
>> If you have physical access to the system,
>
> I do.
>
>> and a large enough /,
>
> Well...
>
> / is 19GB, with 18GB available.
>
> /usr is 20GB, with 13GB used, with 7.9GB available.
>
> I guess I'd be ok with going from 18GB available on / to just 5GB
> available...

You should be fine with that. A reasonably sane / is quite static, and
/usr tends not to change all *that* much.

There's some precautions I always take on server:

/var, /usr/local, /opt and /tmp are separate mount points
portage moves to /var, not /usr

With those dealt with, the balance of / shouldn't grow much.


>
>> it's really easy. You boot from a livecd, mount /usr in another
>> directory,
>
> Not exactly sure how to do this since /user in on lvm...
>
>> copy all the files from it to /usr (be sure to preserve
>> links, permissions, attributes, etc.),
>
> So, once I have it mounted
>
> cp -rp ... ?
>
>> change /etc/fstab, and off you go.
>
> Currently:
>
>> # NOTE: If your BOOT partition is ReiserFS, add the notail option to
>> opts.
>> /dev/sda1               /boot           ext2          
>> noauto,noatime  1 2
>> /dev/sda2               none            swap          
>> sw              0 0
>> /dev/sda3               /               ext3          
>> noatime         0 1
>> /dev/sda4               /backups        ext3          
>> noatime         0 2
>> /dev/vg2/home           /home           reiserfs      
>> noatime         0 0
>> /dev/vg2/usr            /usr            reiserfs      
>> noatime         0 0
>> /dev/vg2/var            /var            reiserfs      
>> noatime         0 0
>> /dev/cdroms/cdrom0      /mnt/cdrom      iso9660        
>> noauto,ro       0 0
>> /dev/fd0                /mnt/floppy     auto          
>> noauto          0 0
>>
>> # NOTE: The next line is critical for boot!
>> none                    /proc           proc          
>> defaults        0 0
>
> So, just remove the line referencing /usr?
>
>> And really, maybe you could try an initramfs? It will be much more
>> easy than any juggle of filesystems.
>
> I always compile my kernels manually, by choice - so, no desire to use
> genkernel or dracut.
>
> How would I then create one? I am *not* a programmer, just a reasonably
> competent general sys admin.
>
> Is there a 'generic' one that I can use? Or is there a separate tool
> that will create one based on my system profile (or whatever)?

NAFC. I'm like you and don't built initramfses. The only ones I have are
ones that RH shipped :-)




>
> Thanks again
>


--
Alan McKinnon
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: How hard is it to move separate /usr to / partition? - WAS Re: [gentoo-user] Optional /usr merge in Gentoo

Canek Peláez Valdés
In reply to this post by tanstaafl-2
On Fri, Aug 16, 2013 at 10:04 AM, Tanstaafl <[hidden email]> wrote:

> Thanks for the reply Canek
>
>
> On 2013-08-16 10:48 AM, Canek Peláez Valdés <[hidden email]> wrote:
>>
>> If you have physical access to the system,
>
>
> I do.
>
>
>> and a large enough /,
>
>
> Well...
>
> / is 19GB, with 18GB available.
>
> /usr is 20GB, with 13GB used, with 7.9GB available.
>
> I guess I'd be ok with going from 18GB available on / to just 5GB
> available...
>
>
>> it's really easy. You boot from a livecd, mount /usr in another
>> directory,
>
>
> Not exactly sure how to do this since /user in on lvm...

If the Gentoo minimal install CD doesn't allow you to mount /usr in
LVM, for sure SystemRescueCD will:

http://www.sysresccd.org/SystemRescueCd_Homepage

>
>> copy all the files from it to /usr (be sure to preserve
>> links, permissions, attributes, etc.),
>
>
> So, once I have it mounted
>
> cp -rp ... ?

I would use rsync:

rsync -PvasHAX /oldusr/ /usr/

>
>> change /etc/fstab, and off you go.
>
>
> Currently:
>
>> # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
>> /dev/sda1               /boot           ext2            noauto,noatime  1
>> 2
>> /dev/sda2               none            swap            sw              0
>> 0
>> /dev/sda3               /               ext3            noatime         0
>> 1
>> /dev/sda4               /backups        ext3            noatime         0
>> 2
>> /dev/vg2/home           /home           reiserfs        noatime         0
>> 0
>> /dev/vg2/usr            /usr            reiserfs        noatime         0
>> 0
>> /dev/vg2/var            /var            reiserfs        noatime         0
>> 0
>> /dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro       0
>> 0
>> /dev/fd0                /mnt/floppy     auto            noauto          0
>> 0
>>
>> # NOTE: The next line is critical for boot!
>> none                    /proc           proc            defaults        0
>> 0
>
>
> So, just remove the line referencing /usr?

Yeah, basically.

>> And really, maybe you could try an initramfs? It will be much more
>> easy than any juggle of filesystems.
>
>
> I always compile my kernels manually, by choice - so, no desire to use
> genkernel or dracut.

I compile my kernels manually too. Since ever. Dracut generates an
initramfs from your running system, is orthogonal to compiling your
own kernel.

> How would I then create one? I am *not* a programmer, just a reasonably
> competent general sys admin.
>
> Is there a 'generic' one that I can use? Or is there a separate tool that
> will create one based on my system profile (or whatever)?

Yeah, dracut. Emerge dracut with LVM support, adding "lvm" to
DRACUT_MODULES in /etc/portage/make.conf, then edit /etc/dracut.conf,
and add lvmconf="yes", and run dracut like this (for example):

/usr/bin/dracut -f -H  /boot/initrd-3.10.7 3.10.7

Then you add an initrd line to GRUB, or GRUB2 will automatically
detect the initrd with grub2-mkconfig.

You should at least try it before changing partitions; is so much
easier. If it fails, you can still do the integration of /usr  and /.

Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply | Threaded
Open this post in threaded view
|

Re: How hard is it to move separate /usr to / partition? - WAS Re: [gentoo-user] Optional /usr merge in Gentoo

Paul Hartman-3
In reply to this post by tanstaafl-2
On Fri, Aug 16, 2013 at 10:04 AM, Tanstaafl <[hidden email]> wrote:

>> And really, maybe you could try an initramfs? It will be much more
>> easy than any juggle of filesystems.
>
>
> I always compile my kernels manually, by choice - so, no desire to use
> genkernel or dracut.
>
> How would I then create one? I am *not* a programmer, just a reasonably
> competent general sys admin.
>
> Is there a 'generic' one that I can use? Or is there a separate tool that
> will create one based on my system profile (or whatever)?

I think dracut is actually exactly the tool you are looking for. It
does not have anything to do with building your kernel, its sole job
in life is to generate an initramfs built to your specifications. It
contains sane defaults but you can tweak it to include or exclude
things as you see fit. I build my kernel by hand and then run dracut
afterward to generate the initramfs.img.

I believe mounting /usr is enabled by default in dracut. I would
recommend checking out the documentation and seeing all the different
options and modules that are available so you can customize it to
match your needs. For example you may want to have it import your LVM
configuration, assemble a RAID, use the reiserfs or btrfs filesystem,
etc.

Once it generates the initramfs it's as simple as adding a line to
your grub config and off you go. If it doesn't work right away you can
just comment out that line and boot without it, for now, while your
existing setup is still valid. (It took me a few reboots to find the
right combination of options.) Then someday if separate /usr is no
longer allowed without an initramfs, you'll be prepared for it.

I always regenerate my initramfs using dracut after every time i build
a new kernel, but I'm not sure if that's truly necessary. Honestly
it's all still a bit of a black box to me.

Reply | Threaded
Open this post in threaded view
|

Re: How hard is it to move separate /usr to / partition? - WAS Re: [gentoo-user] Optional /usr merge in Gentoo

Neil Bothwick
In reply to this post by tanstaafl-2
On Fri, 16 Aug 2013 11:04:35 -0400, Tanstaafl wrote:

> > And really, maybe you could try an initramfs? It will be much more
> > easy than any juggle of filesystems.  
>
> I always compile my kernels manually, by choice - so, no desire to use
> genkernel or dracut.
>
> How would I then create one? I am *not* a programmer, just a reasonably
> competent general sys admin.

Read the initramfs page on the Gentoo wiki and
/usr/src/linux/Documentation/filesystems/ramfs-rootfs-initramfs.txt

The kernel will build the initramfs for you, all you need to provide is
the init script and a list of files to include.


--
Neil Bothwick

Secret hacker rule #11: hackers read manuals.

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Optional /usr merge in Gentoo

Daniel Campbell-2
In reply to this post by Alessio Ababilov
On 08/16/2013 07:29 AM, Alessio Ababilov wrote:

> 2013/8/13 Canek Peláez Valdés <[hidden email] <mailto:[hidden email]>>
>
>     I think it's a great experiment, but perhaps too much work for little
>     gain, at least currently.
>
> Thank you!
>
>     The next council meeting will vote if separated /usr without and
>     initramfs is officially supported by Gentoo; I hope this time around
>     finally is officially and unequivocally stated by the council that a
>     separated /usr without an initramfs is *NOT* supported.
>
> As I see
> from http://www.gentoo.org/proj/en/council/meeting-logs/20130813.txt,
> the council has stated that it is not supported anymore.
>
>     The usr-merge will be a slow, gradual change; it will probably take
>     years. The systemd package entered the tree in June 2011, after more
>     than a year in an overlay, and then it took more than two years to
>     make it an official alternative to OpenRC. The /usr merge will take a
>     similar amount of time, if not longer.
>
> Yes, but systemd is a large important package and it requires changes to
> startup files in other packages, so, it took a lot of time.
>
> As the opposite, /usr merge is easier and, IMHO, it doesn't introduce
> any _obvious_ problems to Gentoo.
>
> 2013/8/16 Daniel Campbell <[hidden email] <mailto:[hidden email]>>
>
>
>     Red Hat is only upstream for GNOME and systemd. What they choose to do
>     with their distro should not affect the choices of any other distro. I
>     see no reason for a /usr merge unless one is using Fedora or wants to
>     turn their Gentoo installation into a makeshift Fedora installation.
>     This merge should not be forced on Gentoo whatsoever.
>
>
> I would like to ask you to understand my intension. I believe that
> Gentoo is a distro that is famous for providing choises (USE flags and
> so on). /usr merge is also a choise, and I look for volunteers
> and supporters.
> BTW, /usr merge is not just a Fedora's caprice: is is done in Arch this
> year:
> https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html
>
>
> Sincerely,
> Alessio Ababilov
> Senior Software Engineer
> Grid Dynamics

I'm completely in favor of choice, but only if it doesn't impede on any
other choice(s). If /usr merges are completely optional and only tied to
software that require it (read: systemd), then I'm fine. But requiring
people to have an initramfs to boot a system that doesn't legitimately
require it is silly. I don't even have /usr mounted separately, but
there are many, many different system configurations out there and
Gentoo is famous for supporting a wide variety. That variety is stomped
on if something like a /usr merge is forced. It also makes building your
default environment more complicated due to generating an initramfs.

Arch is following Fedora as they consider them an upstream. They were
one of, if not *the* first non-Fedora distros to ship systemd by
default. They're a poor example. Really, Arch is just Fedora with a
better package manager.

~Daniel

1234 ... 11