FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-28-2012, 07:43 AM
Neil Bothwick
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

On Wed, 28 Mar 2012 13:17:56 +0700, Pandu Poluan wrote:

> Check out the email from William Kenworth in this mailing list; he's
> having trouble with initramfs being a blackbox.
>
> As a (mostly) server guy, I much prefer using a whitebox.

It's not a blackbox, unlike a kernel or any other binary, it is a simple
cpio archive that you can unpack and inspect. If you want total control,
build your own, it is not rocket science.


--
Neil Bothwick

If a book about failures doesn't sell, is it a success?
 
Old 03-28-2012, 07:47 AM
Neil Bothwick
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

On Tue, 27 Mar 2012 23:32:22 +0000, Alan Mackenzie wrote:

> We're going to be stuck with some issues anyway, no matter how we cope
> with things. At the moment, I've got my /usr on RAID1, which I think
> doubles up the speed things load at.

Use 0.90 metadata and you can put / on RAID1 too.

> (It's on LVM2 too, but that's by
> the way.) I really don't want a fragile initramfs. Sooner or later, I'd
> put some slight glitch into it and the result would be a dead PC.
> Either that or I'll be scared stiff of touching it, which isn't how a
> Gentoo user is supposed to be.

An initramfs doesn't really need any maintenance, it does a couple of
simple tasks, basically mounting stuff, and then exits. Once working
there's no reason to change it. Even if you do and break things, it's
exactly the same as the situation with a broken kernel update, you just
boot with the previous one (that's one reason I leave the initramfs
inside the kernel, a working kernel will always work without any reliance
on other files).


--
Neil Bothwick

"We demand rigidly defined areas of doubt and uncertainty!"
 
Old 03-28-2012, 02:56 PM
Neil Bothwick
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

On Wed, 28 Mar 2012 14:01:32 +0000, Alan Mackenzie wrote:

> > Read my other mail and pay attention to the difference between
> > transient and persistent.
>
> In my proposed solution, the executables in /sbin would only exist until
> /usr had been mounted and the runtime PATH set up. After the
> unification of /usr, /sbin won't even exist (apart from in schemes like
> mine).

What happens to files that are installed to /bin, /sbin or /lib by
default? Where do kernel modules go?

> I look forward with foreboding to the time when such recovery will not
> be possible. Only a legacy Gentoo system or a recovery CD will help
> then. I think it highly probable that "can't boot" bugs will continue
> to happen occasionally. I'd like to carry on having a bootable
> skeleton system for when this happens.

When an initramfs fails to boot, it drops you to a busybox shell,
although I also have a SystemRescueCD ISO in /boot for such situations.


--
Neil Bothwick

Top Oxymorons Number 12: Plastic glasses
 
Old 03-28-2012, 05:27 PM
"Mike Edenfield"
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

> From: Canek Peláez Valdés [mailto:caneko@gmail.com]


