InitRAMFS - boot expert sought
Hi,
I've been looking for simple method to create a simple initramfs to just mount the /usr partition. I've found http://wiki.gentoo.org/wiki/Basic_initramfs_used_to_check_and_mount_/usr which didn't work for me. So, I've modified it, see http://www.igpm.rwth-aachen.de/jarausch/Temp/InitRAMFS/ The last lines of the file 'script_init.sh' are # ====================== end doing stuff mount -o remount,rw /mnt/root ### WHY are cp /proc/mounts /mnt/root/mtab ### these two lines necessary # clean up. The init process will remount proc sys and dev later umount /proc umount /sys # umount /dev # fails, since it's automounted by the kernel # switch to the real root and execute init exec switch_root /mnt/root /sbin/init "$@" I first tried this with the lines marked by '###' removed. This worked on one machine but not on another one. There I got 'Remounting root filesystem read/write failed' 'mount: / not mounted or bad option' If I replace line 26 of /etc/init.d/root (openrc-0.9.9.3) mount -n -o remount,rw / by mount /dev/root -n -o remount,rw / it works, as well, i.e. without the two marked lines above. The first mount command finds the mount options in /etc/mtab . Why are the marked lines above necessary on only one of two machines (both of which run the same version of openrc)? Many thanks for a hint, Helmut. |
InitRAMFS - boot expert sought
On 3/27/2012 6:36 AM, Helmut Jarausch wrote:
Hi, I've been looking for simple method to create a simple initramfs to just mount the /usr partition. I've found http://wiki.gentoo.org/wiki/Basic_initramfs_used_to_check_and_mount_/usr If this is all you need, I recommend you use dracut. The default installation (no use-flags or optional modules) will product an initramfs that loads whatever you current rootfs and /usr partitions are. I've been working on updating the wiki with more detailed instructions; for your case what's there now ought to be plenty: http://wiki.gentoo.org/wiki/Dracut |
InitRAMFS - boot expert sought
On Tue, Mar 27, 2012 at 9:19 AM, Mike Edenfield <kutulu@kutulu.org> wrote:
> On 3/27/2012 6:36 AM, Helmut Jarausch wrote: >> >> Hi, >> >> I've been looking for simple method to create a simple >> initramfs to just mount the /usr partition. >> >> I've found >> http://wiki.gentoo.org/wiki/Basic_initramfs_used_to_check_and_mount_/usr > > > If this is all you need, I recommend you use dracut. The default > installation (no use-flags or optional modules) will product an initramfs > that loads whatever you current rootfs and /usr partitions are. > > I've been working on updating the wiki with more detailed instructions; for > your case what's there now ought to be plenty: > > http://wiki.gentoo.org/wiki/Dracut Dracut is masked on ~amd64. Bugs me, as I'd rather use something like that than genkernel (I very much like building my own kernels; it helps me keep things lean, and keeps me familiar with the capabilities of current and future systems). But now I have to find time to learn how to use Genkernel. If we're going to be shoved into tight space like this, I'd be nice if the "you can just use $x" tools work on stable. I've got three previously-working systems at home I can't risk rebooting right now because of this udev+/usr nonsense. I almost invariably put /usr and /home on top of LVM, RAID or both. -- :wq |
InitRAMFS - boot expert sought
On Tue, 27 Mar 2012 09:30:41 -0400, Michael Mol wrote:
> If we're going to be shoved into tight space like this, I'd be nice if > the "you can just use $x" tools work on stable. I've got three > previously-working systems at home I can't risk rebooting right now > because of this udev+/usr nonsense. I almost invariably put /usr and > /home on top of LVM, RAID or both. Only the testing udev needs an initramfs now, so it doesn't really matter yet. However, it would be nice if dracut were stabilised at least a week before udev-18* to give time to play with it. It certainly needs to be stabilised before the news announcement of udev-18* going stable. -- Neil Bothwick The horizon of many people is a circle with a radius of zero. They call this their point of view. -- Albert Einstein |
InitRAMFS - boot expert sought
> > If this is all you need, I recommend you use dracut. The default
> > installation (no use-flags or optional modules) will product an > > initramfs that loads whatever you current rootfs and /usr partitions are. > > > > I've been working on updating the wiki with more detailed > > instructions; for your case what's there now ought to be plenty: > > > > http://wiki.gentoo.org/wiki/Dracut > > Dracut is masked on ~amd64. Bugs me, as I'd rather use something like that > than genkernel (I very much like building my own kernels; it helps me keep > things lean, and keeps me familiar with the capabilities of current and future > systems). But now I have to find time to learn how to use Genkernel. > > If we're going to be shoved into tight space like this, I'd be nice if the "you > can just use $x" tools work on stable. I've got three previously-working > systems at home I can't risk rebooting right now because of this udev+/usr > nonsense. I almost invariably put /usr and /home on top of LVM, RAID or > both. I'm pretty sure that a stable Dracut is a prerequisite for a stable udev-182+. Hopefully with more people taking interest in using an initramfs it will stabilize quickly. It's working for me on all of the systems I'm tried it, so I'm going to try switching a couple of servers at work over to using it. But none of them have anything particularly complex (no net boots, for example) so I don't know how much of a test case they'll be :) --Mike |
InitRAMFS - boot expert sought
Neil Bothwick <neil@digimed.co.uk> wrote:
> On Tue, 27 Mar 2012 09:30:41 -0400, Michael Mol wrote: > > > If we're going to be shoved into tight space like this, I'd be nice if > > the "you can just use $x" tools work on stable. I've got three > > previously-working systems at home I can't risk rebooting right now > > because of this udev+/usr nonsense. I almost invariably put /usr and > > /home on top of LVM, RAID or both. > > Only the testing udev needs an initramfs now, so it doesn't really matter > yet. However, it would be nice if dracut were stabilised at least a week > before udev-18* to give time to play with it. It certainly needs to be > stabilised before the news announcement of udev-18* going stable. > With the latest genkernel, my initrd mounts /usr, however the fsck is never done because its mounted -- any solution for this? -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com |
InitRAMFS - boot expert sought
Mike Edenfield wrote:
>>> If this is all you need, I recommend you use dracut. The default >>> installation (no use-flags or optional modules) will product an >>> initramfs that loads whatever you current rootfs and /usr partitions are. >>> >>> I've been working on updating the wiki with more detailed >>> instructions; for your case what's there now ought to be plenty: >>> >>> http://wiki.gentoo.org/wiki/Dracut >> >> Dracut is masked on ~amd64. Bugs me, as I'd rather use something like that >> than genkernel (I very much like building my own kernels; it helps me keep >> things lean, and keeps me familiar with the capabilities of current and future >> systems). But now I have to find time to learn how to use Genkernel. >> >> If we're going to be shoved into tight space like this, I'd be nice if the "you >> can just use $x" tools work on stable. I've got three previously-working >> systems at home I can't risk rebooting right now because of this udev+/usr >> nonsense. I almost invariably put /usr and /home on top of LVM, RAID or >> both. > > I'm pretty sure that a stable Dracut is a prerequisite for a stable udev-182+. Hopefully with more people taking interest in using an initramfs it will stabilize quickly. It's working for me on all of the systems I'm tried it, so I'm going to try switching a couple of servers at work over to using it. But none of them have anything particularly complex (no net boots, for example) so I don't know how much of a test case they'll be :) > > --Mike > I'm still trying to figure out why my dracut init thingy isn't working right. If I use the init thingy, I can't su to root from a user. If I don't use the init thingy, I can su just fine. By the way, I boot the exact same kernel either way I boot. So, the fix doesn't seem to work for me and I have no plans of using genkernel. I dunno. Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words! Miss the compile output? Hint: EMERGE_DEFAULT_OPTS="--quiet-build=n" |
InitRAMFS - boot expert sought
On Tue, 27 Mar 2012 11:20:44 -0400, covici@ccs.covici.com wrote:
> With the latest genkernel, my initrd mounts /usr, however the fsck is > never done because its mounted -- any solution for this? ISTR this coming up recently and the solution being to run fsck from the shutdown runlevel. -- Neil Bothwick FINE: Tax for doing wrong. Tax: fine for doing fine. |
InitRAMFS - boot expert sought
> Dracut is masked on ~amd64. Bugs me, as I'd rather use something like
> that than genkernel (I very much like building my own kernels; it > helps me keep things lean, and keeps me familiar with the capabilities > of current and future systems). But now I have to find time to learn > how to use Genkernel. I don't understand why people always say that they hate genkernel because they like to build the kernel on their own. You still can do this with genkernel. I've been doing it for years. This is my workflow after I merged a new kernel # copy old config to new kernel sources % zcat /proc/config.gz > /usr/src/linux/.config # enter source dir % cd /usr/src/linux # run make oldconfig (help you keep things lean, keeps you familiar with the capabilities of current and future systems.....) % make oldconfig # compile kernel and modules, generate initrd, install to /boot and /lib/modules, create symlinks in /boot % genkernel all # recompile 3rd party modules % module-rebuild rebuild You just have to tell genkernel not to "make mrproper" in /etc/genkernel.conf - so that it actually uses your kernel config, and in essence, let's you "build your own kernel". I also tell genkernel not to run "make clean" - for a faster recompile if I have changed my kernel config. I love genkernel, it just makes life so much easier, you don't have enter every command manually. And still keeps it the gentoo-way: you can configure everything so that it does exactly what you wan't. Just take a look at /etc/genkernel.conf genkernel can do even more stuff for you. For example include a copy of /etc/mdadm.conf into your initramfs so that the initramfs can mount your software raid (even with metadata higher than 0.90 :) - this is where the kernel raid auto assembly fails). Or enable a splash theme for a graphical boot - if you like that sort of thing. I'm sure you're gonna love it to after you have used it for some time. |
InitRAMFS - boot expert sought
On Tue, Mar 27, 2012 at 12:18 PM, Michael Hampicke <gentoo-user@hadt.biz> wrote:
>> Dracut is masked on ~amd64. Bugs me, as I'd rather use something like >> that than genkernel (I very much like building my own kernels; it >> helps me keep things lean, and keeps me familiar with the capabilities >> of current and future systems). But now I have to find time to learn >> how to use Genkernel. > > I don't understand why people always say that they hate genkernel > because they like to build the kernel on their own. You still can do > this with genkernel. I've been doing it for years. > > This is my workflow after I merged a new kernel > > # copy old config to new kernel sources > % zcat /proc/config.gz > /usr/src/linux/.config > > # enter source dir > % cd /usr/src/linux > > # run make oldconfig (help you keep things lean, keeps you familiar with > the capabilities of current and future systems.....) > % make oldconfig > > # compile kernel and modules, generate initrd, install to /boot and > /lib/modules, create symlinks in /boot > % genkernel all > > # recompile 3rd party modules > % module-rebuild rebuild > > You just have to tell genkernel not to "make mrproper" in > /etc/genkernel.conf - so that it actually uses your kernel config, and > in essence, let's you "build your own kernel". I also tell genkernel not > to run "make clean" - for a faster recompile if I have changed my kernel > config. > > I love genkernel, it just makes life so much easier, you don't have > enter every command manually. And still keeps it the gentoo-way: you can > configure everything so that it does exactly what you wan't. > > Just take a look at /etc/genkernel.conf > genkernel can do even more stuff for you. > For example include a copy of /etc/mdadm.conf into your initramfs so > that the initramfs can mount your software raid (even with metadata > higher than 0.90 :) - this is where the kernel raid auto assembly fails). > Or enable a splash theme for a graphical boot - if you like that sort of > thing. > > I'm sure you're gonna love it to after you have used it for some time. Sounds useful. At least parts of your workflow belong in the gentoo installation guide... -- :wq |
| All times are GMT. The time now is 01:01 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.