> I agree with most of what you say; however, I believe you are mistaken
> about the static nature of the binaries in the initramfs created by dracut. I
> use dracut with the whole bang (plymouth, systemd, udev, you name it), and
> I don't have *any* of my packages compiled with "static-libs". Even more, my
> system right now runs everything with "-static-libs". I like to think (and,
> unless I missed something, that's in fact the truth) that my initramfs is
> actually more or less in sync with my running system, and I update it a lot,
> since it's trivial to do so with dracut.

You're right, it wasn't plymouth, it was gensplash and crypt that wanted me to add static-libs. It was a USE-flag dependency so I could not proceed with the dracut install until I rebuilt those other packages.

plymouth just needed wanted USE=libkms on libdrm.
 
Old 03-28-2012, 05:36 PM
"Mike Edenfield"
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

From: Pandu Poluan [mailtoandu@poluan.info]
> On Mar 28, 2012 11:27 AM, "Mike Edenfield" <kutulu@kutulu.org> wrote:

>> Well, for one, the initramfs solution is not generally considered "ugly"
>> except by a select vocal few who object to it on vague, unarticulated
>> grounds.

> Check out the email from William Kenworth in this mailing list; he's having
> trouble with initramfs being a blackbox.

I don't see how you can really call initramfs a 'black box"; it's certainly as open, or moreso, as the kernel, or grub, or /sbin/init; it's just a mini-filesystem with its own init:

apollo kutulu # lsinitrd /boot/initramfs-3.2.7-hardened-apollo-0.img
/boot/initramfs-3.2.7-hardened-apollo-0.img: 2.6M
================================================== ======================
================================================== ======================
drwxr-xr-x 15 root root 0 Mar 28 13:32 .
drwxr-xr-x 2 root root 0 Mar 28 13:32 dev
drwxr-xr-x 2 root root 0 Mar 28 13:32 root
drwxr-xr-x 2 root root 0 Mar 28 13:32 bin
-rws--x--x 1 root root 105584 Feb 28 17:46 bin/mount
-rwxr-xr-x 1 root root 26536 Feb 28 17:46 bin/dmesg
-rwxr-xr-x 1 root root 30696 Feb 21 17:12 bin/uname
-rwxr-xr-x 1 root root 34776 Feb 21 17:12 bin/chroot
-rwxr-xr-x 1 root root 137624 Mar 27 13:14 bin/dash
-rwxr-xr-x 1 root root 71640 Feb 21 17:12 bin/stty
-rwxr-xr-x 1 root root 30680 Feb 21 17:12 bin/basename
-rwxr-xr-x 1 root root 34776 Feb 21 17:12 bin/mknod
lrwxrwxrwx 1 root root 4 Mar 28 13:32 bin/sh -> dash
.
.
.
-rwxr-xr-x 1 root root 14176 Feb 28 17:46 sbin/switch_root
-rwxr-xr-x 1 root root 12622 Feb 15 12:05 init
drwxr-xr-x 2 root root 0 Mar 28 13:32 tmp
drwxr-xr-x 2 root root 0 Mar 28 13:32 proc
drwxr-xr-x 5 root root 0 Mar 28 13:32 lib64
 
Old 03-28-2012, 09:47 PM
Neil Bothwick
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

On Wed, 28 Mar 2012 17:07:33 +0000, Alan Mackenzie wrote:

> > What happens to files that are installed to /bin, /sbin or /lib by
> > default?
>
> Aren't they getting shoved into /usr? I thought that was the whole
> point of the excercise.

That /may/ happen at some time, but not now, so we need a solution that
supports the current mish-mash of /*/*bin directories.

> > Where do kernel modules go?
>
> I hadn't actually thought of that - I've never built a kernel with
> modules enabled. Where do kernel modules go? Won't they be going into
> /usr somewhere?

How will you mount /usr if it needs a module? This is the sort of chicken
and egg situation that an initramfs can avoid, by making sure everything
the boot process needs is available.

> > When an initramfs fails to boot, it drops you to a busybox shell, ...
>
> You know, that cheers me up a lot.
>
> > ...although I also have a SystemRescueCD ISO in /boot for such
> > situations.
>
> I suppose I could do with that, too. And I should learn how to use it.

Since someone has already asked about this off-list, the method is
described on sysrescd.org and involves a GRUB menu entry like

echo "Adding: System Rescue CD"
menuentry "System Rescue CD" {
set sysresiso=/systemrescuecd-x86-2.5.1.iso
loopback loop $sysresiso
linux (loop)/isolinux/rescue64 rootpass=whatever setkmap=uk isoloop=$sysresiso
initrd (loop)/isolinux/initram.igz
}


--
Neil Bothwick

IMPORTANT: The entire physical universe, including this message, may
one day collapse back into an infinitesimally small space. Should
another universe subsequently re-emerge, the existence of this message
in that universe cannot be guaranteed.
 
Old 03-28-2012, 10:45 PM
Peter Humphrey
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

On Wednesday 28 March 2012 22:47:09 Neil Bothwick wrote:

> Since someone has already asked about this off-list, the method is
> described on sysrescd.org and involves a GRUB menu entry like
>
> echo "Adding: System Rescue CD"
> menuentry "System Rescue CD" {
> set sysresiso=/systemrescuecd-x86-2.5.1.iso
> loopback loop $sysresiso
> linux (loop)/isolinux/rescue64 rootpass=whatever setkmap=uk
> isoloop=$sysresiso initrd (loop)/isolinux/initram.igz
> }

Am I right in thinking that this only works with GRUB-2, not the legacy
GRUB? I'm not ready yet to go to the next generation of GRUB.

--
Rgds
Peter
 
Old 03-28-2012, 11:25 PM
Neil Bothwick
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

On Wed, 28 Mar 2012 23:45:40 +0100, Peter Humphrey wrote:

> > echo "Adding: System Rescue CD"
> > menuentry "System Rescue CD" {
> > set sysresiso=/systemrescuecd-x86-2.5.1.iso
> > loopback loop $sysresiso
> > linux (loop)/isolinux/rescue64 rootpass=whatever setkmap=uk
> > isoloop=$sysresiso initrd (loop)/isolinux/initram.igz
> > }
>
> Am I right in thinking that this only works with GRUB-2, not the legacy
> GRUB?

AFAIK, yes.

> I'm not ready yet to go to the next generation of GRUB.

There's little point in change fore change's sake. When I install a new
system I use GRUB2, but those that were set up with GRUB1 will continue
to use it until I have a good reason to change - even though the change
is quite trivial.

For new systems, it is a lot easier - emerge grub and run grub2-mkconfig
and you have a bootable system. If you want to fart around with menu
files (as I generally do) you can play with them after the system has
booted the first time.


--
Neil Bothwick

Loose bits sink chips.
 
Old 03-29-2012, 01:53 AM
Dale
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

Alan Mackenzie wrote:

> Incidentally, dracut says it won't work on a kernel without modules. I
> don't know if it's true or not.
>

Oh really? I don't use modules and I am the one having issues with not
being able to su to root from a user. I wonder if that is related
somehow. o_O

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"
 
Old 03-29-2012, 02:07 AM
Canek Peláez Valdés
 
Default After /usr conflation: why not copy booting software to /sbin rather than initramfs?

On Wed, Mar 28, 2012 at 7:53 PM, Dale <rdalek1967@gmail.com> wrote:
> Alan Mackenzie wrote:
>
>> Incidentally, dracut says it won't work on a kernel without modules. *I
>> don't know if it's true or not.
>>
>
> Oh really? *I don't use modules and I am the one having issues with not
> being able to su to root from a user. *I wonder if that is related
> somehow. *o_O

I don't use modules either (except scsi_wait_scan.ko; you cannot get
rid of that one), I use dracut, and I can su just fine.

Dale, can you please post the dracut comand you used to create your
initramfs? Also, the DRACUT_MODULES you have defined, and the contents
of /etc/dracut.conf?

Not being able to su sounds incredible weird.

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

Thread Tools




All times are GMT. The time now is 04:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org